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