2 #include "../ds/store.h"
6 static struct data_store noxfer_ds_store
[NR_DS_KEYS
];
12 static int prev_i
= 0;
15 if (getsysinfo(DS_PROC_NR
, SI_DATA_STORE
, noxfer_ds_store
, sizeof(noxfer_ds_store
)) != OK
) {
16 printf("Error obtaining table from DS. Perhaps recompile IS?\n");
20 printf("Data store contents:\n");
21 printf("-slot- -----------key----------- -----owner----- ---type--- ----value---\n");
22 for(i
= prev_i
; i
< NR_DS_KEYS
&& n
< LINES
; i
++) {
23 p
= &noxfer_ds_store
[i
];
24 if(!(p
->flags
& DSF_IN_USE
))
27 printf("%6d %-25s %-15s ", i
, p
->key
, p
->owner
);
28 switch(p
->flags
& DSF_MASK_TYPE
) {
30 printf("%-10s %12u\n", "U32", p
->u
.u32
);
33 printf("%-10s %12s\n", "STR", (char*) p
->u
.mem
.data
);
36 printf("%-10s %12zu\n", "MEM", p
->u
.mem
.length
);
39 printf("%-10s %12u\n", "LABEL", p
->u
.u32
);
48 if (i
>= NR_DS_KEYS
) i
= 0;
49 else printf("--more--\r");