Changeset 3abf70c7 in mainline for uspace/app/blkdump/blkdump.c


Ignore:
Timestamp:
2014-08-16T22:33:41Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da79df42
Parents:
35b8bfe
Message:

libblock is not the best place to define SCSI structures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/blkdump/blkdump.c

    r35b8bfe r3abf70c7  
    4444#include <loc.h>
    4545#include <byteorder.h>
     46#include <scsi/mmc.h>
    4647#include <sys/types.h>
    4748#include <sys/typefmt.h>
     
    214215static int print_toc(void)
    215216{
    216         toc_block_t *toc;
    217 
    218         toc = block_get_toc(service_id, 0);
    219         if (toc == NULL)
     217        scsi_toc_multisess_data_t toc;
     218        int rc;
     219
     220        rc = block_read_toc(service_id, 0, &toc, sizeof(toc));
     221        if (rc != EOK)
    220222                return 1;
    221223
    222         printf("TOC size: %" PRIu16 " bytes\n", toc->size);
    223         printf("First session: %" PRIu8 "\n", toc->first_session);
    224         printf("Last_session: %" PRIu8 "\n", toc->last_session);
     224        printf("TOC size: %" PRIu16 " bytes\n", toc.toc_len);
     225        printf("First session: %" PRIu8 "\n", toc.first_sess);
     226        printf("Last_session: %" PRIu8 "\n", toc.last_sess);
    225227
    226228        return 0;
Note: See TracChangeset for help on using the changeset viewer.