Changes in kernel/generic/src/console/console.c [da52547:d7533c7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
rda52547 rd7533c7 160 160 klog_parea.pbase = (uintptr_t) faddr; 161 161 klog_parea.frames = SIZE2FRAMES(sizeof(klog)); 162 klog_parea.unpriv = false; 162 163 ddi_parea_register(&klog_parea); 163 164 164 sysinfo_set_item_val("klog.faddr", NULL, ( unative_t) faddr);165 sysinfo_set_item_val("klog.faddr", NULL, (sysarg_t) faddr); 165 166 sysinfo_set_item_val("klog.pages", NULL, KLOG_PAGES); 166 167 … … 193 194 194 195 /** Tell kernel to get keyboard/console access again */ 195 unative_t sys_debug_enable_console(void)196 sysarg_t sys_debug_enable_console(void) 196 197 { 197 198 #ifdef CONFIG_KCONSOLE … … 204 205 205 206 /** Tell kernel to relinquish keyboard/console access */ 206 unative_t sys_debug_disable_console(void)207 sysarg_t sys_debug_disable_console(void) 207 208 { 208 209 release_console(); … … 333 334 * 334 335 */ 335 unative_t sys_klog(int fd, const void *buf, size_t size)336 sysarg_t sys_klog(int fd, const void *buf, size_t size) 336 337 { 337 338 char *data; … … 339 340 340 341 if (size > PAGE_SIZE) 341 return ( unative_t) ELIMIT;342 return (sysarg_t) ELIMIT; 342 343 343 344 if (size > 0) { 344 345 data = (char *) malloc(size + 1, 0); 345 346 if (!data) 346 return ( unative_t) ENOMEM;347 return (sysarg_t) ENOMEM; 347 348 348 349 rc = copy_from_uspace(data, buf, size); 349 350 if (rc) { 350 351 free(data); 351 return ( unative_t) rc;352 return (sysarg_t) rc; 352 353 } 353 354 data[size] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.