library: rework namespace calls

Functions related to namespaces were half-in half-out of the
procps library and didn't fit the standard naming scheme.

While struct { long ns[x]} is a bit clunky, its the only way
to "lock in" x. The alternative is to use ns_* variables.

This work was needed before pgrep could be converted.
This commit is contained in:
Craig Small
2015-09-03 22:32:19 +10:00
parent d9caf0980e
commit a61f78d6e0
16 changed files with 297 additions and 134 deletions

View File

@ -2,7 +2,6 @@ dist_noinst_HEADERS = \
c.h \
fileutils.h \
nls.h \
nsutils.h \
rpmatch.h \
signals.h \
strutils.h \

View File

@ -1,7 +0,0 @@
#ifndef PROCPS_NG_NSUTILS
#define PROCPS_NG_NSUTILS
#include "proc/readproc.h"
int ns_read(pid_t pid, proc_t *ns_task);
#endif