Rev 1322 | Rev 1326 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1322 | Rev 1325 | ||
|---|---|---|---|
| Line 251... | Line 251... | ||
| 251 | } |
251 | } |
| 252 | 252 | ||
| 253 | __native sys_sysinfo_valid(__native ptr,__native len) |
253 | __native sys_sysinfo_valid(__native ptr,__native len) |
| 254 | { |
254 | { |
| 255 | char *str; |
255 | char *str; |
| 256 | sysinfo_rettype_t ret; |
256 | sysinfo_rettype_t ret={0,0}; |
| 257 | str=malloc(len+1,0); |
257 | str=malloc(len+1,0); |
| 258 | ASSERT(str); |
258 | ASSERT(str); |
| 259 | if(!((copy_from_uspace(str,(void *)ptr,len+1))||(str[len]))) |
259 | if(!((copy_from_uspace(str,(void *)ptr,len+1))||(str[len]))) |
| 260 | ret=sysinfo_get_val(str,NULL); |
260 | ret=sysinfo_get_val(str,NULL); |
| 261 | free(str); |
261 | free(str); |
| Line 263... | Line 263... | ||
| 263 | } |
263 | } |
| 264 | 264 | ||
| 265 | __native sys_sysinfo_value(__native ptr,__native len) |
265 | __native sys_sysinfo_value(__native ptr,__native len) |
| 266 | { |
266 | { |
| 267 | char *str; |
267 | char *str; |
| 268 | sysinfo_rettype_t ret; |
268 | sysinfo_rettype_t ret={0,0}; |
| 269 | str=malloc(len+1,0); |
269 | str=malloc(len+1,0); |
| 270 | ASSERT(str); |
270 | ASSERT(str); |
| 271 | if(!((copy_from_uspace(str,(void *)ptr,len+1))||(str[len]))) |
271 | if(!((copy_from_uspace(str,(void *)ptr,len+1))||(str[len]))) |
| 272 | ret=sysinfo_get_val(str,NULL); |
272 | ret=sysinfo_get_val(str,NULL); |
| 273 | free(str); |
273 | free(str); |