Rev 1757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1757 | Rev 1780 | ||
|---|---|---|---|
| Line 165... | Line 165... | ||
| 165 | } |
165 | } |
| 166 | panic("Not reached\n"); |
166 | panic("Not reached\n"); |
| 167 | return NULL; |
167 | return NULL; |
| 168 | } |
168 | } |
| 169 | 169 | ||
| 170 | void sysinfo_set_item_val(const char *name, sysinfo_item_t **root, __native val) |
170 | void sysinfo_set_item_val(const char *name, sysinfo_item_t **root, unative_t val) |
| 171 | { |
171 | { |
| 172 | if (root == NULL) |
172 | if (root == NULL) |
| 173 | root = &_root; |
173 | root = &_root; |
| 174 | 174 | ||
| 175 | /* If already created create only returns pointer |
175 | /* If already created create only returns pointer |
| Line 220... | Line 220... | ||
| 220 | 220 | ||
| 221 | root = *proot; |
221 | root = *proot; |
| 222 | 222 | ||
| 223 | while (root != NULL) { |
223 | while (root != NULL) { |
| 224 | int i; |
224 | int i; |
| 225 | __native val = 0; |
225 | unative_t val = 0; |
| 226 | char *vtype = NULL; |
226 | char *vtype = NULL; |
| 227 | 227 | ||
| 228 | 228 | ||
| 229 | for (i = 0; i < depth; i++) |
229 | for (i = 0; i < depth; i++) |
| 230 | printf(" "); |
230 | printf(" "); |
| Line 276... | Line 276... | ||
| 276 | ret.val = ((sysinfo_val_fn_t) (item->val.fn)) (item); |
276 | ret.val = ((sysinfo_val_fn_t) (item->val.fn)) (item); |
| 277 | } |
277 | } |
| 278 | return ret; |
278 | return ret; |
| 279 | } |
279 | } |
| 280 | 280 | ||
| 281 | __native sys_sysinfo_valid(__native ptr, __native len) |
281 | unative_t sys_sysinfo_valid(unative_t ptr, unative_t len) |
| 282 | { |
282 | { |
| 283 | char *str; |
283 | char *str; |
| 284 | sysinfo_rettype_t ret = {0, 0}; |
284 | sysinfo_rettype_t ret = {0, 0}; |
| 285 | str = malloc(len + 1, 0); |
285 | str = malloc(len + 1, 0); |
| 286 | 286 | ||
| Line 290... | Line 290... | ||
| 290 | 290 | ||
| 291 | free(str); |
291 | free(str); |
| 292 | return ret.valid; |
292 | return ret.valid; |
| 293 | } |
293 | } |
| 294 | 294 | ||
| 295 | __native sys_sysinfo_value(__native ptr, __native len) |
295 | unative_t sys_sysinfo_value(unative_t ptr, unative_t len) |
| 296 | { |
296 | { |
| 297 | char *str; |
297 | char *str; |
| 298 | sysinfo_rettype_t ret = {0, 0}; |
298 | sysinfo_rettype_t ret = {0, 0}; |
| 299 | str = malloc(len + 1, 0); |
299 | str = malloc(len + 1, 0); |
| 300 | 300 | ||