Changeset 84a1a54 in mainline for uspace/srv
- Timestamp:
- 2018-01-04T20:47:53Z (8 years ago)
- Children:
- facacc71
- Parents:
- cde999a
- Location:
- uspace/srv
- Files:
-
- 30 edited
-
audio/hound/main.c (modified) (3 diffs)
-
bd/file_bd/file_bd.c (modified) (4 diffs)
-
bd/sata_bd/sata_bd.c (modified) (4 diffs)
-
clipboard/clipboard.c (modified) (2 diffs)
-
devman/main.c (modified) (6 diffs)
-
fs/cdfs/cdfs.c (modified) (2 diffs)
-
fs/exfat/exfat.c (modified) (2 diffs)
-
fs/ext4fs/ext4fs.c (modified) (3 diffs)
-
fs/fat/fat.c (modified) (2 diffs)
-
fs/locfs/locfs.c (modified) (2 diffs)
-
fs/mfs/mfs.c (modified) (1 diff)
-
fs/tmpfs/tmpfs.c (modified) (2 diffs)
-
fs/udf/udf.c (modified) (2 diffs)
-
hid/compositor/compositor.c (modified) (3 diffs)
-
hid/input/input.c (modified) (2 diffs)
-
hid/isdv4_tablet/main.c (modified) (2 diffs)
-
hid/output/output.c (modified) (2 diffs)
-
hid/remcons/remcons.c (modified) (3 diffs)
-
hid/rfb/main.c (modified) (2 diffs)
-
hid/s3c24xx_ts/s3c24xx_ts.c (modified) (3 diffs)
-
hw/char/s3c24xx_uart/s3c24xx_uart.c (modified) (3 diffs)
-
klog/klog.c (modified) (3 diffs)
-
loader/main.c (modified) (2 diffs)
-
locsrv/locsrv.c (modified) (3 diffs)
-
logger/main.c (modified) (2 diffs)
-
net/loopip/loopip.c (modified) (2 diffs)
-
net/slip/slip.c (modified) (2 diffs)
-
ns/ns.c (modified) (2 diffs)
-
test/chardev-test/main.c (modified) (5 diffs)
-
vfs/vfs.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
