]> granicus.if.org Git - procps-ng/commitdiff
all: make buildable again for new 'misc.h' header file
authorJim Warner <james.warner@comcast.net>
Tue, 19 Jan 2021 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Thu, 21 Jan 2021 06:30:25 +0000 (17:30 +1100)
With the 4 header files removed in the previous patch,
this commit just changes all those obsolete references
to that new consolidated 'misc.h' header file instead.

Signed-off-by: Jim Warner <james.warner@comcast.net>
23 files changed:
Documentation/bugs.md
Makefile.am
pgrep.c
proc/devname.c
proc/namespace.c
proc/pids.c
proc/readproc.c
proc/readproc.h
proc/sysinfo.c
proc/test_namespace.c
proc/test_sysinfo.c
proc/test_uptime.c
proc/test_version.c
proc/uptime.c
proc/version.c
ps/common.h
ps/sortformat.c
skill.c
tload.c
top/top.c
uptime.c
vmstat.c
w.c

index 62bc98da2543ec8d5df192866cbfd7258bb825f9..71c48b538feed766eaffa95b5ae82262402a9460 100644 (file)
@@ -67,7 +67,7 @@ variable `linux_version_code` from libproc/version.c.  It is the same
 number as the macro `LINUX_VERSION_CODE` for which the kernel /proc fs
 code was compiled.
 
-A macro is provide in libproc/version.h to construct the code from its
+A macro is provide in libproc/misc.h to construct the code from its
 components, e.g.
 >  if (linux_version_code < LINUX_VERSION(2,5,41))
 >     /* blah blah blah */
index a8598b5aade7ebbfcf5a946bc05bb71383699546..fae226319f6f3f342e1da2ba9a22636d220e6652 100644 (file)
@@ -253,8 +253,8 @@ proc_libprocps_la_SOURCES = \
        proc/procps-private.h \
        proc/meminfo.c \
        proc/meminfo.h \
+       proc/misc.h \
        proc/namespace.c \
-       proc/namespace.h \
        proc/numa.c \
        proc/numa.h \
        proc/pids.c \
@@ -268,28 +268,22 @@ proc_libprocps_la_SOURCES = \
        proc/stat.c \
        proc/stat.h \
        proc/sysinfo.c \
-       proc/sysinfo.h \
        proc/version.c \
-       proc/version.h \
        proc/vmstat.c \
        proc/vmstat.h \
        proc/wchan.c \
        proc/wchan.h \
        proc/uptime.c \
-       proc/uptime.h \
        proc/xtra-procps-debug.h
 
 proc_libprocps_la_includedir = $(includedir)/procps/
 proc_libprocps_la_include_HEADERS = \
        proc/diskstats.h \
        proc/meminfo.h \
-       proc/namespace.h \
+       proc/misc.h \
        proc/pids.h \
        proc/slabinfo.h \
        proc/stat.h \
-       proc/sysinfo.h \
-       proc/uptime.h \
-       proc/version.h \
        proc/vmstat.h \
        proc/xtra-procps-debug.h
 
diff --git a/pgrep.c b/pgrep.c
index c0ebc558e1e4bcb360c2490bc4b7e7299b5fc2d8..049a9d2ed8973b0c8f81d2ed5a097788c4ae7966 100644 (file)
--- a/pgrep.c
+++ b/pgrep.c
@@ -55,9 +55,8 @@
 #include "signals.h"
 #include "xalloc.h"
 
-#include <proc/namespace.h>
+#include <proc/misc.h>
 #include <proc/pids.h>
-#include <proc/uptime.h>
 
 enum pids_item Items[] = {
     PIDS_ID_PID,
@@ -432,9 +431,9 @@ static int match_strlist (const char *restrict value, const struct el *restrict
 }
 
 static int match_ns (const int pid,
-                     const struct procps_namespaces *match_ns)
+                     const struct procps_ns *match_ns)
 {
-    struct procps_namespaces proc_ns;
+    struct procps_ns proc_ns;
     int found = 1;
     int i;
 
@@ -534,7 +533,7 @@ static struct el * select_procs (int *num)
 #define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, stack, info)
 #define PIDS_GETSCH(e) PIDS_VAL(EU_ ## e, s_ch, stack, info)
     struct pids_info *info=NULL;
-    struct procps_namespaces nsp;
+    struct procps_ns nsp;
     struct pids_stack *stack;
     unsigned long long saved_start_time;      /* for new/old support */
     int saved_pid = 0;                        /* for new/old support */
index b8110c7c8644a0d134709e2365afd91f6134a1ce..5e2f2594246ecc323ab171f30c2fbf7f8ea35b93 100644 (file)
@@ -24,7 +24,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "version.h"
+#include "misc.h"
 #include "devname.h"
 
 // This is the buffer size for a tty name. Any path is legal,
index 59079dab0429f206d0cde25f0f872240dc91db31..4ea7c40409f50fb59dc50cc454df3801bb15bba9 100644 (file)
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include <proc/namespace.h>
+#include <proc/misc.h>
 #include "proc/procps-private.h"
 
 #define NSPATHLEN 64
@@ -81,7 +81,7 @@ PROCPS_EXPORT int procps_ns_get_id(const char *name)
  *
  * Find all namespaces for the given process.
  * @pid: Process ID for required process
- * @nsp: Pointer to the struct procps_namespaces
+ * @nsp: Pointer to the struct procps_ns
  *
  * Returns:
  *   0 on success
@@ -89,7 +89,7 @@ PROCPS_EXPORT int procps_ns_get_id(const char *name)
  */
 PROCPS_EXPORT int procps_ns_read_pid(
         const int pid,
-        struct procps_namespaces *nsp)
+        struct procps_ns *nsp)
 {
     char path[NSPATHLEN+1];
     struct stat st;
index 50b27d27d3313ebec70a27e72c0f59a91804f750..de8fefb09975cddeacf0df37197448e48be30162 100644 (file)
 #include <sys/types.h>
 
 #include <proc/devname.h>
+#include <proc/misc.h>
 #include <proc/numa.h>
 #include <proc/readproc.h>
-#include <proc/sysinfo.h>
-#include <proc/uptime.h>
 #include <proc/wchan.h>
 
 #include <proc/procps-private.h>
index 249853b2d743ae56dee1f3bb6423938bccd6ae88..0819629bbc735d3813de592be409128871c4ef3c 100644 (file)
 
 #include "devname.h"
 #include "escape.h"
-#include "namespace.h"
+#include "misc.h"
 #include "pwcache.h"
 #include "readproc.h"
-#include "version.h"
 
 // sometimes it's easier to do this manually, w/o gcc helping
 #ifdef PROF
index 51e64d170f020c6eb9fbd0e626b78d89a9f4875d..17cf348da45e3a5a1618e4d722969670460e2cbf 100644 (file)
@@ -13,7 +13,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <unistd.h>
-#include <proc/namespace.h>
+#include <proc/misc.h>
 
 // the following is development only, forcing display of "[ duplicate ENUM ]" strings
 // #define FALSE_THREADS        /* set most child string fields to NULL */
@@ -141,7 +141,7 @@ typedef struct proc_t {
     int
         oom_score,      // oom_score       (badness for OOM killer)
         oom_adj;        // oom_adj         (adjustment to OOM score)
-    struct procps_namespaces ns; // (ns subdir)     inode number of namespaces
+    struct procps_ns ns; // (ns subdir)     inode number of namespaces
     char
         *sd_mach,       // n/a             systemd vm/container name
         *sd_ouid,       // n/a             systemd session owner uid
index e20c2fbc416402227f369404ff8d6e955718fd9c..79ba6e5c20b56c712ab2d6b7600d78638395df1a 100644 (file)
@@ -32,8 +32,7 @@
 #ifdef __CYGWIN__
 #include <sys/param.h>
 #endif
-#include "version.h"
-#include "sysinfo.h" /* include self to verify prototypes */
+#include "misc.h"
 #include "procps-private.h"
 
 
index 4ac052a10a0bcb663ba638ecb417361e905a4207..3ee68046cd550ae5cde5f780a53787500cfcf436 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <proc/namespace.h>
+#include <proc/misc.h>
 #include "tests.h"
 
 int check_name_minus(void *data)
index 80f627d3df5f7f7be5f6e29439970bd65c50edb5..b3dabcf27414eb0bec0e09876d114333320f84ff 100644 (file)
@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <proc/sysinfo.h>
+#include <proc/misc.h>
 #include "tests.h"
 
 int check_hertz(void *data)
index f9799116903d174da33d2fb82b498df1af3f9b8f..261ecb82ee0a5b07b08973541da99f3e8e35867c 100644 (file)
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <proc/uptime.h>
+#include <proc/misc.h>
 #include "tests.h"
 
 int check_uptime(void *data)
index caa0677555ba18f91e3c10d909987c4926ed3f38..8efc1790531ff9f7e721d7430275f260e8445ed5 100644 (file)
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <proc/version.h>
+#include <proc/misc.h>
 #include "tests.h"
 
 int check_linux_version(void *data)
index fc714d8e8b58a849af508bd7c3a311e7bb5bb570..59bd2087fd9ea1ccbef386a975606860e0800fab 100644 (file)
@@ -31,8 +31,7 @@
 #include <unistd.h>
 #include <utmp.h>
 
-#include <proc/uptime.h>
-#include <proc/sysinfo.h>
+#include <proc/misc.h>
 #include "procps-private.h"
 
 #define UPTIME_FILE "/proc/uptime"
index 612e31a07acc4649529a7c042b7bf828f41701de..fdcf2036d651958abd76f6fe9ff3fcc3843837ee 100644 (file)
@@ -22,8 +22,8 @@
  */
 #include <errno.h>
 #include <stdio.h>
+#include "misc.h"
 #include "procps-private.h"
-#include "version.h"
 
 #define PROCFS_OSRELEASE "/proc/sys/kernel/osrelease"
 
index 9511c32c371a595d516e1c1e9de484c0671d8e24..75be2aa3695f760345ca085c2789e4ef0d048a3a 100644 (file)
@@ -14,9 +14,9 @@
 
 #include "../include/nls.h"
 #include <proc/meminfo.h>
+#include <proc/misc.h>
 #include <proc/pids.h>
 #include <proc/stat.h>
-#include <proc/sysinfo.h>
 
 // --- <pids> interface begin ||||||||||||||||||||||||||||||||||||||||||||
 // -----------------------------------------------------------------------
index f507d0f675bdea34b371e2c48758cc185cd297a0..da1783d6a9f803a25e4a37847633bf544710c136 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <sys/types.h>
 
-#include "../proc/sysinfo.h"
+#include "../proc/misc.h"
 #include "../include/xalloc.h"
 
 #include "common.h"
diff --git a/skill.c b/skill.c
index 83b2fb166fef8b6dab9577de01f6743f8c89621b..efc23eef205946cd7e584ccfea8f9a75d030641f 100644 (file)
--- a/skill.c
+++ b/skill.c
@@ -42,7 +42,7 @@
 #include "xalloc.h"
 #include "rpmatch.h"
 
-#include <proc/namespace.h>
+#include <proc/misc.h>
 #include <proc/pids.h>
 
 #define DEFAULT_NICE 4
@@ -62,7 +62,7 @@ static const char **cmds;
 static int *pids;
 static char **namespaces;
 static int ns_pid;
-static struct procps_namespaces match_namespaces;
+static struct procps_ns match_namespaces;
 static int ns_flags = 0x3f;
 
 #define ENLIST(thing,addme) do{ \
@@ -149,7 +149,7 @@ static int match_strlist(const char *value, const int len, const char **list)
 
 static int match_ns(const int pid)
 {
-    struct procps_namespaces proc_ns;
+    struct procps_ns proc_ns;
     int found = 1;
     int i;
 
diff --git a/tload.c b/tload.c
index eca9ef6c0ce444a36508785328529471b5dd2d5b..279b4b53e49a73ba07a9cc179f02a5ac745bce49 100644 (file)
--- a/tload.c
+++ b/tload.c
@@ -43,7 +43,7 @@
 #include "strutils.h"
 #include "xalloc.h"
 
-#include <proc/sysinfo.h>
+#include <proc/misc.h>
 
 static char *screen;
 
index a2054f8330329c71c5513c621153ae28e9be828e..9eb8cbdf4160db014c6c1ddee839480e19c1277d 100644 (file)
--- a/top/top.c
+++ b/top/top.c
 #include "../include/nls.h"
 
 #include <proc/meminfo.h>
+#include <proc/misc.h>
 #include <proc/pids.h>
 #include <proc/stat.h>
-#include <proc/sysinfo.h>
-#include <proc/uptime.h>
-#include <proc/version.h>
 
 #include "top.h"
 #include "top_nls.h"
index c5eaa3e7ea757db8a5b903efe30fa1489f34c920..621cb27b8510cd2cd207db811448f3d90afd9dab 100644 (file)
--- a/uptime.c
+++ b/uptime.c
@@ -28,7 +28,7 @@
 #include "fileutils.h"
 #include "nls.h"
 
-#include <proc/uptime.h>
+#include <proc/misc.h>
 
 static void print_uptime_since()
 {
index 269a5a4a4bfa3a3e29a9e039c38c7a9b1c2ad0fe..960d03b21d80ececf3e88ed0c0ea215c27d1af14 100644 (file)
--- a/vmstat.c
+++ b/vmstat.c
@@ -51,9 +51,9 @@
 
 #include <proc/diskstats.h>
 #include <proc/meminfo.h>
+#include <proc/misc.h>
 #include <proc/slabinfo.h>
 #include <proc/stat.h>
-#include <proc/sysinfo.h>
 #include <proc/vmstat.h>
 
 #define UNIT_B        1
diff --git a/w.c b/w.c
index 9c43bbd687bea3b2c54130de8ef64a0e3e0819aa..7813114a229d3a09495636624e9fdabbcb81d1c8 100644 (file)
--- a/w.c
+++ b/w.c
@@ -54,9 +54,8 @@
 #include "fileutils.h"
 #include "nls.h"
 
+#include <proc/misc.h>
 #include <proc/pids.h>
-#include <proc/sysinfo.h>
-#include <proc/uptime.h>
 
 static int ignoreuser = 0;     /* for '-u' */
 static int oldstyle = 0;       /* for '-o' */