Changeset 82b71ef1 in mainline for kernel/generic/src/syscall/syscall.c
- Timestamp:
- 2008-06-04T19:17:36Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32443b0
- Parents:
- 7ba289a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/syscall/syscall.c
r7ba289a r82b71ef1 64 64 int rc; 65 65 66 if (count == 0)67 return 0;68 69 66 if (count > PAGE_SIZE) 70 67 return ELIMIT; 71 72 data = (char *) malloc(count, 0);73 if (!data)74 return ENOMEM;75 68 76 rc = copy_from_uspace(data, buf, count); 77 if (rc) { 69 if (count > 0) { 70 data = (char *) malloc(count, 0); 71 if (!data) 72 return ENOMEM; 73 74 rc = copy_from_uspace(data, buf, count); 75 if (rc) { 76 free(data); 77 return rc; 78 } 79 80 for (i = 0; i < count; i++) 81 putchar(data[i]); 78 82 free(data); 79 return rc; 80 } 81 82 for (i = 0; i < count; i++) 83 putchar(data[i]); 84 free(data); 83 } else 84 klog_update(); 85 85 86 86 return count;
Note:
See TracChangeset
for help on using the changeset viewer.