Changeset 15d0046 in mainline for uspace/app/blkdump/blkdump.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (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/blkdump/blkdump.c

    r8db09e4 r15d0046  
    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("Multisession Information:\n");
     225        printf("\tFirst complete session: %" PRIu8 "\n", toc.first_sess);
     226        printf("\tLast complete session: %" PRIu8 "\n", toc.last_sess);
     227        printf("\tFirst track of last complete session:\n");
     228        printf("\t\tADR / Control: 0x%" PRIx8 "\n", toc.ftrack_lsess.adr_control);
     229        printf("\t\tTrack number: %" PRIu8 "\n", toc.ftrack_lsess.track_no);
     230        printf("\t\tStart block address: %" PRIu32 "\n", toc.ftrack_lsess.start_addr);
    225231
    226232        return 0;
     
    271277static void syntax_print(void)
    272278{
    273         printf("syntax: blkdump [--relative] [--offset <num_blocks>] [--count <num_blocks>] <device_name>\n");
     279        printf("syntax: blkdump [--toc] [--relative] [--offset <num_blocks>] "
     280            "[--count <num_blocks>] <device_name>\n");
    274281}
    275282
Note: See TracChangeset for help on using the changeset viewer.