Changeset 84a1a54 in mainline for uspace/app
- Timestamp:
- 2018-01-04T20:47:53Z (8 years ago)
- Children:
- facacc71
- Parents:
- cde999a
- Location:
- uspace/app
- Files:
-
- 15 edited
-
bdsh/scli.c (modified) (1 diff)
-
corecfg/corecfg.c (modified) (2 diffs)
-
date/date.c (modified) (1 diff)
-
dnscfg/dnscfg.c (modified) (1 diff)
-
dnsres/dnsres.c (modified) (2 diffs)
-
download/main.c (modified) (2 diffs)
-
getterm/getterm.c (modified) (4 diffs)
-
kio/kio.c (modified) (7 diffs)
-
mkbd/main.c (modified) (6 diffs)
-
nic/nic.c (modified) (2 diffs)
-
sysinfo/sysinfo.c (modified) (3 diffs)
-
sysinst/sysinst.c (modified) (1 diff)
-
vuhid/main.c (modified) (1 diff)
-
websrv/websrv.c (modified) (1 diff)
-
wifi_supplicant/wifi_supplicant.c (modified) (4 diffs)
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
Note:
See TracChangeset
for help on using the changeset viewer.
