From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/cmd/auxstats/Darwin.c | 46 ++++++++++++++++++++++---------------------- src/cmd/auxstats/DragonFly.c | 3 +-- src/cmd/auxstats/FreeBSD.c | 5 ++--- src/cmd/auxstats/Linux.c | 6 +++--- src/cmd/auxstats/NetBSD.c | 3 +-- src/cmd/auxstats/SunOS.c | 3 +-- src/cmd/auxstats/main.c | 1 - 7 files changed, 31 insertions(+), 36 deletions(-) (limited to 'src/cmd/auxstats') diff --git a/src/cmd/auxstats/Darwin.c b/src/cmd/auxstats/Darwin.c index b92f682e..836de520 100644 --- a/src/cmd/auxstats/Darwin.c +++ b/src/cmd/auxstats/Darwin.c @@ -79,7 +79,7 @@ void sampleinit(void) { mach_timebase_info_data_t info; - + if(stat_port) return; @@ -115,7 +115,7 @@ samplenet(void) sample.net_obytes = 0; sample.net_errors = 0; sample.net_ifaces = 0; - + for(ifa=ifa_list; ifa; ifa=ifa->ifa_next){ if(ifa->ifa_addr->sa_family != AF_LINK) continue; @@ -125,7 +125,7 @@ samplenet(void) continue; if(strncmp(ifa->ifa_name, "lo", 2) == 0) /* loopback */ continue; - + if_data = (struct if_data*)ifa->ifa_data; sample.net_ipackets += if_data->ifi_ipackets; sample.net_opackets += if_data->ifi_opackets; @@ -144,7 +144,7 @@ samplenet(void) * all the other stat monitoring apps get set: * * -rwsr-xr-x 1 root wheel 83088 Mar 20 2005 /usr/bin/top - * -rwsrwxr-x 1 root admin 54048 Mar 20 2005 + * -rwsrwxr-x 1 root admin 54048 Mar 20 2005 * /Applications/Utilities/Activity Monitor.app/Contents/Resources/pmTool * * If Darwin eventually encompases more into sysctl then this @@ -165,7 +165,7 @@ sampleevents(void) mach_error_string(error)); return; } - + sample.p_syscalls_mach = sample.syscalls_mach; sample.p_syscalls_unix = sample.syscalls_unix; sample.p_csw = sample.csw; @@ -173,7 +173,7 @@ sampleevents(void) sample.syscalls_mach = 0; sample.syscalls_unix = 0; sample.csw = 0; - + for(i=0; i #include "dat.h" -void (*statfn[])(int) = +void (*statfn[])(int) = { 0 }; - diff --git a/src/cmd/auxstats/FreeBSD.c b/src/cmd/auxstats/FreeBSD.c index 2497fe35..2cc82879 100644 --- a/src/cmd/auxstats/FreeBSD.c +++ b/src/cmd/auxstats/FreeBSD.c @@ -203,8 +203,8 @@ xsysctl(int first) pgsize = 4096; } - Bprint(&bout, "mem =%lld %lld\n", - isys("vm.stats.vm.v_active_count")*pgsize, + Bprint(&bout, "mem =%lld %lld\n", + isys("vm.stats.vm.v_active_count")*pgsize, isys("vm.stats.vm.v_page_count")*pgsize); Bprint(&bout, "context %lld 1000\n", isys("vm.stats.sys.v_swtch")); Bprint(&bout, "syscall %lld 1000\n", isys("vm.stats.sys.v_syscall")); @@ -284,4 +284,3 @@ xswap(int first) Bprint(&bout, "swap =%lld %lld\n", s.ksw_used*(vlong)pgsize, s.ksw_total*(vlong)pgsize); } - diff --git a/src/cmd/auxstats/Linux.c b/src/cmd/auxstats/Linux.c index 64c86a26..7bc4b720 100644 --- a/src/cmd/auxstats/Linux.c +++ b/src/cmd/auxstats/Linux.c @@ -39,12 +39,12 @@ xapm(int first) readfile(fd); tokens(0); curr = atoi(tok[0]); - + if(curr != -1) Bprint(&bout, "battery =%d 100\n", curr); } - + void xloadavg(int first) { @@ -236,7 +236,7 @@ xwireless(int first) { static int fd = -1; int i; - + if(first){ fd = open("/proc/net/wireless", OREAD); return; diff --git a/src/cmd/auxstats/NetBSD.c b/src/cmd/auxstats/NetBSD.c index ec931044..33ebdedc 100644 --- a/src/cmd/auxstats/NetBSD.c +++ b/src/cmd/auxstats/NetBSD.c @@ -3,8 +3,7 @@ #include #include "dat.h" -void (*statfn[])(int) = +void (*statfn[])(int) = { 0 }; - diff --git a/src/cmd/auxstats/SunOS.c b/src/cmd/auxstats/SunOS.c index ec931044..33ebdedc 100644 --- a/src/cmd/auxstats/SunOS.c +++ b/src/cmd/auxstats/SunOS.c @@ -3,8 +3,7 @@ #include #include "dat.h" -void (*statfn[])(int) = +void (*statfn[])(int) = { 0 }; - diff --git a/src/cmd/auxstats/main.c b/src/cmd/auxstats/main.c index d1c35561..3fd77ac4 100644 --- a/src/cmd/auxstats/main.c +++ b/src/cmd/auxstats/main.c @@ -120,4 +120,3 @@ tokens(int i) } ntok = tokenize(line[i], tok, nelem(tok)); } - -- cgit v1.2.3