Changeset 81df0ce in mainline
- Timestamp:
- 2009-01-31T18:41:22Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 96a2e45
- Parents:
- 2425349
- Location:
- kernel/generic/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/printf/vprintf.c
r2425349 r81df0ce 63 63 struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; 64 64 65 i nt irqpri= interrupts_disable();65 ipl_t ipl = interrupts_disable(); 66 66 spinlock_lock(&printf_lock); 67 67 … … 69 69 70 70 spinlock_unlock(&printf_lock); 71 interrupts_restore(i rqpri);71 interrupts_restore(ipl); 72 72 73 73 return ret; -
kernel/generic/src/syscall/syscall.c
r2425349 r81df0ce 63 63 static unative_t sys_klog(int fd, const void * buf, size_t count) 64 64 { 65 size_t i;66 65 char *data; 67 66 int rc; … … 71 70 72 71 if (count > 0) { 73 data = (char *) malloc(count , 0);72 data = (char *) malloc(count + 1, 0); 74 73 if (!data) 75 74 return ENOMEM; … … 80 79 return rc; 81 80 } 82 83 for (i = 0; i < count; i++)84 putchar(data[i]);81 data[count] = 0; 82 83 printf("%s", data); 85 84 free(data); 86 85 } else
Note:
See TracChangeset
for help on using the changeset viewer.