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:
Jim Warner
2021-01-19 00:00:00 -06:00
committed by Craig Small
parent 1fdd7d4966
commit 423297c9db
23 changed files with 32 additions and 46 deletions

View 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,

View 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;

View File

@ -36,10 +36,9 @@
#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>

View File

@ -38,10 +38,9 @@
#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

View 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

View 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"

View 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)

View 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)

View 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)

View 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)

View 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"

View 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"