From f82ac70e1368e5657be18746c5f0e1251266eee9 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sat, 31 Dec 2016 00:00:00 -0600 Subject: [PATCH] library : make read function name consistent For each of those interfaces employing a priming read, all the other 'read' functions begin with the module's name except this guy which began with 'read_slabinfo'. Now, they'll all begin with their module name then end the same with a '_read_failed' boolean hinting suffix. Signed-off-by: Jim Warner --- proc/slabinfo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/proc/slabinfo.c b/proc/slabinfo.c index 4dd28b85..44b78f22 100644 --- a/proc/slabinfo.c +++ b/proc/slabinfo.c @@ -454,14 +454,14 @@ static int parse_slabinfo20 ( } // end: parse_slabinfo20 -/* read_slabinfo_failed(): +/* slabinfo_read_failed(): * * Read the data out of /proc/slabinfo putting the information * into the supplied info container * * Returns: 0 on success, negative on error */ -static int read_slabinfo_failed ( +static int slabinfo_read_failed ( struct slabinfo_info *info) { char line[SLABINFO_LINE_LEN]; @@ -495,7 +495,7 @@ static int read_slabinfo_failed ( return -ERANGE; return retval; -} // end: read_slabinfo_failed +} // end: slabinfo_read_failed // ___ Private Functions |||||||||||||||||||||||||||||||||||||||||||||||||||||| @@ -811,7 +811,7 @@ PROCPS_EXPORT int procps_slabinfo_new ( 1) see if that caller's permissions were sufficient (root) | 2) make delta results potentially useful, even if 1st time | 3) elimnate need for history distortions 1st time 'switch' | */ - if ((rc = read_slabinfo_failed(p))) { + if ((rc = slabinfo_read_failed(p))) { procps_slabinfo_unref(&p); return rc; } @@ -888,7 +888,7 @@ PROCPS_EXPORT struct slabinfo_result *procps_slabinfo_get ( a granularity of 1 second between reads ... */ cur_secs = time(NULL); if (1 <= cur_secs - sav_secs) { - if (read_slabinfo_failed(info)) + if (slabinfo_read_failed(info)) return NULL; sav_secs = cur_secs; } @@ -924,7 +924,7 @@ PROCPS_EXPORT struct slabinfo_reap *procps_slabinfo_reap ( if (info->fetch_ext.dirty_stacks) slabinfo_cleanup_stacks_all(&info->fetch_ext); - if (read_slabinfo_failed(info)) + if (slabinfo_read_failed(info)) return NULL; slabinfo_stacks_fetch(info); info->fetch_ext.dirty_stacks = 1; @@ -958,7 +958,7 @@ PROCPS_EXPORT struct slabinfo_stack *procps_slabinfo_select ( if (info->select_ext.dirty_stacks) slabinfo_cleanup_stacks_all(&info->select_ext); - if (read_slabinfo_failed(info)) + if (slabinfo_read_failed(info)) return NULL; slabinfo_assign_results(info->select_ext.extents->stacks[0], &info->slabs, &info->nul_node); info->select_ext.dirty_stacks = 1;