all: make buildable again for new 'misc.h' header file
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>
This commit is contained in:
parent
1fdd7d4966
commit
423297c9db
@ -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
|
number as the macro `LINUX_VERSION_CODE` for which the kernel /proc fs
|
||||||
code was compiled.
|
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.
|
components, e.g.
|
||||||
> if (linux_version_code < LINUX_VERSION(2,5,41))
|
> if (linux_version_code < LINUX_VERSION(2,5,41))
|
||||||
> /* blah blah blah */
|
> /* blah blah blah */
|
||||||
|
10
Makefile.am
10
Makefile.am
@ -253,8 +253,8 @@ proc_libprocps_la_SOURCES = \
|
|||||||
proc/procps-private.h \
|
proc/procps-private.h \
|
||||||
proc/meminfo.c \
|
proc/meminfo.c \
|
||||||
proc/meminfo.h \
|
proc/meminfo.h \
|
||||||
|
proc/misc.h \
|
||||||
proc/namespace.c \
|
proc/namespace.c \
|
||||||
proc/namespace.h \
|
|
||||||
proc/numa.c \
|
proc/numa.c \
|
||||||
proc/numa.h \
|
proc/numa.h \
|
||||||
proc/pids.c \
|
proc/pids.c \
|
||||||
@ -268,28 +268,22 @@ proc_libprocps_la_SOURCES = \
|
|||||||
proc/stat.c \
|
proc/stat.c \
|
||||||
proc/stat.h \
|
proc/stat.h \
|
||||||
proc/sysinfo.c \
|
proc/sysinfo.c \
|
||||||
proc/sysinfo.h \
|
|
||||||
proc/version.c \
|
proc/version.c \
|
||||||
proc/version.h \
|
|
||||||
proc/vmstat.c \
|
proc/vmstat.c \
|
||||||
proc/vmstat.h \
|
proc/vmstat.h \
|
||||||
proc/wchan.c \
|
proc/wchan.c \
|
||||||
proc/wchan.h \
|
proc/wchan.h \
|
||||||
proc/uptime.c \
|
proc/uptime.c \
|
||||||
proc/uptime.h \
|
|
||||||
proc/xtra-procps-debug.h
|
proc/xtra-procps-debug.h
|
||||||
|
|
||||||
proc_libprocps_la_includedir = $(includedir)/procps/
|
proc_libprocps_la_includedir = $(includedir)/procps/
|
||||||
proc_libprocps_la_include_HEADERS = \
|
proc_libprocps_la_include_HEADERS = \
|
||||||
proc/diskstats.h \
|
proc/diskstats.h \
|
||||||
proc/meminfo.h \
|
proc/meminfo.h \
|
||||||
proc/namespace.h \
|
proc/misc.h \
|
||||||
proc/pids.h \
|
proc/pids.h \
|
||||||
proc/slabinfo.h \
|
proc/slabinfo.h \
|
||||||
proc/stat.h \
|
proc/stat.h \
|
||||||
proc/sysinfo.h \
|
|
||||||
proc/uptime.h \
|
|
||||||
proc/version.h \
|
|
||||||
proc/vmstat.h \
|
proc/vmstat.h \
|
||||||
proc/xtra-procps-debug.h
|
proc/xtra-procps-debug.h
|
||||||
|
|
||||||
|
9
pgrep.c
9
pgrep.c
@ -55,9 +55,8 @@
|
|||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
#include <proc/namespace.h>
|
#include <proc/misc.h>
|
||||||
#include <proc/pids.h>
|
#include <proc/pids.h>
|
||||||
#include <proc/uptime.h>
|
|
||||||
|
|
||||||
enum pids_item Items[] = {
|
enum pids_item Items[] = {
|
||||||
PIDS_ID_PID,
|
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,
|
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 found = 1;
|
||||||
int i;
|
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_GETSTR(e) PIDS_VAL(EU_ ## e, str, stack, info)
|
||||||
#define PIDS_GETSCH(e) PIDS_VAL(EU_ ## e, s_ch, stack, info)
|
#define PIDS_GETSCH(e) PIDS_VAL(EU_ ## e, s_ch, stack, info)
|
||||||
struct pids_info *info=NULL;
|
struct pids_info *info=NULL;
|
||||||
struct procps_namespaces nsp;
|
struct procps_ns nsp;
|
||||||
struct pids_stack *stack;
|
struct pids_stack *stack;
|
||||||
unsigned long long saved_start_time; /* for new/old support */
|
unsigned long long saved_start_time; /* for new/old support */
|
||||||
int saved_pid = 0; /* for new/old support */
|
int saved_pid = 0; /* for new/old support */
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "version.h"
|
#include "misc.h"
|
||||||
#include "devname.h"
|
#include "devname.h"
|
||||||
|
|
||||||
// This is the buffer size for a tty name. Any path is legal,
|
// This is the buffer size for a tty name. Any path is legal,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include <proc/namespace.h>
|
#include <proc/misc.h>
|
||||||
#include "proc/procps-private.h"
|
#include "proc/procps-private.h"
|
||||||
|
|
||||||
#define NSPATHLEN 64
|
#define NSPATHLEN 64
|
||||||
@ -81,7 +81,7 @@ PROCPS_EXPORT int procps_ns_get_id(const char *name)
|
|||||||
*
|
*
|
||||||
* Find all namespaces for the given process.
|
* Find all namespaces for the given process.
|
||||||
* @pid: Process ID for required process
|
* @pid: Process ID for required process
|
||||||
* @nsp: Pointer to the struct procps_namespaces
|
* @nsp: Pointer to the struct procps_ns
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* 0 on success
|
* 0 on success
|
||||||
@ -89,7 +89,7 @@ PROCPS_EXPORT int procps_ns_get_id(const char *name)
|
|||||||
*/
|
*/
|
||||||
PROCPS_EXPORT int procps_ns_read_pid(
|
PROCPS_EXPORT int procps_ns_read_pid(
|
||||||
const int pid,
|
const int pid,
|
||||||
struct procps_namespaces *nsp)
|
struct procps_ns *nsp)
|
||||||
{
|
{
|
||||||
char path[NSPATHLEN+1];
|
char path[NSPATHLEN+1];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -36,10 +36,9 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <proc/devname.h>
|
#include <proc/devname.h>
|
||||||
|
#include <proc/misc.h>
|
||||||
#include <proc/numa.h>
|
#include <proc/numa.h>
|
||||||
#include <proc/readproc.h>
|
#include <proc/readproc.h>
|
||||||
#include <proc/sysinfo.h>
|
|
||||||
#include <proc/uptime.h>
|
|
||||||
#include <proc/wchan.h>
|
#include <proc/wchan.h>
|
||||||
|
|
||||||
#include <proc/procps-private.h>
|
#include <proc/procps-private.h>
|
||||||
|
@ -38,10 +38,9 @@
|
|||||||
|
|
||||||
#include "devname.h"
|
#include "devname.h"
|
||||||
#include "escape.h"
|
#include "escape.h"
|
||||||
#include "namespace.h"
|
#include "misc.h"
|
||||||
#include "pwcache.h"
|
#include "pwcache.h"
|
||||||
#include "readproc.h"
|
#include "readproc.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
// sometimes it's easier to do this manually, w/o gcc helping
|
// sometimes it's easier to do this manually, w/o gcc helping
|
||||||
#ifdef PROF
|
#ifdef PROF
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <proc/namespace.h>
|
#include <proc/misc.h>
|
||||||
|
|
||||||
// the following is development only, forcing display of "[ duplicate ENUM ]" strings
|
// the following is development only, forcing display of "[ duplicate ENUM ]" strings
|
||||||
// #define FALSE_THREADS /* set most child string fields to NULL */
|
// #define FALSE_THREADS /* set most child string fields to NULL */
|
||||||
@ -141,7 +141,7 @@ typedef struct proc_t {
|
|||||||
int
|
int
|
||||||
oom_score, // oom_score (badness for OOM killer)
|
oom_score, // oom_score (badness for OOM killer)
|
||||||
oom_adj; // oom_adj (adjustment to OOM score)
|
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
|
char
|
||||||
*sd_mach, // n/a systemd vm/container name
|
*sd_mach, // n/a systemd vm/container name
|
||||||
*sd_ouid, // n/a systemd session owner uid
|
*sd_ouid, // n/a systemd session owner uid
|
||||||
|
@ -32,8 +32,7 @@
|
|||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
#include "version.h"
|
#include "misc.h"
|
||||||
#include "sysinfo.h" /* include self to verify prototypes */
|
|
||||||
#include "procps-private.h"
|
#include "procps-private.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <proc/namespace.h>
|
#include <proc/misc.h>
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
|
|
||||||
int check_name_minus(void *data)
|
int check_name_minus(void *data)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <proc/sysinfo.h>
|
#include <proc/misc.h>
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
|
|
||||||
int check_hertz(void *data)
|
int check_hertz(void *data)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <proc/uptime.h>
|
#include <proc/misc.h>
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
|
|
||||||
int check_uptime(void *data)
|
int check_uptime(void *data)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <proc/version.h>
|
#include <proc/misc.h>
|
||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
|
|
||||||
int check_linux_version(void *data)
|
int check_linux_version(void *data)
|
||||||
|
@ -31,8 +31,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
|
|
||||||
#include <proc/uptime.h>
|
#include <proc/misc.h>
|
||||||
#include <proc/sysinfo.h>
|
|
||||||
#include "procps-private.h"
|
#include "procps-private.h"
|
||||||
|
|
||||||
#define UPTIME_FILE "/proc/uptime"
|
#define UPTIME_FILE "/proc/uptime"
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "misc.h"
|
||||||
#include "procps-private.h"
|
#include "procps-private.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
#define PROCFS_OSRELEASE "/proc/sys/kernel/osrelease"
|
#define PROCFS_OSRELEASE "/proc/sys/kernel/osrelease"
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
#include "../include/nls.h"
|
#include "../include/nls.h"
|
||||||
#include <proc/meminfo.h>
|
#include <proc/meminfo.h>
|
||||||
|
#include <proc/misc.h>
|
||||||
#include <proc/pids.h>
|
#include <proc/pids.h>
|
||||||
#include <proc/stat.h>
|
#include <proc/stat.h>
|
||||||
#include <proc/sysinfo.h>
|
|
||||||
|
|
||||||
// --- <pids> interface begin ||||||||||||||||||||||||||||||||||||||||||||
|
// --- <pids> interface begin ||||||||||||||||||||||||||||||||||||||||||||
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "../proc/sysinfo.h"
|
#include "../proc/misc.h"
|
||||||
#include "../include/xalloc.h"
|
#include "../include/xalloc.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
6
skill.c
6
skill.c
@ -42,7 +42,7 @@
|
|||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
#include "rpmatch.h"
|
#include "rpmatch.h"
|
||||||
|
|
||||||
#include <proc/namespace.h>
|
#include <proc/misc.h>
|
||||||
#include <proc/pids.h>
|
#include <proc/pids.h>
|
||||||
|
|
||||||
#define DEFAULT_NICE 4
|
#define DEFAULT_NICE 4
|
||||||
@ -62,7 +62,7 @@ static const char **cmds;
|
|||||||
static int *pids;
|
static int *pids;
|
||||||
static char **namespaces;
|
static char **namespaces;
|
||||||
static int ns_pid;
|
static int ns_pid;
|
||||||
static struct procps_namespaces match_namespaces;
|
static struct procps_ns match_namespaces;
|
||||||
static int ns_flags = 0x3f;
|
static int ns_flags = 0x3f;
|
||||||
|
|
||||||
#define ENLIST(thing,addme) do{ \
|
#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)
|
static int match_ns(const int pid)
|
||||||
{
|
{
|
||||||
struct procps_namespaces proc_ns;
|
struct procps_ns proc_ns;
|
||||||
int found = 1;
|
int found = 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
2
tload.c
2
tload.c
@ -43,7 +43,7 @@
|
|||||||
#include "strutils.h"
|
#include "strutils.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
#include <proc/sysinfo.h>
|
#include <proc/misc.h>
|
||||||
|
|
||||||
static char *screen;
|
static char *screen;
|
||||||
|
|
||||||
|
@ -49,11 +49,9 @@
|
|||||||
#include "../include/nls.h"
|
#include "../include/nls.h"
|
||||||
|
|
||||||
#include <proc/meminfo.h>
|
#include <proc/meminfo.h>
|
||||||
|
#include <proc/misc.h>
|
||||||
#include <proc/pids.h>
|
#include <proc/pids.h>
|
||||||
#include <proc/stat.h>
|
#include <proc/stat.h>
|
||||||
#include <proc/sysinfo.h>
|
|
||||||
#include <proc/uptime.h>
|
|
||||||
#include <proc/version.h>
|
|
||||||
|
|
||||||
#include "top.h"
|
#include "top.h"
|
||||||
#include "top_nls.h"
|
#include "top_nls.h"
|
||||||
|
2
uptime.c
2
uptime.c
@ -28,7 +28,7 @@
|
|||||||
#include "fileutils.h"
|
#include "fileutils.h"
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
|
|
||||||
#include <proc/uptime.h>
|
#include <proc/misc.h>
|
||||||
|
|
||||||
static void print_uptime_since()
|
static void print_uptime_since()
|
||||||
{
|
{
|
||||||
|
2
vmstat.c
2
vmstat.c
@ -51,9 +51,9 @@
|
|||||||
|
|
||||||
#include <proc/diskstats.h>
|
#include <proc/diskstats.h>
|
||||||
#include <proc/meminfo.h>
|
#include <proc/meminfo.h>
|
||||||
|
#include <proc/misc.h>
|
||||||
#include <proc/slabinfo.h>
|
#include <proc/slabinfo.h>
|
||||||
#include <proc/stat.h>
|
#include <proc/stat.h>
|
||||||
#include <proc/sysinfo.h>
|
|
||||||
#include <proc/vmstat.h>
|
#include <proc/vmstat.h>
|
||||||
|
|
||||||
#define UNIT_B 1
|
#define UNIT_B 1
|
||||||
|
3
w.c
3
w.c
@ -54,9 +54,8 @@
|
|||||||
#include "fileutils.h"
|
#include "fileutils.h"
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
|
|
||||||
|
#include <proc/misc.h>
|
||||||
#include <proc/pids.h>
|
#include <proc/pids.h>
|
||||||
#include <proc/sysinfo.h>
|
|
||||||
#include <proc/uptime.h>
|
|
||||||
|
|
||||||
static int ignoreuser = 0; /* for '-u' */
|
static int ignoreuser = 0; /* for '-u' */
|
||||||
static int oldstyle = 0; /* for '-o' */
|
static int oldstyle = 0; /* for '-o' */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user