Changeset c81d4f1 in mainline
- Timestamp:
- 2018-01-04T20:50:53Z (7 years ago)
- Children:
- 3b47db6
- Parents:
- 847844a
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:53)
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
r847844a rc81d4f1 564 564 uintptr_t symaddr; 565 565 errno_t rc = symtab_addr_lookup(symname, &symaddr); 566 switch ( (case_errno_t)rc) {567 case (case_errno_t)ENOENT:566 switch (rc) { 567 case ENOENT: 568 568 printf("Symbol %s not found.\n", symname); 569 569 return false; 570 case (case_errno_t)EOVERFLOW:570 case EOVERFLOW: 571 571 printf("Duplicate symbol %s.\n", symname); 572 572 symtab_print_search(symname); 573 573 return false; 574 case (case_errno_t)ENOTSUP:574 case ENOTSUP: 575 575 printf("No symbol information available.\n"); 576 576 return false; 577 case (case_errno_t)EOK:577 case EOK: 578 578 if (isaddr) 579 579 *result = (sysarg_t) symaddr; … … 594 594 if (end != text + len) 595 595 rc = EINVAL; 596 switch ( (case_errno_t)rc) {597 case (case_errno_t)EINVAL:596 switch (rc) { 597 case EINVAL: 598 598 printf("Invalid number '%s'.\n", text); 599 599 return false; 600 case (case_errno_t)EOVERFLOW:600 case EOVERFLOW: 601 601 printf("Integer overflow in '%s'.\n", text); 602 602 return false; 603 case (case_errno_t)EOK:603 case EOK: 604 604 *result = (sysarg_t) value; 605 605 if (isptr) -
kernel/generic/src/debug/symtab.c
r847844a rc81d4f1 98 98 errno_t rc = symtab_name_lookup(addr, &name, NULL); 99 99 100 switch ( (case_errno_t)rc) {101 case (case_errno_t)EOK:100 switch (rc) { 101 case EOK: 102 102 return name; 103 case (case_errno_t)ENOENT:103 case ENOENT: 104 104 return "unknown"; 105 105 default: -
uspace/app/bdsh/cmds/builtins/cd/cd.c
r847844a rc81d4f1 145 145 return CMD_SUCCESS; 146 146 } else { 147 switch ( (case_errno_t)rc) {148 case (case_errno_t)ENOMEM:147 switch (rc) { 148 case ENOMEM: 149 149 cli_error(CL_EFAIL, "Destination path too long"); 150 150 break; 151 case (case_errno_t)ENOENT:151 case ENOENT: 152 152 cli_error(CL_ENOENT, "Invalid directory `%s'", target_directory); 153 153 break; -
uspace/app/edit/edit.c
r847844a rc81d4f1 589 589 rc = file_save_range(fname, &sp, &ep); 590 590 591 switch ( (case_errno_t)rc) {592 case (case_errno_t)EINVAL:591 switch (rc) { 592 case EINVAL: 593 593 status_display("Error opening file!"); 594 594 break; 595 case (case_errno_t)EIO:595 case EIO: 596 596 status_display("Error writing data!"); 597 597 break; -
uspace/app/init/init.c
r847844a rc81d4f1 81 81 const char *fstype, const char *dev, errno_t rc) 82 82 { 83 switch ( (case_errno_t)rc) {84 case (case_errno_t)EOK:83 switch (rc) { 84 case EOK: 85 85 if (dev != NULL) 86 86 printf("%s: %s mounted on %s (%s at %s)\n", NAME, desc, mntpt, … … 89 89 printf("%s: %s mounted on %s (%s)\n", NAME, desc, mntpt, fstype); 90 90 break; 91 case (case_errno_t)EBUSY:91 case EBUSY: 92 92 printf("%s: %s already mounted on %s\n", NAME, desc, mntpt); 93 93 return false; 94 case (case_errno_t)ELIMIT:94 case ELIMIT: 95 95 printf("%s: %s limit exceeded\n", NAME, desc); 96 96 return false; 97 case (case_errno_t)ENOENT:97 case ENOENT: 98 98 printf("%s: %s unknown type (%s)\n", NAME, desc, fstype); 99 99 return false; -
uspace/app/tester/hw/serial/serial1.c
r847844a rc81d4f1 63 63 cnt = DEFAULT_COUNT; 64 64 else 65 switch ( (case_errno_t)str_size_t(test_argv[0], NULL, 0, true, &cnt)) {66 case (case_errno_t)EOK:65 switch (str_size_t(test_argv[0], NULL, 0, true, &cnt)) { 66 case EOK: 67 67 break; 68 case (case_errno_t)EINVAL:68 case EINVAL: 69 69 return "Invalid argument, unsigned integer expected"; 70 case (case_errno_t)EOVERFLOW:70 case EOVERFLOW: 71 71 return "Argument size overflow"; 72 72 default: -
uspace/dist/src/c/demos/edit/edit.c
r847844a rc81d4f1 588 588 rc = file_save_range(fname, &sp, &ep); 589 589 590 switch ( (case_errno_t)rc) {591 case (case_errno_t)EINVAL:590 switch (rc) { 591 case EINVAL: 592 592 status_display("Error opening file!"); 593 593 break; 594 case (case_errno_t)EIO:594 case EIO: 595 595 status_display("Error writing data!"); 596 596 break; -
uspace/lib/c/generic/elf/elf_load.c
r847844a rc81d4f1 80 80 81 81 errno_t rc2 = rtld_prog_process(&info->finfo, &env); 82 switch ( (case_errno_t)rc2) {83 case (case_errno_t)EOK:82 switch (rc2) { 83 case EOK: 84 84 rc = EE_OK; 85 85 break; 86 case (case_errno_t)ENOMEM:86 case ENOMEM: 87 87 rc = EE_MEMORY; 88 88 break; -
uspace/lib/c/generic/inet/host.c
r847844a rc81d4f1 210 210 rc = inet_host_parse(str, &host, endptr != NULL ? &eptr : NULL); 211 211 if (rc != EOK) { 212 switch ( (case_errno_t)rc) {213 case (case_errno_t)EINVAL:212 switch (rc) { 213 case EINVAL: 214 214 if (errmsg != NULL) 215 215 *errmsg = "Invalid format"; 216 216 goto error; 217 case (case_errno_t)ENOMEM:217 case ENOMEM: 218 218 if (errmsg != NULL) 219 219 *errmsg = "Out of memory"; -
uspace/lib/c/generic/inet/hostport.c
r847844a rc81d4f1 264 264 rc = inet_hostport_parse(str, &hp, endptr != NULL ? &eptr : NULL); 265 265 if (rc != EOK) { 266 switch ( (case_errno_t)rc) {267 case (case_errno_t)EINVAL:266 switch (rc) { 267 case EINVAL: 268 268 if (errmsg != NULL) 269 269 *errmsg = "Invalid format"; 270 270 goto error; 271 case (case_errno_t)ENOMEM:271 case ENOMEM: 272 272 if (errmsg != NULL) 273 273 *errmsg = "Out of memory"; 274 274 goto error; 275 case (case_errno_t)EOK:275 case EOK: 276 276 break; 277 277 default: -
uspace/lib/c/generic/str_error.c
r847844a rc81d4f1 96 96 } 97 97 98 snprintf(noerr, NOERR_LEN, "(%d)", (int) (case_errno_t)e);98 snprintf(noerr, NOERR_LEN, "(%d)", (int)e); 99 99 return noerr; 100 100 } … … 108 108 } 109 109 110 snprintf(noerr, NOERR_LEN, "Unknown error code (%d)", (int) (case_errno_t)e);110 snprintf(noerr, NOERR_LEN, "Unknown error code (%d)", (int)e); 111 111 return noerr; 112 112 } -
uspace/lib/c/include/stdlib.h
r847844a rc81d4f1 56 56 #include <errno.h> 57 57 static inline int EXIT_RC(errno_t rc) { 58 return (int) (case_errno_t)rc;58 return (int) rc; 59 59 } 60 60 -
uspace/srv/devman/driver.c
r847844a rc81d4f1 603 603 } 604 604 605 switch ( (case_errno_t)rc) {606 case (case_errno_t)EOK:605 switch (rc) { 606 case EOK: 607 607 dev->state = DEVICE_USABLE; 608 608 break; 609 case (case_errno_t)ENOENT:609 case ENOENT: 610 610 dev->state = DEVICE_NOT_PRESENT; 611 611 break;
Note:
See TracChangeset
for help on using the changeset viewer.