Print provider's size in human-readable form as well.
This commit is contained in:
parent
026afdcc05
commit
af565b58fa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129745
@ -9,7 +9,7 @@ SRCS= geom.c subr.c
|
|||||||
CFLAGS+= -DCLASSDIR=\"${CLASSDIR}\"
|
CFLAGS+= -DCLASSDIR=\"${CLASSDIR}\"
|
||||||
CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
|
CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
|
||||||
|
|
||||||
DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML}
|
DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBSBUF} ${LIBUTIL}
|
||||||
LDADD= -lgeom -lsbuf -lbsdxml
|
LDADD= -lbsdxml -lgeom -lsbuf -lutil
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
|
#include <libutil.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -586,10 +587,13 @@ static void
|
|||||||
show_one(struct gprovider *pp)
|
show_one(struct gprovider *pp)
|
||||||
{
|
{
|
||||||
struct gconfig *conf;
|
struct gconfig *conf;
|
||||||
|
char buf[5];
|
||||||
|
|
||||||
printf(" NAME: %s\n", pp->lg_name);
|
printf(" NAME: %s\n", pp->lg_name);
|
||||||
printf(" geom name: %s\n", pp->lg_geom->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(" sectorsize: %u\n", pp->lg_sectorsize);
|
||||||
printf(" mode: %s\n", pp->lg_mode);
|
printf(" mode: %s\n", pp->lg_mode);
|
||||||
LIST_FOREACH(conf, &pp->lg_config, lg_config) {
|
LIST_FOREACH(conf, &pp->lg_config, lg_config) {
|
||||||
|
Loading…
Reference in New Issue
Block a user