Changeset 132ab5d1 in mainline for uspace/srv/devman/main.c


Ignore:
Timestamp:
2018-01-30T03:20:45Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/main.c

    r8bfb163 r132ab5d1  
    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.