diff options
author | Greg Lehey <grog@FreeBSD.org> | 1999-06-22 05:53:57 +0000 |
---|---|---|
committer | Greg Lehey <grog@FreeBSD.org> | 1999-06-22 05:53:57 +0000 |
commit | b1cdcf849c1d88a765f4acd53245f22adc811f69 (patch) | |
tree | 9275217c50a9e5e9abc3d6e8ad3963a84923b362 /sbin/vinum | |
parent | c3d71cfc5ea52e1df3db945dc0b32e535d461ff4 (diff) | |
download | src-b1cdcf849c1d88a765f4acd53245f22adc811f69.tar.gz src-b1cdcf849c1d88a765f4acd53245f22adc811f69.zip |
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'.
Notes
Notes:
svn path=/head/; revision=48096
Diffstat (limited to 'sbin/vinum')
-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 e4fa78c2f1de..c454262b3728 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, |