Changes in kernel/generic/src/log/log.c [7f11dc6:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/log/log.c
r7f11dc6 rb7fd2a0 221 221 222 222 size_t buffer_offset = 0; 223 int rc = chr_encode(wstr[chars], buffer, &buffer_offset, 16);223 errno_t rc = chr_encode(wstr[chars], buffer, &buffer_offset, 16); 224 224 if (rc != EOK) { 225 225 return EOF; … … 293 293 * 294 294 */ 295 sys arg_t sys_klog(sysarg_t operation, void *buf, size_t size,295 sys_errno_t sys_klog(sysarg_t operation, void *buf, size_t size, 296 296 sysarg_t level, size_t *uspace_nread) 297 297 { 298 298 char *data; 299 int rc;299 errno_t rc; 300 300 301 301 if (size > PAGE_SIZE) 302 return (sys arg_t) ELIMIT;302 return (sys_errno_t) ELIMIT; 303 303 304 304 switch (operation) { … … 306 306 data = (char *) malloc(size + 1, 0); 307 307 if (!data) 308 return (sys arg_t) ENOMEM;308 return (sys_errno_t) ENOMEM; 309 309 310 310 rc = copy_from_uspace(data, buf, size); 311 311 if (rc) { 312 312 free(data); 313 return (sys arg_t) rc;313 return (sys_errno_t) rc; 314 314 } 315 315 data[size] = 0; … … 325 325 data = (char *) malloc(size, 0); 326 326 if (!data) 327 return (sys arg_t) ENOMEM;327 return (sys_errno_t) ENOMEM; 328 328 329 329 size_t entry_len = 0; … … 366 366 if (rc != EOK) { 367 367 free(data); 368 return (sys arg_t) rc;368 return (sys_errno_t) rc; 369 369 } 370 370 … … 374 374 375 375 if (rc != EOK) 376 return (sys arg_t) rc;376 return (sys_errno_t) rc; 377 377 378 378 return copy_to_uspace(uspace_nread, &copied, sizeof(copied)); 379 379 return EOK; 380 380 default: 381 return (sys arg_t) ENOTSUP;381 return (sys_errno_t) ENOTSUP; 382 382 } 383 383 }
Note:
See TracChangeset
for help on using the changeset viewer.