Print provider's size in human-readable form as well.

This commit is contained in:
Pawel Jakub Dawidek 2004-05-26 11:08:35 +00:00
parent 026afdcc05
commit af565b58fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129745
2 changed files with 7 additions and 3 deletions

View File

@ -9,7 +9,7 @@ SRCS= geom.c subr.c
CFLAGS+= -DCLASSDIR=\"${CLASSDIR}\"
CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML}
LDADD= -lgeom -lsbuf -lbsdxml
DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBSBUF} ${LIBUTIL}
LDADD= -lbsdxml -lgeom -lsbuf -lutil
.include <bsd.prog.mk>

View File

@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
#include <libgen.h>
#include <libutil.h>
#include <inttypes.h>
#include <dlfcn.h>
#include <assert.h>
@ -586,10 +587,13 @@ static void
show_one(struct gprovider *pp)
{
struct gconfig *conf;
char buf[5];
printf(" NAME: %s\n", pp->lg_name);
printf(" geom name: %s\n", pp->lg_geom->lg_name);
printf(" mediasize: %jd\n", (intmax_t)pp->lg_mediasize);
humanize_number(buf, sizeof(buf), (int64_t)pp->lg_mediasize, "",
HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
printf(" mediasize: %jd (%s)\n", (intmax_t)pp->lg_mediasize, buf);
printf(" sectorsize: %u\n", pp->lg_sectorsize);
printf(" mode: %s\n", pp->lg_mode);
LIST_FOREACH(conf, &pp->lg_config, lg_config) {