2 #include "../ds/store.h"
6 PRIVATE
struct data_store ds_store
[NR_DS_KEYS
];
8 PUBLIC
void data_store_dmp()
11 static int prev_i
= 0;
14 if((r
=getsysinfo(DS_PROC_NR
, SI_DATA_STORE
, ds_store
)) != OK
) {
15 printf("Couldn't talk to DS: %d.\n", r
);
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 %9u/%3u\n", "MAP", p
->u
.map
.length
,
42 printf("%-10s %12u\n", "LABEL", p
->u
.u32
);
51 if (i
>= NR_DS_KEYS
) i
= 0;
52 else printf("--more--\r");