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:
12
proc/pids.c
12
proc/pids.c
@@ -172,12 +172,12 @@ REG_set(MEM_VIRT, sl_int, size)
|
||||
CVT_set(MEM_VIRT_KIB, ul_int, size)
|
||||
REG_set(NICE, sl_int, nice)
|
||||
REG_set(NLWP, s_int, nlwp)
|
||||
REG_set(NS_IPC, ul_int, ns[0])
|
||||
REG_set(NS_MNT, ul_int, ns[1])
|
||||
REG_set(NS_NET, ul_int, ns[2])
|
||||
REG_set(NS_PID, ul_int, ns[3])
|
||||
REG_set(NS_USER, ul_int, ns[4])
|
||||
REG_set(NS_UTS, ul_int, ns[5])
|
||||
REG_set(NS_IPC, ul_int, ns.ns[0])
|
||||
REG_set(NS_MNT, ul_int, ns.ns[1])
|
||||
REG_set(NS_NET, ul_int, ns.ns[2])
|
||||
REG_set(NS_PID, ul_int, ns.ns[3])
|
||||
REG_set(NS_USER, ul_int, ns.ns[4])
|
||||
REG_set(NS_UTS, ul_int, ns.ns[5])
|
||||
REG_set(OOM_ADJ, s_int, oom_adj)
|
||||
REG_set(OOM_SCORE, s_int, oom_score)
|
||||
REG_set(PRIORITY, s_int, priority)
|
||||
|
Reference in New Issue
Block a user