diff options
author | grog <grog@FreeBSD.org> | 1999-06-22 05:53:57 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-06-22 05:53:57 +0000 |
commit | 3da49d8e68dd6b975495efb52a1d7c07e9a72c3f (patch) | |
tree | c1f8b998be458ec658a4b5803f1eb6c626aa796d /sbin/vinum/list.c | |
parent | 879354740c7e4a156e7d7abd42fdf4136ee82062 (diff) | |
download | FreeBSD-src-3da49d8e68dd6b975495efb52a1d7c07e9a72c3f.zip FreeBSD-src-3da49d8e68dd6b975495efb52a1d7c07e9a72c3f.tar.gz |
vinum_ldi:
Show the available sectors relative to the user-available part of
the drive (don't include the config space at the beginning). This
stops an empty drive reporting only 99% available.
Requested-by: staylor
printconfig:
Show sizes in sectors with the suffix 's' instead of the
now-deprecated 'b'.
Diffstat (limited to 'sbin/vinum/list.c')
-rw-r--r-- | sbin/vinum/list.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/vinum/list.c b/sbin/vinum/list.c index e4fa78c..c454262 100644 --- a/sbin/vinum/list.c +++ b/sbin/vinum/list.c @@ -189,7 +189,8 @@ vinum_ldi(int driveno, int recurse) printf("\n"); /* can't print percentages */ else printf(" (%d%%)\n", - (int) ((drive.sectors_available * 100 * DEV_BSIZE) / drive.label.drive_size)); + (int) ((drive.sectors_available * 100 * DEV_BSIZE) + / (drive.label.drive_size - DATASTART))); } if (stats) { if (verbose || Verbose) { @@ -878,7 +879,7 @@ printconfig(FILE * of, char *comment) plex_org(plex.organization)); if ((plex.organization == plex_striped) || (plex.organization == plex_raid5)) { - fprintf(of, "%db ", (int) plex.stripesize); + fprintf(of, "%ds ", (int) plex.stripesize); } if (plex.volno >= 0) { /* we have a volume */ get_volume_info(&vol, plex.volno); @@ -895,7 +896,7 @@ printconfig(FILE * of, char *comment) get_drive_info(&drive, sd.driveno); get_plex_info(&plex, sd.plexno); fprintf(of, - "%ssd name %s drive %s plex %s len %qdb driveoffset %qdb plexoffset %qdb\n", + "%ssd name %s drive %s plex %s len %qds driveoffset %qds plexoffset %qds\n", comment, sd.name, drive.label.name, |