Changeset b5e68c8 in mainline for kernel/generic/src/console/console.c
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
re80329d6 rb5e68c8 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.