library: ensure 'namespace' types treated consistently
Unlike the ps kludge under the master branch to ensure
that namespaces appear the same under both 32 & 64-bit
models, this newlib branch already used a proper type.
However source data still carried the original type as
'signed long' versus that more proper 'unsigned long'.
So, this patch makes sources & destinations identical.
Reference(s):
. master branch ps kludge
commit c41c614b0c
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
66e8e2723d
commit
12e070dd5f
@ -103,7 +103,7 @@ PROCPS_EXPORT int procps_ns_read_pid(
|
||||
for (i=0; i < PROCPS_NS_COUNT; i++) {
|
||||
snprintf(path, NSPATHLEN, "/proc/%d/ns/%s", pid, ns_names[i]);
|
||||
if (0 == stat(path, &st))
|
||||
nsp->ns[i] = (long)st.st_ino;
|
||||
nsp->ns[i] = (unsigned long)st.st_ino;
|
||||
else
|
||||
nsp->ns[i] = 0;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ enum namespace_type {
|
||||
};
|
||||
|
||||
struct procps_namespaces {
|
||||
long ns[PROCPS_NS_COUNT];
|
||||
unsigned long ns[PROCPS_NS_COUNT];
|
||||
};
|
||||
|
||||
const char *procps_ns_get_name(const int id);
|
||||
|
Loading…
Reference in New Issue
Block a user