Changeset 84a1a54 in mainline
- Timestamp:
- 2018-01-04T20:47:53Z (7 years ago)
- Children:
- facacc71
- Parents:
- cde999a
- Location:
- uspace
- Files:
-
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/scli.c
rcde999a r84a1a54 120 120 121 121 cli_finit(&usr); 122 return ret;122 return EXIT_RC(ret); 123 123 } -
uspace/app/corecfg/corecfg.c
rcde999a r84a1a54 36 36 #include <errno.h> 37 37 #include <stdio.h> 38 #include <stdlib.h> 38 39 39 40 #define NAME "corecfg" … … 76 77 return corecfg_print(); 77 78 else if (str_cmp(argv[1], "enable") == 0) 78 return corecfg_set_enable(true);79 return EXIT_RC(corecfg_set_enable(true)); 79 80 else if (str_cmp(argv[1], "disable") == 0) 80 return corecfg_set_enable(false);81 return EXIT_RC(corecfg_set_enable(false)); 81 82 else { 82 83 printf("%s: Unknown command '%s'.\n", NAME, argv[1]); -
uspace/app/date/date.c
rcde999a r84a1a54 191 191 free(svc_name); 192 192 free(svc_ids); 193 return rc;193 return EXIT_RC(rc); 194 194 } 195 195 -
uspace/app/dnscfg/dnscfg.c
rcde999a r84a1a54 128 128 { 129 129 if ((argc < 2) || (str_cmp(argv[1], "get-ns") == 0)) 130 return dnscfg_print();130 return EXIT_RC(dnscfg_print()); 131 131 else if (str_cmp(argv[1], "set-ns") == 0) 132 return dnscfg_set_ns(argc - 2, argv + 2);132 return EXIT_RC(dnscfg_set_ns(argc - 2, argv + 2)); 133 133 else if (str_cmp(argv[1], "unset-ns") == 0) 134 return dnscfg_unset_ns();134 return EXIT_RC(dnscfg_unset_ns()); 135 135 else { 136 136 printf("%s: Unknown command '%s'.\n", NAME, argv[1]); -
uspace/app/dnsres/dnsres.c
rcde999a r84a1a54 81 81 if (rc != EOK) { 82 82 printf("%s: Error resolving '%s'.\n", NAME, hname); 83 return rc;83 return EXIT_RC(rc); 84 84 } 85 85 … … 89 89 dnsr_hostinfo_destroy(hinfo); 90 90 printf("%s: Error formatting address.\n", NAME); 91 return rc;91 return EXIT_RC(rc); 92 92 } 93 93 -
uspace/app/download/main.c
rcde999a r84a1a54 240 240 if (ofile != NULL && fclose(ofile) != 0) { 241 241 printf("Error writing '%s'.\n", ofname); 242 return E IO;243 } 244 245 return EOK;242 return EXIT_RC(EIO); 243 } 244 245 return 0; 246 246 error: 247 247 free(buf); … … 252 252 if (ofile != NULL) 253 253 fclose(ofile); 254 return rc;254 return EXIT_RC(rc); 255 255 } 256 256 -
uspace/app/getterm/getterm.c
rcde999a r84a1a54 37 37 #include <stdint.h> 38 38 #include <stdio.h> 39 #include <stdlib.h> 39 40 #include <task.h> 40 41 #include <str_error.h> … … 137 138 printf("%s: Error waiting on %s (%s)\n", APP_NAME, term, 138 139 str_error(rc)); 139 return rc;140 return EXIT_RC(rc); 140 141 } 141 142 } … … 174 175 printf("%s: Error spawning %s (%s)\n", APP_NAME, cmd, 175 176 str_error(rc)); 176 return rc;177 return EXIT_RC(rc); 177 178 } 178 179 … … 183 184 printf("%s: Error waiting for %s (%s)\n", APP_NAME, cmd, 184 185 str_error(rc)); 185 return rc;186 return EXIT_RC(rc); 186 187 } 187 188 -
uspace/app/kio/kio.c
rcde999a r84a1a54 191 191 fprintf(stderr, "%s: Unable to get number of kio pages\n", 192 192 NAME); 193 return rc;193 return EXIT_RC(rc); 194 194 } 195 195 … … 199 199 fprintf(stderr, "%s: Unable to get kio physical address\n", 200 200 NAME); 201 return rc;201 return EXIT_RC(rc); 202 202 } 203 203 … … 209 209 if (rc != EOK) { 210 210 fprintf(stderr, "%s: Unable to map kio\n", NAME); 211 return rc;211 return EXIT_RC(rc); 212 212 } 213 213 … … 217 217 fprintf(stderr, "%s: Unable to register kio notifications\n", 218 218 NAME); 219 return rc;219 return EXIT_RC(rc); 220 220 } 221 221 … … 224 224 fprintf(stderr, "%s: Unable to create consumer fibril\n", 225 225 NAME); 226 return E NOMEM;226 return EXIT_RC(ENOMEM); 227 227 } 228 228 … … 230 230 if (!input) { 231 231 fprintf(stderr, "%s: Could not create input\n", NAME); 232 return E NOMEM;232 return EXIT_RC(ENOMEM); 233 233 } 234 234 … … 253 253 rc = EOK; 254 254 255 return E OK;255 return EXIT_RC(rc); 256 256 } 257 257 -
uspace/app/mkbd/main.c
rcde999a r84a1a54 222 222 printf("Device not found or not of USB kind: %s.\n", 223 223 str_error(rc)); 224 return rc;224 return EXIT_RC(rc); 225 225 } 226 226 … … 229 229 printf(NAME ": failed to connect to the device (handle %" 230 230 PRIun "): %s.\n", dev_handle, str_error(errno)); 231 return errno;231 return EXIT_RC(errno); 232 232 } 233 233 … … 239 239 printf(NAME ": failed to get path (handle %" 240 240 PRIun "): %s.\n", dev_handle, str_error(errno)); 241 return E NOMEM;241 return EXIT_RC(ENOMEM); 242 242 } 243 243 … … 250 250 printf("Failed to initialize report parser: %s\n", 251 251 str_error(rc)); 252 return rc;252 return EXIT_RC(rc); 253 253 } 254 254 … … 259 259 if (rc != EOK) { 260 260 printf("Failed to get event length: %s.\n", str_error(rc)); 261 return rc;261 return EXIT_RC(rc); 262 262 } 263 263 … … 266 266 printf("Out of memory.\n"); 267 267 // TODO: hangup phone? 268 return E NOMEM;268 return EXIT_RC(ENOMEM); 269 269 } 270 270 -
uspace/app/nic/nic.c
rcde999a r84a1a54 413 413 async_sess_t *sess; 414 414 nic_address_t addr; 415 int rc, idx; 415 int rc; 416 int idx; 416 417 417 418 sess = get_nic_by_index(i); … … 543 544 544 545 if (!str_cmp(argv[2], "addr")) 545 return nic_set_addr(index, argv[3]);546 return EXIT_RC(nic_set_addr(index, argv[3])); 546 547 547 548 if (!str_cmp(argv[2], "speed")) 548 return nic_set_speed(index, argv[3]);549 return EXIT_RC(nic_set_speed(index, argv[3])); 549 550 550 551 if (!str_cmp(argv[2], "duplex")) 551 return nic_set_duplex(index, argv[3]);552 return EXIT_RC(nic_set_duplex(index, argv[3])); 552 553 553 554 if (!str_cmp(argv[2], "auto")) 554 return nic_set_autoneg(index);555 return EXIT_RC(nic_set_autoneg(index)); 555 556 556 557 if (!str_cmp(argv[2], "unicast")) 557 return nic_set_rx_unicast(index, argv[3]);558 return EXIT_RC(nic_set_rx_unicast(index, argv[3])); 558 559 559 560 if (!str_cmp(argv[2], "multicast")) 560 return nic_set_rx_multicast(index, argv[3]);561 return EXIT_RC(nic_set_rx_multicast(index, argv[3])); 561 562 562 563 if (!str_cmp(argv[2], "broadcast")) 563 return nic_set_rx_broadcast(index, argv[3]);564 return EXIT_RC(nic_set_rx_broadcast(index, argv[3])); 564 565 565 566 } else { -
uspace/app/sysinfo/sysinfo.c
rcde999a r84a1a54 90 90 fputs("')\n", stdout); 91 91 92 return EOK;92 return 0; 93 93 } 94 94 … … 109 109 fputs("')\n", stdout); 110 110 111 return EOK;111 return 0; 112 112 } 113 113 … … 182 182 break; 183 183 case SYSINFO_VAL_VAL: 184 rc = print_item_val(ipath);184 rc = EXIT_RC(print_item_val(ipath)); 185 185 break; 186 186 case SYSINFO_VAL_DATA: -
uspace/app/sysinst/sysinst.c
rcde999a r84a1a54 387 387 { 388 388 const char *dev = DEFAULT_DEV; 389 return sysinst_install(dev);389 return EXIT_RC(sysinst_install(dev)); 390 390 } 391 391 -
uspace/app/vuhid/main.c
rcde999a r84a1a54 238 238 printf("Unable to start communication with VHCD `%s': %s.\n", 239 239 controller, str_error(rc)); 240 return rc;240 return EXIT_RC(rc); 241 241 } 242 242 -
uspace/app/websrv/websrv.c
rcde999a r84a1a54 450 450 rc = parse_option(argc, argv, &i); 451 451 if (rc != EOK) 452 return rc;452 return EXIT_RC(rc); 453 453 } else { 454 454 usage(); 455 return E INVAL;455 return EXIT_RC(EINVAL); 456 456 } 457 457 } -
uspace/app/wifi_supplicant/wifi_supplicant.c
rcde999a r84a1a54 293 293 if (argc == 2) { 294 294 if (!str_cmp(argv[1], "list")) 295 return wifi_list();295 return EXIT_RC(wifi_list()); 296 296 } else if (argc > 2) { 297 297 uint32_t index; … … 300 300 printf("%s: Invalid argument.\n", NAME); 301 301 print_syntax(); 302 return E INVAL;302 return EXIT_RC(EINVAL); 303 303 } 304 304 … … 309 309 now = true; 310 310 311 return wifi_scan(index, now);311 return EXIT_RC(wifi_scan(index, now)); 312 312 } else if (!str_cmp(argv[1], "connect")) { 313 313 char *pass = NULL; … … 316 316 pass = argv[4]; 317 317 318 return wifi_connect(index, argv[3], pass);318 return EXIT_RC(wifi_connect(index, argv[3], pass)); 319 319 } 320 320 } else if (!str_cmp(argv[1], "disconnect")) 321 return wifi_disconnect(index);321 return EXIT_RC(wifi_disconnect(index)); 322 322 } 323 323 324 324 print_syntax(); 325 325 326 return EOK;326 return 0; 327 327 } 328 328 -
uspace/drv/nic/rtl8139/driver.c
rcde999a r84a1a54 2145 2145 int rc = nic_driver_init(NAME); 2146 2146 if (rc != EOK) 2147 return rc;2147 return EXIT_RC(rc); 2148 2148 2149 2149 nic_driver_implement(&rtl8139_driver_ops, &rtl8139_dev_ops, -
uspace/drv/nic/rtl8169/driver.c
rcde999a r84a1a54 1210 1210 int rc = nic_driver_init(NAME); 1211 1211 if (rc != EOK) 1212 return rc;1212 return EXIT_RC(rc); 1213 1213 nic_driver_implement( 1214 1214 &rtl8169_driver_ops, &rtl8169_dev_ops, &rtl8169_nic_iface); -
uspace/lib/c/include/stdlib.h
rcde999a r84a1a54 51 51 extern void exit(int) __attribute__((noreturn)); 52 52 53 #define EXIT_SUCCESS 0 54 #define EXIT_FAILURE -1 55 56 #include <errno.h> 57 static inline int EXIT_RC(errno_t rc) { 58 return (int) rc; 59 } 60 53 61 #endif 54 62 -
uspace/lib/drv/generic/driver.c
rcde999a r84a1a54 978 978 if (rc != EOK) { 979 979 printf("Error: Failed to create driver port.\n"); 980 return rc;980 return EXIT_RC(rc); 981 981 } 982 982 … … 985 985 if (rc != EOK) { 986 986 printf("Error: Failed to create devman port.\n"); 987 return rc;987 return EXIT_RC(rc); 988 988 } 989 989 … … 996 996 str_error(rc)); 997 997 998 return rc;998 return EXIT_RC(rc); 999 999 } 1000 1000 … … 1003 1003 if (rc != EOK) { 1004 1004 printf("Error: Failed returning task value.\n"); 1005 return rc;1005 return EXIT_RC(rc); 1006 1006 } 1007 1007 … … 1009 1009 1010 1010 /* Never reached. */ 1011 return EOK;1011 return 0; 1012 1012 } 1013 1013 -
uspace/srv/audio/hound/main.c
rcde999a r84a1a54 80 80 log_fatal("Failed to initialize hound structure: %s", 81 81 str_error(ret)); 82 return -ret;82 return EXIT_RC(ret); 83 83 } 84 84 … … 91 91 if (ret != EOK) { 92 92 log_fatal("Failed to register server: %s", str_error(ret)); 93 return -ret;93 return EXIT_RC(ret); 94 94 } 95 95 … … 99 99 str_error(ret)); 100 100 hound_server_unregister(id); 101 return -ret;101 return EXIT_RC(ret); 102 102 } 103 103 log_info("Running with service id %" PRIun, id); -
uspace/srv/bd/file_bd/file_bd.c
rcde999a r84a1a54 47 47 #include <stddef.h> 48 48 #include <stdint.h> 49 #include <stdlib.h> 49 50 #include <errno.h> 50 51 #include <str_error.h> … … 137 138 printf("%s: Unable to register device '%s': %s.\n", 138 139 NAME, device_name, str_error(rc)); 139 return rc;140 return EXIT_RC(rc); 140 141 } 141 142 … … 143 144 if (rc != EOK) { 144 145 printf("%s: Failed resolving category 'disk': %s\n", NAME, str_error(rc)); 145 return rc;146 return EXIT_RC(rc); 146 147 } 147 148 … … 150 151 printf("%s: Failed adding %s to category: %s", 151 152 NAME, device_name, str_error(rc)); 152 return rc;153 return EXIT_RC(rc); 153 154 } 154 155 -
uspace/srv/bd/sata_bd/sata_bd.c
rcde999a r84a1a54 253 253 if (rc != EOK) { 254 254 printf(NAME ": Unable to register driver: %s.\n", str_error(rc)); 255 return rc;255 return EXIT_RC(rc); 256 256 } 257 257 258 258 rc = get_sata_disks(); 259 259 if (rc != EOK) { 260 // TODO: log the error261 return rc;260 printf(NAME ": Cannot find SATA disks: %s.\n", str_error(rc)); 261 return EXIT_RC(rc); 262 262 } 263 263 … … 265 265 if (rc != EOK) { 266 266 printf("%s: Failed resolving category 'disk': %s.\n", NAME, str_error(rc)); 267 return rc;267 return EXIT_RC(rc); 268 268 } 269 269 … … 274 274 if (rc != EOK) { 275 275 printf(NAME ": Unable to register device %s: %s\n", name, str_error(rc)); 276 return rc;276 return EXIT_RC(rc); 277 277 } 278 278 … … 281 281 printf("%s: Failed adding %s to category: %s.", 282 282 NAME, disk[i].dev_name, str_error(rc)); 283 return rc;283 return EXIT_RC(rc); 284 284 } 285 285 } -
uspace/srv/clipboard/clipboard.c
rcde999a r84a1a54 190 190 if (rc != EOK) { 191 191 printf("%s: Failed registering server: %s\n", NAME, str_error(rc)); 192 return rc;192 return EXIT_RC(rc); 193 193 } 194 194 … … 196 196 if (rc != EOK) { 197 197 printf("%s: Failed registering service : %s\n", NAME, str_error(rc)); 198 return rc;198 return EXIT_RC(rc); 199 199 } 200 200 -
uspace/srv/devman/main.c
rcde999a r84a1a54 320 320 if (rc != EOK) { 321 321 printf("%s: Error initializing logging subsystem: %s\n", NAME, str_error(rc)); 322 return rc;322 return EXIT_RC(rc); 323 323 } 324 324 … … 332 332 if (rc != EOK) { 333 333 printf("%s: Error creating DDF driver port: %s\n", NAME, str_error(rc)); 334 return rc;334 return EXIT_RC(rc); 335 335 } 336 336 … … 339 339 if (rc != EOK) { 340 340 printf("%s: Error creating DDF client port: %s\n", NAME, str_error(rc)); 341 return rc;341 return EXIT_RC(rc); 342 342 } 343 343 … … 346 346 if (rc != EOK) { 347 347 printf("%s: Error creating devman device port: %s\n", NAME, str_error(rc)); 348 return rc;348 return EXIT_RC(rc); 349 349 } 350 350 … … 353 353 if (rc != EOK) { 354 354 printf("%s: Error creating devman parent port: %s\n", NAME, str_error(rc)); 355 return rc;355 return EXIT_RC(rc); 356 356 } 357 357 … … 367 367 if (rc != EOK) { 368 368 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering as a service: %s", str_error(rc)); 369 return rc;369 return EXIT_RC(rc); 370 370 } 371 371 -
uspace/srv/fs/cdfs/cdfs.c
rcde999a r84a1a54 43 43 #include <str_error.h> 44 44 #include <stdio.h> 45 #include <stdlib.h> 45 46 #include <libfs.h> 46 47 #include "cdfs.h" … … 85 86 if (rc != EOK) { 86 87 printf("%s: Failed to register file system: %s\n", NAME, str_error(rc)); 87 return rc;88 return EXIT_RC(rc); 88 89 } 89 90 -
uspace/srv/fs/exfat/exfat.c
rcde999a r84a1a54 46 46 #include <task.h> 47 47 #include <stdio.h> 48 #include <stdlib.h> 48 49 #include <libfs.h> 49 50 #include "../../vfs/vfs.h" … … 97 98 err: 98 99 printf(NAME ": Failed to register file system: %s\n", str_error(rc)); 99 return rc;100 return EXIT_RC(rc); 100 101 } 101 102 -
uspace/srv/fs/ext4fs/ext4fs.c
rcde999a r84a1a54 40 40 #include <ns.h> 41 41 #include <stdio.h> 42 #include <stdlib.h> 42 43 #include <task.h> 43 44 #include <ipc/services.h> … … 75 76 if (rc != EOK) { 76 77 printf("%s: Global initialization failed\n", NAME); 77 return rc;78 return EXIT_RC(rc); 78 79 } 79 80 … … 82 83 if (rc != EOK) { 83 84 printf("%s: Failed to register file system\n", NAME); 84 return rc;85 return EXIT_RC(rc); 85 86 } 86 87 -
uspace/srv/fs/fat/fat.c
rcde999a r84a1a54 46 46 #include <task.h> 47 47 #include <stdio.h> 48 #include <stdlib.h> 48 49 #include <libfs.h> 49 50 #include "../../vfs/vfs.h" … … 97 98 err: 98 99 printf(NAME ": Failed to register file system: %s\n", str_error(rc)); 99 return rc;100 return EXIT_RC(rc); 100 101 } 101 102 -
uspace/srv/fs/locfs/locfs.c
rcde999a r84a1a54 40 40 41 41 #include <stdio.h> 42 #include <stdlib.h> 42 43 #include <ipc/services.h> 43 44 #include <ns.h> … … 89 90 if (rc != EOK) { 90 91 printf("%s: Failed to register file system: %s\n", NAME, str_error(rc)); 91 return rc;92 return EXIT_RC(rc); 92 93 } 93 94 -
uspace/srv/fs/mfs/mfs.c
rcde999a r84a1a54 100 100 err: 101 101 printf(NAME ": Failed to register file system: %s\n", str_error(rc)); 102 return rc;102 return EXIT_RC(rc); 103 103 } 104 104 -
uspace/srv/fs/tmpfs/tmpfs.c
rcde999a r84a1a54 48 48 #include <str_error.h> 49 49 #include <stdio.h> 50 #include <stdlib.h> 50 51 #include <task.h> 51 52 #include <libfs.h> … … 91 92 if (rc != EOK) { 92 93 printf(NAME ": Failed to register file system: %s\n", str_error(rc)); 93 return rc;94 return EXIT_RC(rc); 94 95 } 95 96 -
uspace/srv/fs/udf/udf.c
rcde999a r84a1a54 42 42 #include <errno.h> 43 43 #include <str_error.h> 44 #include <stdlib.h> 44 45 #include <task.h> 45 46 #include <libfs.h> … … 98 99 err: 99 100 log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to register file system: %s", str_error(rc)); 100 return rc;101 return EXIT_RC(rc); 101 102 } 102 103 -
uspace/srv/hid/compositor/compositor.c
rcde999a r84a1a54 2254 2254 if (rc != EOK) { 2255 2255 printf("%s: Unable to register server (%s)\n", NAME, str_error(rc)); 2256 return -1;2256 return rc; 2257 2257 } 2258 2258 … … 2272 2272 char winreg[LOC_NAME_MAXLEN + 1]; 2273 2273 snprintf(winreg, LOC_NAME_MAXLEN, "%s%s/winreg", NAMESPACE, server_name); 2274 if (loc_service_register(winreg, &winreg_id) != EOK) { 2274 rc = loc_service_register(winreg, &winreg_id); 2275 if (rc != EOK) { 2275 2276 printf("%s: Unable to register service %s\n", NAME, winreg); 2276 return -1;2277 return rc; 2277 2278 } 2278 2279 … … 2315 2316 int rc = compositor_srv_init(argv[1], argv[2]); 2316 2317 if (rc != EOK) 2317 return rc;2318 return EXIT_RC(rc); 2318 2319 2319 2320 printf("%s: Accepting connections\n", NAME); -
uspace/srv/hid/input/input.c
rcde999a r84a1a54 869 869 if (rc != EOK) { 870 870 printf("%s: Unable to register server\n", NAME); 871 return rc;871 return EXIT_RC(rc); 872 872 } 873 873 … … 876 876 if (rc != EOK) { 877 877 printf("%s: Unable to register service %s\n", NAME, argv[1]); 878 return rc;878 return EXIT_RC(rc); 879 879 } 880 880 -
uspace/srv/hid/isdv4_tablet/main.c
rcde999a r84a1a54 315 315 if (rc != EOK) { 316 316 printf("%s: Unable to register driver.\n", NAME); 317 return rc;317 return EXIT_RC(rc); 318 318 } 319 319 320 320 service_id_t service_id; 321 321 char *service_name; 322 rc = asprintf(&service_name, "mouse/isdv4-%" PRIun, svc_id); 323 if (rc < 0) { 322 if (asprintf(&service_name, "mouse/isdv4-%" PRIun, svc_id) < 0) { 324 323 printf(NAME ": Unable to create service name\n"); 325 return rc;324 return EXIT_RC(ENOMEM); 326 325 } 327 326 … … 329 328 if (rc != EOK) { 330 329 printf(NAME ": Unable to register service %s.\n", service_name); 331 return rc;330 return EXIT_RC(rc); 332 331 } 333 332 -
uspace/srv/hid/output/output.c
rcde999a r84a1a54 470 470 if (rc != EOK) { 471 471 printf("%s: Unable to register driver\n", NAME); 472 return rc;472 return EXIT_RC(rc); 473 473 } 474 474 … … 477 477 if (rc != EOK) { 478 478 printf("%s: Unable to register service %s\n", NAME, argv[1]); 479 return rc;479 return EXIT_RC(rc); 480 480 } 481 481 -
uspace/srv/hid/remcons/remcons.c
rcde999a r84a1a54 353 353 if (rc != EOK) { 354 354 fprintf(stderr, "%s: Unable to register server\n", NAME); 355 return rc;355 return EXIT_RC(rc); 356 356 } 357 357 … … 359 359 if (rc != EOK) { 360 360 fprintf(stderr, "%s: Error initializing TCP.\n", NAME); 361 return rc;361 return EXIT_RC(rc); 362 362 } 363 363 … … 369 369 if (rc != EOK) { 370 370 fprintf(stderr, "%s: Error creating listener.\n", NAME); 371 return rc;371 return EXIT_RC(rc); 372 372 } 373 373 -
uspace/srv/hid/rfb/main.c
rcde999a r84a1a54 220 220 if (rc != EOK) { 221 221 printf("%s: Unable to register server.\n", NAME); 222 return rc;222 return EXIT_RC(rc); 223 223 } 224 224 225 225 char *service_name; 226 rc = asprintf(&service_name, "rfb/%s", rfb_name); 227 if (rc < 0) { 226 if (asprintf(&service_name, "rfb/%s", rfb_name) < 0) { 228 227 printf(NAME ": Unable to create service name\n"); 229 return rc;228 return EXIT_RC(ENOMEM); 230 229 } 231 230 … … 235 234 if (rc != EOK) { 236 235 printf(NAME ": Unable to register service %s.\n", service_name); 237 return rc;236 return EXIT_RC(rc); 238 237 } 239 238 -
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
rcde999a r84a1a54 88 88 if (rc != EOK) { 89 89 printf("%s: Unable to register driver.\n", NAME); 90 return rc;90 return EXIT_RC(rc); 91 91 } 92 92 … … 95 95 return -1; 96 96 97 if (s3c24xx_ts_init(ts) != EOK)97 if (s3c24xx_ts_init(ts) != 0) 98 98 return -1; 99 99 … … 141 141 s3c24xx_ts_wait_for_int_mode(ts, updn_down); 142 142 143 return EOK;143 return 0; 144 144 } 145 145 -
uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
rcde999a r84a1a54 85 85 if (rc != EOK) { 86 86 printf("%s: Unable to register server.\n", NAME); 87 return rc;87 return EXIT_RC(rc); 88 88 } 89 89 … … 92 92 return -1; 93 93 94 if (s3c24xx_uart_init(uart) != EOK)94 if (s3c24xx_uart_init(uart) != 0) 95 95 return -1; 96 96 … … 187 187 uart->cds.sarg = uart; 188 188 189 return EOK;189 return 0; 190 190 } 191 191 -
uspace/srv/klog/klog.c
rcde999a r84a1a54 213 213 if (rc != EOK) { 214 214 fprintf(stderr, "%s: Unable to initialize log\n", NAME); 215 return rc;215 return EXIT_RC(rc); 216 216 } 217 217 … … 232 232 log_msg(LOG_DEFAULT, LVL_ERROR, 233 233 "Unable to register klog notifications"); 234 return rc;234 return EXIT_RC(rc); 235 235 } 236 236 … … 239 239 log_msg(LOG_DEFAULT, LVL_ERROR, 240 240 "Unable to create consumer fibril"); 241 return E NOMEM;241 return EXIT_RC(ENOMEM); 242 242 } 243 243 -
uspace/srv/loader/main.c
rcde999a r84a1a54 397 397 int rc = ns_intro(id); 398 398 if (rc != EOK) 399 return rc;399 return EXIT_RC(rc); 400 400 401 401 /* Create port */ … … 403 403 rc = async_create_port(INTERFACE_LOADER, ldr_connection, NULL, &port); 404 404 if (rc != EOK) 405 return rc;405 return EXIT_RC(rc); 406 406 407 407 /* Register at naming service. */ 408 408 rc = service_register(SERVICE_LOADER); 409 409 if (rc != EOK) 410 return rc;410 return EXIT_RC(rc); 411 411 412 412 async_manager(); -
uspace/srv/locsrv/locsrv.c
rcde999a r84a1a54 1532 1532 if (rc != EOK) { 1533 1533 printf("%s: Error while creating supplier port: %s\n", NAME, str_error(rc)); 1534 return rc;1534 return EXIT_RC(rc); 1535 1535 } 1536 1536 … … 1539 1539 if (rc != EOK) { 1540 1540 printf("%s: Error while creating consumer port: %s\n", NAME, str_error(rc)); 1541 return rc;1541 return EXIT_RC(rc); 1542 1542 } 1543 1543 … … 1549 1549 if (rc != EOK) { 1550 1550 printf("%s: Error while registering service: %s\n", NAME, str_error(rc)); 1551 return rc;1551 return EXIT_RC(rc); 1552 1552 } 1553 1553 -
uspace/srv/logger/main.c
rcde999a r84a1a54 74 74 if (rc != EOK) { 75 75 printf("%s: Error while creating control port: %s\n", NAME, str_error(rc)); 76 return rc;76 return EXIT_RC(rc); 77 77 } 78 78 … … 81 81 if (rc != EOK) { 82 82 printf("%s: Error while creating writer port: %s\n", NAME, str_error(rc)); 83 return rc;83 return EXIT_RC(rc); 84 84 } 85 85 -
uspace/srv/net/loopip/loopip.c
rcde999a r84a1a54 253 253 if (rc != EOK) { 254 254 printf("%s: Failed to initialize logging: %s.\n", NAME, str_error(rc)); 255 return rc;255 return EXIT_RC(rc); 256 256 } 257 257 … … 259 259 if (rc != EOK) { 260 260 printf("%s: Failed to initialize loopip: %s.\n", NAME, str_error(rc)); 261 return rc;261 return EXIT_RC(rc); 262 262 } 263 263 -
uspace/srv/net/slip/slip.c
rcde999a r84a1a54 421 421 if (argc != 3) { 422 422 usage(); 423 return E INVAL;423 return EXIT_RC(EINVAL); 424 424 } 425 425 … … 427 427 if (rc != EOK) { 428 428 printf(NAME ": failed to initialize log\n"); 429 return rc;429 return EXIT_RC(rc); 430 430 } 431 431 -
uspace/srv/ns/ns.c
rcde999a r84a1a54 42 42 #include <abi/ipc/interfaces.h> 43 43 #include <stdio.h> 44 #include <stdlib.h> 44 45 #include <errno.h> 45 46 #include <macros.h> … … 133 134 int rc = service_init(); 134 135 if (rc != EOK) 135 return rc;136 return EXIT_RC(rc); 136 137 137 138 rc = clonable_init(); 138 139 if (rc != EOK) 139 return rc;140 return EXIT_RC(rc); 140 141 141 142 rc = task_init(); 142 143 if (rc != EOK) 143 return rc;144 return EXIT_RC(rc); 144 145 145 146 async_set_fallback_port_handler(ns_connection, NULL); -
uspace/srv/test/chardev-test/main.c
rcde999a r84a1a54 35 35 #include <mem.h> 36 36 #include <stdio.h> 37 #include <stdlib.h> 37 38 #include <task.h> 38 39 … … 114 115 if (rc != EOK) { 115 116 printf("%s: Failed registering server.: %s\n", NAME, str_error(rc)); 116 return rc;117 return EXIT_RC(rc); 117 118 } 118 119 … … 132 133 if (rc != EOK) { 133 134 printf("%s: Failed registering service.: %s\n", NAME, str_error(rc)); 134 return rc;135 return EXIT_RC(rc); 135 136 } 136 137 … … 138 139 if (rc != EOK) { 139 140 printf("%s: Failed registering service.: %s\n", NAME, str_error(rc)); 140 return rc;141 return EXIT_RC(rc); 141 142 } 142 143 … … 144 145 if (rc != EOK) { 145 146 printf("%s: Failed registering service.: %s\n", NAME, str_error(rc)); 146 return rc;147 return EXIT_RC(rc); 147 148 } 148 149 -
uspace/srv/vfs/vfs.c
rcde999a r84a1a54 98 98 printf("%s: Failed to initialize VFS node hash table\n", 99 99 NAME); 100 return E NOMEM;100 return EXIT_RC(ENOMEM); 101 101 } 102 102 … … 108 108 if (plb == AS_MAP_FAILED) { 109 109 printf("%s: Cannot create address space area\n", NAME); 110 return E NOMEM;110 return EXIT_RC(ENOMEM); 111 111 } 112 112 memset(plb, 0, PLB_SIZE); … … 125 125 if (rc != EOK) { 126 126 printf("%s: Cannot create pager port: %s\n", NAME, str_error(rc)); 127 return rc;127 return EXIT_RC(rc); 128 128 } 129 129 … … 145 145 if (rc != EOK) { 146 146 printf("%s: Cannot register VFS service: %s\n", NAME, str_error(rc)); 147 return rc;147 return EXIT_RC(rc); 148 148 } 149 149
Note:
See TracChangeset
for help on using the changeset viewer.