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>
struct slabnode_chain *chain,
int nodeid)
{
+ int rc;
+
if (info == NULL || chain == NULL || chain->head == NULL)
return -EINVAL;
+ if ((rc = procps_slabinfo_read(info)) < 0)
+ return rc;
+
return procps_slabnode_getchain(info, chain->head, nodeid);
}
for (i = 0; i < maxchains; i++) {
if (chains[i] == NULL)
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;
}