Changeset c1694b6b in mainline for uspace/srv/devman/main.c


Ignore:
Timestamp:
2017-12-08T21:03:35Z (6 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.