Changeset 35a96cf in mainline for generic/src/sysinfo/sysinfo.c
- Timestamp:
- 2006-05-13T20:11:13Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6326f5e6
- Parents:
- 2666daa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/sysinfo/sysinfo.c
r2666daa r35a96cf 2 2 #include <mm/slab.h> 3 3 #include <print.h> 4 #include <syscall/copy.h> 4 5 5 6 sysinfo_item_t *_root=NULL; … … 221 222 return ret; 222 223 } 224 225 __native sys_sysinfo_valid(__native ptr,__native len) 226 { 227 char *str; 228 sysinfo_rettype_t ret; 229 str=malloc(len+1,0); 230 ASSERT(str); 231 copy_from_uspace(str,(void *)ptr,len+1); 232 if(str[len]) return 0; /*This is not len lenght C string*/ 233 ret=sysinfo_get_val(str,NULL); 234 free(str); 235 return ret.valid; 236 } 237 238 __native sys_sysinfo_value(__native ptr,__native len) 239 { 240 char *str; 241 sysinfo_rettype_t ret; 242 str=malloc(len+1,0); 243 ASSERT(str); 244 copy_from_uspace(str,(void *)ptr,len+1); 245 if(str[len]) return 0; /*This is not len lenght C string*/ 246 ret=sysinfo_get_val(str,NULL); 247 free(str); 248 return ret.val; 249 } 250 251
Note:
See TracChangeset
for help on using the changeset viewer.