Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2011-08-16T18:53:00Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
49160c4
Parents:
e0e922d (diff), 45058baa (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 mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/bdd/bdd.c

    re0e922d rdb6e419  
    3939
    4040#include <libblock.h>
    41 #include <devmap.h>
     41#include <loc.h>
    4242#include <errno.h>
    4343#include <assert.h>
     
    6969        unsigned int argc;
    7070        unsigned int i, j;
    71         devmap_handle_t handle;
     71        service_id_t service_id;
    7272        aoff64_t offset;
    7373        uint8_t *blk;
     
    9696                size = 256;
    9797
    98         rc = devmap_device_get_handle(argv[1], &handle, 0);
     98        rc = loc_service_get_id(argv[1], &service_id, 0);
    9999        if (rc != EOK) {
    100100                printf("%s: Error resolving device `%s'.\n", cmdname, argv[1]);
     
    102102        }
    103103
    104         rc = block_init(EXCHANGE_SERIALIZE, handle, 2048);
     104        rc = block_init(EXCHANGE_SERIALIZE, service_id, 2048);
    105105        if (rc != EOK)  {
    106106                printf("%s: Error initializing libblock.\n", cmdname);
     
    108108        }
    109109
    110         rc = block_get_bsize(handle, &block_size);
     110        rc = block_get_bsize(service_id, &block_size);
    111111        if (rc != EOK) {
    112112                printf("%s: Error determining device block size.\n", cmdname);
     
    117117        if (blk == NULL) {
    118118                printf("%s: Error allocating memory.\n", cmdname);
    119                 block_fini(handle);
     119                block_fini(service_id);
    120120                return CMD_FAILURE;
    121121        }
     
    124124
    125125        while (size > 0) {
    126                 rc = block_read_direct(handle, ba, 1, blk);
     126                rc = block_read_direct(service_id, ba, 1, blk);
    127127                if (rc != EOK) {
    128128                        printf("%s: Error reading block %" PRIuOFF64 "\n", cmdname, ba);
    129129                        free(blk);
    130                         block_fini(handle);
     130                        block_fini(service_id);
    131131                        return CMD_FAILURE;
    132132                }
     
    170170
    171171        free(blk);
    172         block_fini(handle);
     172        block_fini(service_id);
    173173
    174174        return CMD_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.