related: adapt to changes in 'context' structure names

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2016-07-21 00:00:00 -05:00 committed by Craig Small
parent 82d5661603
commit d7cbf3448f
13 changed files with 30 additions and 29 deletions

2
free.c
View File

@ -203,7 +203,7 @@ int main(int argc, char **argv)
{
int c, flags = 0, unit_set = 0;
struct commandline_arguments args;
struct procps_meminfo *mem_info = NULL;
struct meminfo_info *mem_info = NULL;
/*
* For long options that have no equivalent short option, use a

View File

@ -474,7 +474,7 @@ static struct el * select_procs (int *num)
#define PIDS_GETINT(e) PROCPS_PIDS_VAL(EU_ ## e, s_int, stack)
#define PIDS_GETULL(e) PROCPS_PIDS_VAL(EU_ ## e, ull_int, stack)
#define PIDS_GETSTR(e) PROCPS_PIDS_VAL(EU_ ## e, str, stack)
struct procps_pidsinfo *info=NULL;
struct pids_info *info=NULL;
struct procps_namespaces nsp;
struct pids_stack *stack;
unsigned long long saved_start_time; /* for new/old support */

View File

@ -132,7 +132,7 @@ static void select_procs (void)
{
enum pids_item items[] = { PROCPS_PIDS_ID_PID, PROCPS_PIDS_CMD, PROCPS_PIDS_CMDLINE_V };
enum rel_items { rel_pid, rel_cmd, rel_cmdline };
struct procps_pidsinfo *info = NULL;
struct pids_info *info = NULL;
struct pids_stack *stack;
int match;
static int size = 0;

2
pmap.c
View File

@ -995,7 +995,7 @@ static char *get_default_rc_filename(void)
int main(int argc, char **argv)
{
struct procps_pidsinfo *info = NULL;
struct pids_info *info = NULL;
struct pids_fetch *pids_fetch;
unsigned *pidlist;
int reap_count, user_count;

View File

@ -33,14 +33,14 @@ int check_pids_new_nullinfo(void *data)
int check_pids_new_toomany(void *data)
{
struct procps_pidsinfo *info;
struct pids_info *info;
testname = "procps_pids_new() too many items returns -EINVAL";
return (procps_pids_new(&info, items, 1) == -EINVAL);
}
int check_pids_new_and_unref(void *data)
{
struct procps_pidsinfo *info = NULL;
struct pids_info *info = NULL;
testname = "procps_pids new then unref";
return ( (procps_pids_new(&info, items, 2) == 0) &&
(procps_pids_unref(&info) == 0) &&

View File

@ -59,7 +59,7 @@
return 0; \
} }
extern struct procps_pidsinfo *Pids_info;
extern struct pids_info *Pids_info;
extern enum pids_item *Pids_items;
extern int Pids_index;

View File

@ -48,7 +48,7 @@
// --- <pids> interface begin ||||||||||||||||||||||||||||||||||||||||||||
// -----------------------------------------------------------------------
struct procps_pidsinfo *Pids_info = NULL; // our required <pids> context
struct pids_info *Pids_info = NULL; // our required <pids> context
enum pids_item *Pids_items; // allocated as PIDSITEMS
int Pids_index; // actual number of active enums

View File

@ -91,7 +91,7 @@ extern long Hertz;
static void get_boot_time(void)
{
struct procps_statinfo *stat_info = NULL;
struct stat_info *stat_info = NULL;
if (procps_stat_new(&stat_info) < 0)
xerrx(EXIT_FAILURE, _("Unable to create NEW ystem stat structure"));
boot_time = PROCPS_STAT_GET(stat_info, PROCPS_STAT_SYS_TIME_OF_BOOT, ul_int);
@ -100,7 +100,7 @@ static void get_boot_time(void)
static void get_memory_total()
{
struct procps_meminfo *mem_info = NULL;
struct meminfo_info *mem_info = NULL;
if (procps_meminfo_new(&mem_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to create meminfo structure"));

View File

@ -264,7 +264,7 @@ static void scan_procs(struct run_time_conf_t *run_time)
{
#define PIDS_GETINT(e) PROCPS_PIDS_VAL(EU_ ## e, s_int, reap->stacks[i])
#define PIDS_GETSTR(e) PROCPS_PIDS_VAL(EU_ ## e, str, reap->stacks[i])
struct procps_pidsinfo *info=NULL;
struct pids_info *info=NULL;
struct pids_fetch *reap;
int i, total_procs;

View File

@ -53,7 +53,7 @@ static struct termios Saved_tty;
static long Delay = 3;
static int Run_once = 0;
static struct procps_slabinfo *Slab_info;
static struct slabinfo_info *Slab_info;
enum slabinfo_item Sort_item = DEFAULT_SORT;
enum slabinfo_sort_order Sort_Order = PROCPS_SLABINFO_DESCEND;

View File

@ -198,7 +198,7 @@ static const char Graph_bars[] = "||||||||||||||||||||||||||||||||||||||||||||||
/* Support for the new library API -- acquired (if necessary)
at program startup and referenced throughout our lifetime. */
// --- <proc/meminfo.h> -----------------------------------------------
static struct procps_meminfo *Mem_ctx;
static struct meminfo_info *Mem_ctx;
static struct meminfo_stack *Mem_stack;
static enum meminfo_item Mem_items[] = {
PROCPS_MEMINFO_MEM_FREE, PROCPS_MEMINFO_MEM_USED, PROCPS_MEMINFO_MEM_TOTAL,
@ -210,7 +210,7 @@ enum Rel_memitems {
// mem stack results extractor macro, where e=rel enum
#define MEM_VAL(e) PROCPS_MEMINFO_VAL(e, ul_int, Mem_stack)
// --- <proc/pids.h> --------------------------------------------------
static struct procps_pidsinfo *Pids_ctx;
static struct pids_info *Pids_ctx;
static int Pids_itms_cur; // 'current' max (<= Fieldstab)
static enum pids_item *Pids_itms; // allocated as MAXTBL(Fieldstab)
static struct pids_fetch *Pids_reap; // for reap or select
@ -220,7 +220,7 @@ static struct pids_fetch *Pids_reap; // for reap or select
// ( but many functions use their own unique tailored version for access )
#define PID_VAL(e,t,s) PROCPS_PIDS_VAL(Fieldstab[ e ].erel, t, s)
// --- <proc/stat.h> --------------------------------------------------
static struct procps_statinfo *Stat_ctx;
static struct stat_info *Stat_ctx;
static struct stat_reaped *Stat_reap;
static enum stat_item Stat_items[] = {
PROCPS_STAT_TIC_ID, PROCPS_STAT_TIC_NUMA_NODE,

View File

@ -345,16 +345,17 @@ static void new_format(void)
struct tm *tm_ptr;
time_t the_time;
char timebuf[32];
struct procps_vmstat *vm_info = NULL;
struct procps_statinfo *sys_info = NULL;
struct vmstat_info *vm_info = NULL;
struct stat_info *sys_info = NULL;
struct stat_stack *stat_stack;
struct procps_meminfo *mem_info = NULL;
struct meminfo_info *mem_info = NULL;
struct meminfo_stack *mem_stack;
sleep_half = (sleep_time / 2);
hz = procps_hertz_get();
new_header();
if (procps_vmstat_new(&vm_info) < 0)
xerrx(EXIT_FAILURE, _("Unable to create vmstat structure"));
if (procps_stat_new(&sys_info) < 0)
@ -529,7 +530,7 @@ static void diskpartition_header(const char *partition_name)
static void diskpartition_format(const char *partition_name)
{
#define partVAL(x) PROCPS_DISKSTATS_VAL(x, ul_int, stack)
struct procps_diskstats *disk_stat;
struct diskstats_info *disk_stat;
struct diskstats_stack *stack;
struct diskstats_result *got;
const char format[] = "%20lu %10lu %10lu %10lu\n";
@ -627,7 +628,7 @@ static void diskheader(void)
static void diskformat(void)
{
#define diskVAL(e,t) PROCPS_DISKSTATS_VAL(e, t, reap->stacks[j])
struct procps_diskstats *disk_stat;
struct diskstats_info *disk_stat;
struct diskstats_reap *reap;
int i, j;
time_t the_time;
@ -703,7 +704,7 @@ static void slabheader(void)
static void slabformat (void)
{
#define MAX_ITEMS (int)(sizeof(node_items) / sizeof(node_items[0]))
struct procps_slabinfo *slab_info;
struct slabinfo_info *slab_info;
struct slabinfo_reap *reaped;
int i, j;
enum slabinfo_item node_items[] = {
@ -746,7 +747,7 @@ static void slabformat (void)
static void disksum_format(void)
{
#define diskVAL(e,t) PROCPS_DISKSTATS_VAL(e, t, reap->stacks[j])
struct procps_diskstats *disk_stat;
struct diskstats_info *disk_stat;
struct diskstats_reap *reap;
int j, disk_count, part_count;
unsigned long reads, merged_reads, read_sectors, milli_reading, writes,
@ -807,9 +808,9 @@ static void sum_format(void)
#define TICv(E) PROCPS_STAT_VAL(E, ull_int, stat_stack)
#define SYSv(E) PROCPS_STAT_VAL(E, ul_int, stat_stack)
#define MEMv(E) unitConvert(PROCPS_STAT_VAL(E, ul_int, mem_stack))
struct procps_statinfo *sys_info = NULL;
struct procps_vmstat *vm_info = NULL;
struct procps_meminfo *mem_info = NULL;
struct stat_info *sys_info = NULL;
struct vmstat_info *vm_info = NULL;
struct meminfo_info *mem_info = NULL;
struct stat_stack *stat_stack;
struct meminfo_stack *mem_stack;
@ -864,7 +865,7 @@ static void sum_format(void)
static void fork_format(void)
{
struct procps_statinfo *sys_info = NULL;
struct stat_info *sys_info = NULL;
if (procps_stat_new(&sys_info) < 0)
xerrx(EXIT_FAILURE, _("Unable to create system stat structure"));

2
w.c
View File

@ -352,7 +352,7 @@ static int find_best_proc(
unsigned long long best_time = 0;
unsigned long long secondbest_time = 0;
struct procps_pidsinfo *info=NULL;
struct pids_info *info=NULL;
struct pids_fetch *reap;
enum pids_item items[] = {
PROCPS_PIDS_ID_TGID,