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

Changeset 4ef117f8 in mainline


Ignore:
Timestamp:
2009-08-22T15:17:40Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
a1f48f6, e5792d1
Parents:
a99cf073
Message:

Display device size in megabytes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    ra99cf073 r4ef117f8  
    152152static void disk_print_summary(disk_t *d)
    153153{
     154        uint64_t mbytes;
     155
    154156        printf("%s: ", d->model);
    155157
     
    161163        }
    162164
    163         printf(" %llu blocks.\n", d->blocks);
     165        printf(" %llu blocks", d->blocks, d->blocks / (2 * 1024));
     166
     167        mbytes = d->blocks / (2 * 1024);
     168        if (mbytes > 0)
     169                printf(" %llu MB.", mbytes);
     170
     171        printf("\n");
    164172}
    165173
Note: See TracChangeset for help on using the changeset viewer.