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