From 82a0dcda0f048d1d5081f54541715e9b8853d6b8 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 28 Sep 2016 10:10:10 -0500 Subject: [PATCH] library: strictly cosmetic, absolutely no code changes This commit just contains some tweaks to comments plus a few adjustments to whitespace for alignment purposes and a normalization of the header inclusion #define's. [ plus a spelling error in one header file was fixed ] Signed-off-by: Jim Warner --- proc/diskstats.c | 2 +- proc/diskstats.h | 4 ++-- proc/meminfo.h | 7 +++---- proc/pids.c | 15 +++++++-------- proc/pids.h | 6 +++--- proc/slabinfo.h | 6 +++--- proc/stat.c | 2 +- proc/stat.h | 5 ++--- proc/vmstat.c | 2 +- proc/vmstat.h | 4 ++-- 10 files changed, 25 insertions(+), 28 deletions(-) diff --git a/proc/diskstats.c b/proc/diskstats.c index 9eb5b03e..2aafa3d4 100644 --- a/proc/diskstats.c +++ b/proc/diskstats.c @@ -253,7 +253,7 @@ static struct { { RS(DISKSTATS_DELTA_IO_WTIME), QS(s_int), TS(s_int) }, // dummy entry corresponding to DISKSTATS_logical_end ... - { NULL, NULL, NULL } + { NULL, NULL, NULL } }; /* please note, diff --git a/proc/diskstats.h b/proc/diskstats.h index 4d8683f9..83b8c479 100644 --- a/proc/diskstats.h +++ b/proc/diskstats.h @@ -20,8 +20,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PROC_DISKSTATS_H -#define PROC_DISKSTATS_H +#ifndef PROCPS_DISKSTATS_H +#define PROCPS_DISKSTATS_H #include diff --git a/proc/meminfo.h b/proc/meminfo.h index e19b2e35..f1cffd1f 100644 --- a/proc/meminfo.h +++ b/proc/meminfo.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PROC_MEMINFO_H -#define PROC_MEMINFO_H +#ifndef PROCPS_MEMINFO_H +#define PROCPS_MEMINFO_H #include @@ -27,7 +27,7 @@ enum meminfo_item { MEMINFO_noop, // ( never altered ) MEMINFO_extra, // ( reset to zero ) /* - note: all of the following values are exressed as KiB + note: all of the following values are expressed as KiB */ MEMINFO_MEM_ACTIVE, // ul_int MEMINFO_MEM_ACTIVE_ANON, // ul_int @@ -165,5 +165,4 @@ struct meminfo_stack *procps_meminfo_select ( int numitems); __END_DECLS - #endif diff --git a/proc/pids.c b/proc/pids.c index 4ba9d81f..2ba55390 100644 --- a/proc/pids.c +++ b/proc/pids.c @@ -45,11 +45,11 @@ #include -//#define UNREF_RPTHASH // report hash details at uref() time +//#define UNREF_RPTHASH // report hash details at uref() time -#define FILL_ID_MAX 255 // upper limit with select of pid/uid -#define STACKS_INCR 128 // amount reap stack allocations grow -#define NEWOLD_INCR 128 // amt by which hist allocations grow +#define FILL_ID_MAX 255 // upper limit with select of pid/uid +#define STACKS_INCR 128 // amount reap stack allocations grow +#define NEWOLD_INCR 128 // amt by which hist allocations grow struct stacks_extent { @@ -339,7 +339,6 @@ srtDECL(noop) { // ___ Controlling Table |||||||||||||||||||||||||||||||||||||||||||||||||||||| - // from either 'stat' or 'status' (preferred) #define f_either PROC_SPARE_1 // either status or stat (favor stat) #define f_grp PROC_FILLGRP #define f_lxc PROC_FILL_LXC @@ -395,7 +394,7 @@ static struct { { RS(ADDR_KSTK_ESP), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(ADDR_START_CODE), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(ADDR_START_STACK), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, - { RS(ALARM), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, + { RS(ALARM), f_stat, NULL, QS(ul_int), 0, TS(ul_int) }, // ( obsolete, always zero ) { RS(CGNAME), x_cgroup, FF(str), QS(str), 0, TS(str) }, { RS(CGROUP), x_cgroup, FF(str), QS(str), 0, TS(str) }, { RS(CGROUP_V), v_cgroup, FF(strv), QS(strv), 0, TS(strv) }, @@ -439,8 +438,8 @@ static struct { { RS(MEM_CODE_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(MEM_DATA), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(MEM_DATA_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, - { RS(MEM_DT_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, // ( always 0 w/ since 2.6 ) - { RS(MEM_LRS_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, + { RS(MEM_DT_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, // ( always 0 since linux 2.6 ) + { RS(MEM_LRS_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, // ( always 0 since linux 2.6 ) { RS(MEM_RES), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(MEM_RES_PGS), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, { RS(MEM_SHR), f_statm, NULL, QS(ul_int), 0, TS(ul_int) }, diff --git a/proc/pids.h b/proc/pids.h index 20af3e00..92669f94 100644 --- a/proc/pids.h +++ b/proc/pids.h @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PROC_PIDS_H -#define PROC_PIDS_H +#ifndef PROCPS_PIDS_H +#define PROCPS_PIDS_H #include @@ -236,4 +236,4 @@ struct pids_stack **procps_pids_sort ( enum pids_sort_order order); __END_DECLS -#endif /* _PROC_PIDS_H */ +#endif diff --git a/proc/slabinfo.h b/proc/slabinfo.h index c19fd5d1..e0c549e9 100644 --- a/proc/slabinfo.h +++ b/proc/slabinfo.h @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PROC_SLAB_H -#define PROC_SLAB_H +#ifndef PROCPS_SLABINFO_H +#define PROCPS_SLABINFO_H #include @@ -131,4 +131,4 @@ struct slabinfo_stack **procps_slabinfo_sort ( enum slabinfo_sort_order order); __END_DECLS -#endif /* _PROC_SLAB_H */ +#endif diff --git a/proc/stat.c b/proc/stat.c index 18d44db5..4d0989a5 100644 --- a/proc/stat.c +++ b/proc/stat.c @@ -1045,7 +1045,7 @@ PROCPS_EXPORT struct stat_reaped *procps_stat_reap ( break; case STAT_REAP_CPUS_AND_NODES: #ifndef NUMA_DISABLE - /* note: if we are doing numa at all, we must call stat_make_numa_hist | + /* note: if we're doing numa at all, we must do this numa history | before we build (fetch) the cpu stacks since the read_stat guy | will have marked (temporarily) all the cpu node ids as invalid | */ if (0 > stat_make_numa_hist(info)) diff --git a/proc/stat.h b/proc/stat.h index 9dfad108..e89c64dd 100644 --- a/proc/stat.h +++ b/proc/stat.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PROC_STAT_H -#define PROC_STAT_H +#ifndef PROCPS_STAT_H +#define PROCPS_STAT_H #include @@ -142,5 +142,4 @@ struct stat_stack **procps_stat_sort ( enum stat_sort_order order); __END_DECLS - #endif diff --git a/proc/vmstat.c b/proc/vmstat.c index 71b374b5..5cd49c3d 100644 --- a/proc/vmstat.c +++ b/proc/vmstat.c @@ -710,7 +710,7 @@ static struct { { RS(DELTA_ZONE_RECLAIM_FAILED), TS(sl_int) }, // dummy entry corresponding to VMSTAT_logical_end ... - { NULL, NULL } + { NULL, NULL } }; /* please note, diff --git a/proc/vmstat.h b/proc/vmstat.h index 1f67bfef..98e0cc69 100644 --- a/proc/vmstat.h +++ b/proc/vmstat.h @@ -21,8 +21,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PROC_VMSTAT_H -#define PROC_VMSTAT_H +#ifndef PROCPS_VMSTAT_H +#define PROCPS_VMSTAT_H #include