Changeset c1694b6b in mainline for uspace/srv


Ignore:
Timestamp:
2017-12-08T21:03:35Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f77c1c9
Parents:
9eb1ff5
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 18:20:13)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
Message:

Add str_error() in numerous places.

Location:
uspace/srv
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/file_bd/file_bd.c

    r9eb1ff5 rc1694b6b  
    4848#include <stdint.h>
    4949#include <errno.h>
     50#include <str_error.h>
    5051#include <stdbool.h>
    5152#include <task.h>
     
    134135        rc = loc_service_register(device_name, &service_id);
    135136        if (rc != EOK) {
    136                 printf("%s: Unable to register device '%s'.\n",
    137                     NAME, device_name);
     137                printf("%s: Unable to register device '%s': %s.\n",
     138                    NAME, device_name, str_error(rc));
    138139                return rc;
    139140        }
     
    141142        rc = loc_category_get_id("disk", &disk_cat, IPC_FLAG_BLOCKING);
    142143        if (rc != EOK) {
    143                 printf("%s: Failed resolving category 'disk'.\n", NAME);
     144                printf("%s: Failed resolving category 'disk': %s\n", NAME, str_error(rc));
    144145                return rc;
    145146        }
     
    147148        rc = loc_service_add_to_cat(service_id, disk_cat);
    148149        if (rc != EOK) {
    149                 printf("%s: Failed adding %s to category.",
    150                     NAME, device_name);
     150                printf("%s: Failed adding %s to category: %s",
     151                    NAME, device_name, str_error(rc));
    151152                return rc;
    152153        }
  • uspace/srv/bd/rd/rd.c

    r9eb1ff5 rc1694b6b  
    4848#include <stdbool.h>
    4949#include <errno.h>
     50#include <str_error.h>
    5051#include <async.h>
    5152#include <fibril_synch.h>
     
    179180        ret = loc_server_register(NAME);
    180181        if (ret != EOK) {
    181                 printf("%s: Unable to register driver (%d)\n", NAME, ret);
     182                printf("%s: Unable to register driver: %s\n", NAME, str_error(ret));
    182183                return false;
    183184        }
  • uspace/srv/bd/sata_bd/sata_bd.c

    r9eb1ff5 rc1694b6b  
    4141#include <devman.h>
    4242#include <errno.h>
     43#include <str_error.h>
    4344#include <stdio.h>
    4445#include <str.h>
     
    251252        rc = loc_server_register(NAME);
    252253        if (rc < 0) {
    253                 printf(NAME ": Unable to register driver.\n");
     254                printf(NAME ": Unable to register driver: %s.\n", str_error(rc));
    254255                return rc;
    255256        }
     
    257258        rc = get_sata_disks();
    258259        if (rc != EOK) {
     260                // TODO: log the error
    259261                return rc;
    260262        }
     
    262264        rc = loc_category_get_id("disk", &disk_cat, IPC_FLAG_BLOCKING);
    263265        if (rc != EOK) {
    264                 printf("%s: Failed resolving category 'disk'.\n", NAME);
     266                printf("%s: Failed resolving category 'disk': %s.\n", NAME, str_error(rc));
    265267                return rc;
    266268        }
     
    271273                rc = loc_service_register(name, &disk[i].service_id);
    272274                if (rc != EOK) {
    273                         printf(NAME ": Unable to register device %s.\n", name);
     275                        printf(NAME ": Unable to register device %s: %s\n", name, str_error(rc));
    274276                        return rc;
    275277                }
     
    277279                rc = loc_service_add_to_cat(disk[i].service_id, disk_cat);
    278280                if (rc != EOK) {
    279                         printf("%s: Failed adding %s to category.",
    280                             NAME, disk[i].dev_name);
     281                        printf("%s: Failed adding %s to category: %s.",
     282                            NAME, disk[i].dev_name, str_error(rc));
    281283                        return rc;
    282284                }
  • uspace/srv/bd/vbd/disk.c

    r9eb1ff5 rc1694b6b  
    3838#include <block.h>
    3939#include <errno.h>
     40#include <str_error.h>
    4041#include <io/log.h>
    4142#include <label/empty.h>
     
    456457        if (rc != EOK) {
    457458                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback "
    458                     "for disk discovery (%d).", rc);
     459                    "for disk discovery: %s.", str_error(rc));
    459460                return rc;
    460461        }
     
    11241125        if (rc != EOK) {
    11251126                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering "
    1126                     "service %s (%d).", name, rc);
     1127                    "service %s: %s.", name, str_error(rc));
    11271128                free(name);
    11281129                free(part);
  • uspace/srv/bd/vbd/vbd.c

    r9eb1ff5 rc1694b6b  
    3636#include <async.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <io/log.h>
    3940#include <ipc/services.h>
     
    6970        rc = loc_server_register(NAME);
    7071        if (rc != EOK) {
    71                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
     72                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
    7273                return EEXIST;
    7374        }
     
    7576        rc = loc_service_register(SERVICE_NAME_VBD, &ctl_sid);
    7677        if (rc != EOK) {
    77                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
     78                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
    7879                return EEXIST;
    7980        }
  • uspace/srv/clipboard/clipboard.c

    r9eb1ff5 rc1694b6b  
    2929#include <async.h>
    3030#include <errno.h>
     31#include <str_error.h>
    3132#include <fibril_synch.h>
    3233#include <ipc/services.h>
     
    188189        rc = loc_server_register(NAME);
    189190        if (rc != EOK) {
    190                 printf("%s: Failed registering server. (%d)\n", NAME, rc);
     191                printf("%s: Failed registering server: %s\n", NAME, str_error(rc));
    191192                return rc;
    192193        }
     
    194195        rc = loc_service_register(SERVICE_NAME_CLIPBOARD, &svc_id);
    195196        if (rc != EOK) {
    196                 printf("%s: Failed registering service. (%d)\n", NAME, rc);
     197                printf("%s: Failed registering service : %s\n", NAME, str_error(rc));
    197198                return rc;
    198199        }
  • uspace/srv/devman/main.c

    r9eb1ff5 rc1694b6b  
    4242#include <stdio.h>
    4343#include <errno.h>
     44#include <str_error.h>
    4445#include <stdbool.h>
    4546#include <fibril_synch.h>
     
    318319        int rc = log_init(NAME);
    319320        if (rc != EOK) {
    320                 printf("%s: Error initializing logging subsystem.\n", NAME);
     321                printf("%s: Error initializing logging subsystem: %s\n", NAME, str_error(rc));
    321322                return rc;
    322323        }
     
    329330        rc = async_create_port(INTERFACE_DDF_DRIVER,
    330331            devman_connection_driver, NULL, &port);
    331         if (rc != EOK)
    332                 return rc;
     332        if (rc != EOK) {
     333                printf("%s: Error creating DDF driver port: %s\n", NAME, str_error(rc));
     334                return rc;
     335        }
    333336       
    334337        rc = async_create_port(INTERFACE_DDF_CLIENT,
    335338            devman_connection_client, NULL, &port);
    336         if (rc != EOK)
    337                 return rc;
     339        if (rc != EOK) {
     340                printf("%s: Error creating DDF client port: %s\n", NAME, str_error(rc));
     341                return rc;
     342        }
    338343       
    339344        rc = async_create_port(INTERFACE_DEVMAN_DEVICE,
    340345            devman_connection_device, NULL, &port);
    341         if (rc != EOK)
    342                 return rc;
     346        if (rc != EOK) {
     347                printf("%s: Error creating devman device port: %s\n", NAME, str_error(rc));
     348                return rc;
     349        }
    343350       
    344351        rc = async_create_port(INTERFACE_DEVMAN_PARENT,
    345352            devman_connection_parent, NULL, &port);
    346         if (rc != EOK)
    347                 return rc;
     353        if (rc != EOK) {
     354                printf("%s: Error creating devman parent port: %s\n", NAME, str_error(rc));
     355                return rc;
     356        }
    348357       
    349358        async_set_fallback_port_handler(devman_forward, NULL);
     
    357366        rc = service_register(SERVICE_DEVMAN);
    358367        if (rc != EOK) {
    359                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering as a service.");
     368                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering as a service: %s", str_error(rc));
    360369                return rc;
    361370        }
  • uspace/srv/fs/cdfs/cdfs.c

    r9eb1ff5 rc1694b6b  
    4141#include <ns.h>
    4242#include <errno.h>
     43#include <str_error.h>
    4344#include <stdio.h>
    4445#include <libfs.h>
     
    8384            &cdfs_libfs_ops);
    8485        if (rc != EOK) {
    85                 printf("%s: Failed to register file system (%d)\n", NAME, rc);
     86                printf("%s: Failed to register file system: %s\n", NAME, str_error(rc));
    8687                return rc;
    8788        }
  • uspace/srv/fs/exfat/exfat.c

    r9eb1ff5 rc1694b6b  
    4343#include <async.h>
    4444#include <errno.h>
     45#include <str_error.h>
    4546#include <task.h>
    4647#include <stdio.h>
     
    9596
    9697err:
    97         printf(NAME ": Failed to register file system (%d)\n", rc);
     98        printf(NAME ": Failed to register file system: %s\n", str_error(rc));
    9899        return rc;
    99100}
  • uspace/srv/fs/fat/fat.c

    r9eb1ff5 rc1694b6b  
    4343#include <async.h>
    4444#include <errno.h>
     45#include <str_error.h>
    4546#include <task.h>
    4647#include <stdio.h>
     
    9596       
    9697err:
    97         printf(NAME ": Failed to register file system (%d)\n", rc);
     98        printf(NAME ": Failed to register file system: %s\n", str_error(rc));
    9899        return rc;
    99100}
  • uspace/srv/fs/locfs/locfs.c

    r9eb1ff5 rc1694b6b  
    4444#include <async.h>
    4545#include <errno.h>
     46#include <str_error.h>
    4647#include <task.h>
    4748#include <libfs.h>
     
    8788            &locfs_libfs_ops);
    8889        if (rc != EOK) {
    89                 printf("%s: Failed to register file system (%d)\n", NAME, rc);
     90                printf("%s: Failed to register file system: %s\n", NAME, str_error(rc));
    9091                return rc;
    9192        }
  • uspace/srv/fs/mfs/mfs.c

    r9eb1ff5 rc1694b6b  
    4444#include <async.h>
    4545#include <errno.h>
     46#include <str_error.h>
    4647#include <task.h>
    4748#include <stdio.h>
     
    9798
    9899err:
    99         printf(NAME ": Failed to register file system (%d)\n", rc);
     100        printf(NAME ": Failed to register file system: %s\n", str_error(rc));
    100101        return rc;
    101102}
  • uspace/srv/fs/tmpfs/tmpfs.c

    r9eb1ff5 rc1694b6b  
    4646#include <async.h>
    4747#include <errno.h>
     48#include <str_error.h>
    4849#include <stdio.h>
    4950#include <task.h>
     
    8990            &tmpfs_libfs_ops);
    9091        if (rc != EOK) {
    91                 printf(NAME ": Failed to register file system (%d)\n", rc);
     92                printf(NAME ": Failed to register file system: %s\n", str_error(rc));
    9293                return rc;
    9394        }
  • uspace/srv/fs/udf/udf.c

    r9eb1ff5 rc1694b6b  
    4141#include <async.h>
    4242#include <errno.h>
     43#include <str_error.h>
    4344#include <task.h>
    4445#include <libfs.h>
     
    9697       
    9798err:
    98         log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to register file system (%d)", rc);
     99        log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to register file system: %s", str_error(rc));
    99100        return rc;
    100101}
  • uspace/srv/locsrv/locsrv.c

    r9eb1ff5 rc1694b6b  
    4747#include <stdlib.h>
    4848#include <str.h>
     49#include <str_error.h>
    4950#include <ipc/loc.h>
    5051#include <assert.h>
     
    15291530        int rc = async_create_port(INTERFACE_LOC_SUPPLIER,
    15301531            loc_connection_supplier, NULL, &port);
    1531         if (rc != EOK)
     1532        if (rc != EOK) {
     1533                printf("%s: Error while creating supplier port: %s\n", NAME, str_error(rc));
    15321534                return rc;
     1535        }
    15331536       
    15341537        rc = async_create_port(INTERFACE_LOC_CONSUMER,
    15351538            loc_connection_consumer, NULL, &port);
    1536         if (rc != EOK)
     1539        if (rc != EOK) {
     1540                printf("%s: Error while creating consumer port: %s\n", NAME, str_error(rc));
    15371541                return rc;
     1542        }
    15381543       
    15391544        /* Set a handler of incomming connections */
     
    15421547        /* Register location service at naming service */
    15431548        rc = service_register(SERVICE_LOC);
    1544         if (rc != EOK)
     1549        if (rc != EOK) {
     1550                printf("%s: Error while registering service: %s\n", NAME, str_error(rc));
    15451551                return rc;
     1552        }
    15461553       
    15471554        printf("%s: Accepting connections\n", NAME);
  • uspace/srv/logger/main.c

    r9eb1ff5 rc1694b6b  
    7272        int rc = async_create_port(INTERFACE_LOGGER_CONTROL,
    7373            connection_handler_control, NULL, &port);
    74         if (rc != EOK)
     74        if (rc != EOK) {
     75                printf("%s: Error while creating control port: %s\n", NAME, str_error(rc));
    7576                return rc;
     77        }
    7678       
    7779        rc = async_create_port(INTERFACE_LOGGER_WRITER,
    7880            connection_handler_writer, NULL, &port);
    79         if (rc != EOK)
     81        if (rc != EOK) {
     82                printf("%s: Error while creating writer port: %s\n", NAME, str_error(rc));
    8083                return rc;
     84        }
    8185       
    8286        rc = service_register(SERVICE_LOGGER);
  • uspace/srv/net/dhcp/dhcp.c

    r9eb1ff5 rc1694b6b  
    3939#include <byteorder.h>
    4040#include <errno.h>
     41#include <str_error.h>
    4142#include <fibril_synch.h>
    4243#include <inet/addr.h>
     
    370371        if (rc != EOK) {
    371372                log_msg(LOG_DEFAULT, LVL_ERROR,
    372                     "Error creating IP address %s (%d)", "dhcp4a", rc);
     373                    "Error creating IP address %s: %s", "dhcp4a", str_error(rc));
    373374                return rc;
    374375        }
     
    380381                if (rc != EOK) {
    381382                        log_msg(LOG_DEFAULT, LVL_ERROR, "Error creating "
    382                             "default route %s (%d).", "dhcpdef", rc);
     383                            "default route %s: %s.", "dhcpdef", str_error(rc));
    383384                        return rc;
    384385                }
     
    389390                if (rc != EOK) {
    390391                        log_msg(LOG_DEFAULT, LVL_ERROR, "Error setting "
    391                             "nameserver address (%d))", rc);
     392                            "nameserver address: %s)", str_error(rc));
    392393                        return rc;
    393394                }
  • uspace/srv/net/dhcp/main.c

    r9eb1ff5 rc1694b6b  
    3636#include <async.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <io/log.h>
    3940#include <inet/inetcfg.h>
     
    6970        rc = loc_server_register(NAME);
    7071        if (rc != EOK) {
    71                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
     72                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
    7273                return EEXIST;
    7374        }
     
    7677        rc = loc_service_register(SERVICE_NAME_DHCP, &sid);
    7778        if (rc != EOK) {
    78                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
     79                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
    7980                return EEXIST;
    8081        }
  • uspace/srv/net/dnsrsrv/dnsrsrv.c

    r9eb1ff5 rc1694b6b  
    3636#include <async.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <io/log.h>
    3940#include <ipc/dnsr.h>
     
    6869        rc = loc_server_register(NAME);
    6970        if (rc != EOK) {
    70                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
     71                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
    7172                transport_fini();
    7273                return EEXIST;
     
    7677        rc = loc_service_register(SERVICE_NAME_DNSR, &sid);
    7778        if (rc != EOK) {
    78                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
     79                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
    7980                transport_fini();
    8081                return EEXIST;
  • uspace/srv/net/dnsrsrv/transport.c

    r9eb1ff5 rc1694b6b  
    3636#include <adt/list.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <fibril_synch.h>
    3940#include <inet/addr.h>
     
    199200                    req_size);
    200201                if (rc != EOK) {
    201                         log_msg(LOG_DEFAULT, LVL_DEBUG, "Error %d sending message", rc);
     202                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Error sending message: %s", str_error(rc));
    202203                        goto error;
    203204                }
  • uspace/srv/net/ethip/ethip_nic.c

    r9eb1ff5 rc1694b6b  
    3939#include <stdbool.h>
    4040#include <errno.h>
     41#include <str_error.h>
    4142#include <fibril_synch.h>
    4243#include <inet/iplink_srv.h>
     
    280281        free(data);
    281282
    282         log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=%d", rc);
     283        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=%s", str_error_name(rc));
    283284        async_answer_0(callid, rc);
    284285}
     
    328329        if (rc != EOK) {
    329330                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for NIC "
    330                     "discovery (%d).", rc);
     331                    "discovery: %s.", str_error(rc));
    331332                return rc;
    332333        }
     
    357358        log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_send(size=%zu)", size);
    358359        rc = nic_send_frame(nic->sess, data, size);
    359         log_msg(LOG_DEFAULT, LVL_DEBUG, "nic_send_frame -> %d", rc);
     360        log_msg(LOG_DEFAULT, LVL_DEBUG, "nic_send_frame -> %s", str_error_name(rc));
    360361        return rc;
    361362}
  • uspace/srv/net/inetsrv/inet_link.c

    r9eb1ff5 rc1694b6b  
    3737#include <stdbool.h>
    3838#include <errno.h>
     39#include <str_error.h>
    3940#include <fibril_synch.h>
    4041#include <inet/iplink.h>
     
    114115        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet()");
    115116        rc = inet_recv_packet(&packet);
    116         log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %d", rc);
     117        log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %s", str_error_name(rc));
    117118        free(packet.data);
    118119
  • uspace/srv/net/inetsrv/inetsrv.c

    r9eb1ff5 rc1694b6b  
    3838#include <async.h>
    3939#include <errno.h>
     40#include <str_error.h>
    4041#include <fibril_synch.h>
    4142#include <io/log.h>
     
    105106        rc = loc_server_register(NAME);
    106107        if (rc != EOK) {
    107                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
     108                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
    108109                return EEXIST;
    109110        }
     
    112113        rc = loc_service_register(SERVICE_NAME_INET, &sid);
    113114        if (rc != EOK) {
    114                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
     115                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
    115116                return EEXIST;
    116117        }
  • uspace/srv/net/loopip/loopip.c

    r9eb1ff5 rc1694b6b  
    3838#include <async.h>
    3939#include <errno.h>
     40#include <str_error.h>
    4041#include <inet/iplink_srv.h>
    4142#include <inet/addr.h>
     
    251252        int rc = log_init(NAME);
    252253        if (rc != EOK) {
    253                 printf("%s: Failed to initialize logging.\n", NAME);
     254                printf("%s: Failed to initialize logging: %s.\n", NAME, str_error(rc));
    254255                return rc;
    255256        }
    256257       
    257258        rc = loopip_init();
    258         if (rc != EOK)
    259                 return rc;
     259        if (rc != EOK) {
     260                printf("%s: Failed to initialize loopip: %s.\n", NAME, str_error(rc));
     261                return rc;
     262        }
    260263       
    261264        printf("%s: Accepting connections.\n", NAME);
  • uspace/srv/net/nconfsrv/iplink.c

    r9eb1ff5 rc1694b6b  
    3737#include <stdbool.h>
    3838#include <errno.h>
     39#include <str_error.h>
    3940#include <fibril_synch.h>
    4041#include <inet/dhcp.h>
     
    181182        if (rc != EOK) {
    182183                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for IP link "
    183                     "discovery (%d).", rc);
     184                    "discovery: %s.", str_error(rc));
    184185                return rc;
    185186        }
  • uspace/srv/net/nconfsrv/nconfsrv.c

    r9eb1ff5 rc1694b6b  
    3838#include <async.h>
    3939#include <errno.h>
     40#include <str_error.h>
    4041#include <fibril_synch.h>
    4142#include <inet/dhcp.h>
     
    8081        rc = loc_server_register(NAME);
    8182        if (rc != EOK) {
    82                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
     83                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
    8384                return EEXIST;
    8485        }
     
    8687        rc = loc_service_register(SERVICE_NAME_NETCONF, &sid);
    8788        if (rc != EOK) {
    88                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
     89                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
    8990                return EEXIST;
    9091        }
  • uspace/srv/net/slip/slip.c

    r9eb1ff5 rc1694b6b  
    3737#include <stdio.h>
    3838#include <stdint.h>
     39#include <stdlib.h>
    3940#include <loc.h>
    4041#include <inet/addr.h>
     
    4344#include <io/log.h>
    4445#include <errno.h>
     46#include <str_error.h>
    4547#include <task.h>
    4648
     
    108110                if (rc != EOK) {
    109111                        log_msg(LOG_DEFAULT, LVL_ERROR,
    110                             "chardev_write() returned %d", rc);
     112                            "chardev_write() -> %s", str_error_name(rc));
    111113                        slip_send_pending = 0;
    112114                        break;
     
    213215                if (rc != EOK) {
    214216                        log_msg(LOG_DEFAULT, LVL_ERROR,
    215                             "char_dev_read() returned %d", rc);
     217                            "char_dev_read() -> %s", str_error_name(rc));
    216218                }
    217219
     
    285287                if (rc != EOK) {
    286288                        log_msg(LOG_DEFAULT, LVL_ERROR,
    287                             "iplink_ev_recv() returned %d", rc);
     289                            "iplink_ev_recv() -> %s", str_error_name(rc));
    288290                }
    289291        }
  • uspace/srv/net/tcp/service.c

    r9eb1ff5 rc1694b6b  
    3737#include <async.h>
    3838#include <errno.h>
     39#include <str_error.h>
    3940#include <inet/endpoint.h>
    4041#include <inet/inet.h>
     
    10951096        rc = tcp_conn_recv_impl(client, conn_id, data, size, &rsize);
    10961097        if (rc != EOK) {
    1097                 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_wait_srv - recv_impl failed rc=%d", rc);
     1098                log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_recv_wait_srv - recv_impl failed rc=%s", str_error_name(rc));
    10981099                async_answer_0(callid, rc);
    10991100                async_answer_0(iid, rc);
  • uspace/srv/taskmon/taskmon.c

    r9eb1ff5 rc1694b6b  
    150150        int rc = loc_server_register(NAME);
    151151        if (rc != EOK) {
    152                 printf("%s: Failed registering server (%d).\n",
    153                     NAME, rc);
     152                printf("%s: Failed registering server: %s.\n",
     153                    NAME, str_error(rc));
    154154                return -1;
    155155        }
     
    158158        rc = loc_service_register(SERVICE_NAME_CORECFG, &sid);
    159159        if (rc != EOK) {
    160                 printf("%s: Failed registering service (%d).\n",
    161                     NAME, rc);
     160                printf("%s: Failed registering service: %s.\n",
     161                    NAME, str_error(rc));
    162162                return -1;
    163163        }
  • uspace/srv/test/chardev-test/main.c

    r9eb1ff5 rc1694b6b  
    2929#include <async.h>
    3030#include <errno.h>
     31#include <str_error.h>
    3132#include <io/chardev_srv.h>
    3233#include <ipc/services.h>
     
    112113        rc = loc_server_register(NAME);
    113114        if (rc != EOK) {
    114                 printf("%s: Failed registering server. (%d)\n", NAME, rc);
     115                printf("%s: Failed registering server.: %s\n", NAME, str_error(rc));
    115116                return rc;
    116117        }
     
    130131        rc = loc_service_register(SERVICE_NAME_CHARDEV_TEST_SMALLX, &smallx_svc_id);
    131132        if (rc != EOK) {
    132                 printf("%s: Failed registering service. (%d)\n", NAME, rc);
     133                printf("%s: Failed registering service.: %s\n", NAME, str_error(rc));
    133134                return rc;
    134135        }
     
    136137        rc = loc_service_register(SERVICE_NAME_CHARDEV_TEST_LARGEX, &largex_svc_id);
    137138        if (rc != EOK) {
    138                 printf("%s: Failed registering service. (%d)\n", NAME, rc);
     139                printf("%s: Failed registering service.: %s\n", NAME, str_error(rc));
    139140                return rc;
    140141        }
     
    142143        rc = loc_service_register(SERVICE_NAME_CHARDEV_TEST_PARTIALX, &partialx_svc_id);
    143144        if (rc != EOK) {
    144                 printf("%s: Failed registering service. (%d)\n", NAME, rc);
     145                printf("%s: Failed registering service.: %s\n", NAME, str_error(rc));
    145146                return rc;
    146147        }
  • uspace/srv/vfs/vfs.c

    r9eb1ff5 rc1694b6b  
    4444#include <async.h>
    4545#include <errno.h>
     46#include <str_error.h>
    4647#include <stdio.h>
    4748#include <stdbool.h>
     
    122123        port_id_t port;
    123124        rc = async_create_port(INTERFACE_PAGER, vfs_pager, NULL, &port);
    124         if (rc != EOK)
     125        if (rc != EOK) {
     126                printf("%s: Cannot create pager port: %s\n", NAME, str_error(rc));
    125127                return rc;
    126                
     128        }
     129
    127130        /*
    128131         * Set a connection handling function/fibril.
     
    141144        rc = service_register(SERVICE_VFS);
    142145        if (rc != EOK) {
    143                 printf("%s: Cannot register VFS service\n", NAME);
     146                printf("%s: Cannot register VFS service: %s\n", NAME, str_error(rc));
    144147                return rc;
    145148        }
  • uspace/srv/volsrv/part.c

    r9eb1ff5 rc1694b6b  
    3737#include <stdbool.h>
    3838#include <errno.h>
     39#include <str_error.h>
    3940#include <fibril_synch.h>
    4041#include <io/log.h>
     
    271272        if (rc != EOK) {
    272273                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback "
    273                     "for partition discovery (%d).", rc);
     274                    "for partition discovery: %s.", str_error(rc));
    274275                return rc;
    275276        }
  • uspace/srv/volsrv/volsrv.c

    r9eb1ff5 rc1694b6b  
    3636#include <async.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <io/log.h>
    3940#include <ipc/services.h>
     
    7071        rc = loc_server_register(NAME);
    7172        if (rc != EOK) {
    72                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
     73                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc));
    7374                return EEXIST;
    7475        }
     
    7778        rc = loc_service_register(SERVICE_NAME_VOLSRV, &sid);
    7879        if (rc != EOK) {
    79                 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
     80                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
    8081                return EEXIST;
    8182        }
Note: See TracChangeset for help on using the changeset viewer.