Changeset 132ab5d1 in mainline for uspace/srv/bd/sata_bd/sata_bd.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/bd/sata_bd/sata_bd.c

    r8bfb163 r132ab5d1  
    4141#include <devman.h>
    4242#include <errno.h>
     43#include <str_error.h>
    4344#include <stdio.h>
    4445#include <str.h>
     
    250251        async_set_fallback_port_handler(sata_bd_connection, NULL);
    251252        rc = loc_server_register(NAME);
    252         if (rc < 0) {
    253                 printf(NAME ": Unable to register driver.\n");
     253        if (rc != EOK) {
     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                }
Note: See TracChangeset for help on using the changeset viewer.