Date: Thu, 6 Mar 2014 07:43:43 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262824 - head/tools/tools/net80211/wlanstats Message-ID: <201403060743.s267hhOO063345@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Mar 6 07:43:42 2014 New Revision: 262824 URL: http://svnweb.freebsd.org/changeset/base/262824 Log: Modify wlanstats to now use the copy of libbsdstat in /usr/lib/private. Modified: head/tools/tools/net80211/wlanstats/Makefile head/tools/tools/net80211/wlanstats/wlanstats.c head/tools/tools/net80211/wlanstats/wlanstats.h Modified: head/tools/tools/net80211/wlanstats/Makefile ============================================================================== --- head/tools/tools/net80211/wlanstats/Makefile Thu Mar 6 07:42:27 2014 (r262823) +++ head/tools/tools/net80211/wlanstats/Makefile Thu Mar 6 07:43:42 2014 (r262824) @@ -5,8 +5,10 @@ PROG= wlanstats BINDIR= /usr/local/bin NO_MAN= +USEPRIVATELIB= -SRCS= statfoo.c wlanstats.c main.c +SRCS= wlanstats.c main.c +LDADD= -lbsdstat CFLAGS.clang+= -fbracket-depth=512 .include <bsd.prog.mk> Modified: head/tools/tools/net80211/wlanstats/wlanstats.c ============================================================================== --- head/tools/tools/net80211/wlanstats/wlanstats.c Thu Mar 6 07:42:27 2014 (r262823) +++ head/tools/tools/net80211/wlanstats/wlanstats.c Thu Mar 6 07:43:42 2014 (r262824) @@ -531,7 +531,7 @@ wlan_collect(struct wlanstatfoo_p *wf, } static void -wlan_collect_cur(struct statfoo *sf) +wlan_collect_cur(struct bsdstat *sf) { struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) sf; @@ -539,7 +539,7 @@ wlan_collect_cur(struct statfoo *sf) } static void -wlan_collect_tot(struct statfoo *sf) +wlan_collect_tot(struct bsdstat *sf) { struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) sf; @@ -547,7 +547,7 @@ wlan_collect_tot(struct statfoo *sf) } static void -wlan_update_tot(struct statfoo *sf) +wlan_update_tot(struct bsdstat *sf) { struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) sf; @@ -669,7 +669,7 @@ wlan_getinfo(struct wlanstatfoo_p *wf, i } static int -wlan_get_curstat(struct statfoo *sf, int s, char b[], size_t bs) +wlan_get_curstat(struct bsdstat *sf, int s, char b[], size_t bs) { struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) sf; #define STAT(x) \ @@ -833,7 +833,7 @@ wlan_get_curstat(struct statfoo *sf, int } static int -wlan_get_totstat(struct statfoo *sf, int s, char b[], size_t bs) +wlan_get_totstat(struct bsdstat *sf, int s, char b[], size_t bs) { struct wlanstatfoo_p *wf = (struct wlanstatfoo_p *) sf; #define STAT(x) \ @@ -994,7 +994,7 @@ wlan_get_totstat(struct statfoo *sf, int #undef STAT } -STATFOO_DEFINE_BOUNCE(wlanstatfoo) +BSDSTAT_DEFINE_BOUNCE(wlanstatfoo) struct wlanstatfoo * wlanstats_new(const char *ifname, const char *fmtstring) @@ -1004,7 +1004,7 @@ wlanstats_new(const char *ifname, const wf = calloc(1, sizeof(struct wlanstatfoo_p)); if (wf != NULL) { - statfoo_init(&wf->base.base, "wlanstats", wlanstats, N(wlanstats)); + bsdstat_init(&wf->base.base, "wlanstats", wlanstats, N(wlanstats)); /* override base methods */ wf->base.base.collect_cur = wlan_collect_cur; wf->base.base.collect_tot = wlan_collect_tot; @@ -1013,7 +1013,7 @@ wlanstats_new(const char *ifname, const wf->base.base.update_tot = wlan_update_tot; /* setup bounce functions for public methods */ - STATFOO_BOUNCE(wf, wlanstatfoo); + BSDSTAT_BOUNCE(wf, wlanstatfoo); /* setup our public methods */ wf->base.setifname = wlan_setifname; Modified: head/tools/tools/net80211/wlanstats/wlanstats.h ============================================================================== --- head/tools/tools/net80211/wlanstats/wlanstats.h Thu Mar 6 07:42:27 2014 (r262823) +++ head/tools/tools/net80211/wlanstats/wlanstats.h Thu Mar 6 07:43:42 2014 (r262824) @@ -32,15 +32,15 @@ #ifndef _WLANSTATS_H_ #define _WLANSTATS_H_ -#include "statfoo.h" +#include "bsdstat.h" /* * wlan statistics class. */ struct wlanstatfoo { - struct statfoo base; + struct bsdstat base; - STATFOO_DECL_METHODS(struct wlanstatfoo *); + BSDSTAT_DECL_METHODS(struct wlanstatfoo *); /* set the network interface name for collection */ void (*setifname)(struct wlanstatfoo *, const char *ifname);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403060743.s267hhOO063345>