library: also include a 'read' for slabnode_chain_fill
While meminfo does implement only the singular version of 'xxxx_chain_fill', it was wrong to limit the 'read' to the plural version (only) within our new slabs API. This kind of inconsistency will only spell trouble for future users of the new libprocps API. So, this commit will mean that any form of xxxx_chain(s)_fill function also includes a 'read', whereas xxx_getchain does not. Reference(s): commit aab537bc1333b9ca57eaeec073b51af12f9280f8 http://www.freelists.org/post/procps/newlib-interfaces Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
74cb6afcc9
commit
9d1073a22a
@ -565,9 +565,14 @@ PROCPS_EXPORT int procps_slabnode_chain_fill (
|
|||||||
struct slabnode_chain *chain,
|
struct slabnode_chain *chain,
|
||||||
int nodeid)
|
int nodeid)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (info == NULL || chain == NULL || chain->head == NULL)
|
if (info == NULL || chain == NULL || chain->head == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if ((rc = procps_slabinfo_read(info)) < 0)
|
||||||
|
return rc;
|
||||||
|
|
||||||
return procps_slabnode_getchain(info, chain->head, nodeid);
|
return procps_slabnode_getchain(info, chain->head, nodeid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,7 +614,7 @@ PROCPS_EXPORT int procps_slabnode_chains_fill (
|
|||||||
for (i = 0; i < maxchains; i++) {
|
for (i = 0; i < maxchains; i++) {
|
||||||
if (chains[i] == NULL)
|
if (chains[i] == NULL)
|
||||||
break;
|
break;
|
||||||
if ((rc = procps_slabnode_chain_fill(info, chains[i], i) < 0))
|
if ((rc = procps_slabnode_getchain(info, chains[i]->head, i) < 0))
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user