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

    r8bfb163 r132ab5d1  
    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        }
     
    221222{
    222223        size_t n_rd;
    223         int rc;
    224224
    225225        if (size < cnt * block_size)
     
    237237
    238238        clearerr(img);
    239         rc = fseek(img, ba * block_size, SEEK_SET);
    240         if (rc < 0) {
     239        if (fseek(img, ba * block_size, SEEK_SET) < 0) {
    241240                fibril_mutex_unlock(&dev_lock);
    242241                return EIO;
     
    263262{
    264263        size_t n_wr;
    265         int rc;
    266264
    267265        if (size < cnt * block_size)
     
    279277
    280278        clearerr(img);
    281         rc = fseek(img, ba * block_size, SEEK_SET);
    282         if (rc < 0) {
     279        if (fseek(img, ba * block_size, SEEK_SET) < 0) {
    283280                fibril_mutex_unlock(&dev_lock);
    284281                return EIO;
Note: See TracChangeset for help on using the changeset viewer.