diff options
author | pjd <pjd@FreeBSD.org> | 2005-03-14 08:34:02 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-03-14 08:34:02 +0000 |
commit | 74672647f0c97b4398415329e1a6dbfaf261720f (patch) | |
tree | 5ed36bb1ad06171c5d89371655f596b36f10c759 /sbin | |
parent | 2a81e8df21b1d63b9464460805910362704b6076 (diff) | |
download | FreeBSD-src-74672647f0c97b4398415329e1a6dbfaf261720f.zip FreeBSD-src-74672647f0c97b4398415329e1a6dbfaf261720f.tar.gz |
Use int instead of size_t (%*s needs int).
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/geom/core/geom.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index dd10163..e282e25 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -755,11 +755,11 @@ std_status_available(void) } static void -status_update_len(struct ggeom *gp, size_t *name_len, size_t *status_len) +status_update_len(struct ggeom *gp, int *name_len, int *status_len) { struct gprovider *pp; struct gconfig *conf; - size_t len; + int len; assert(gp != NULL); assert(name_len != NULL); @@ -800,7 +800,7 @@ status_one_consumer(struct gconsumer *cp) } static void -status_one_geom(struct ggeom *gp, size_t name_len, size_t status_len) +status_one_geom(struct ggeom *gp, int name_len, int status_len) { struct gprovider *pp; struct gconsumer *cp; @@ -813,18 +813,18 @@ status_one_geom(struct ggeom *gp, size_t name_len, size_t status_len) name = pp->lg_name; else name = gp->lg_name; - printf("%*s", (int)name_len, name); + printf("%*s", name_len, name); LIST_FOREACH(conf, &gp->lg_config, lg_config) { if (strcasecmp(conf->lg_name, "state") == 0) { - printf(" %*s", (int)status_len, conf->lg_val); + printf(" %*s", status_len, conf->lg_val); break; } } if (conf == NULL) - printf(" %*s", (int)status_len, "N/A"); + printf(" %*s", status_len, "N/A"); LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { if (cp != LIST_FIRST(&gp->lg_consumer)) - printf("%*s %*s", (int)name_len, "", (int)status_len, ""); + printf("%*s %*s", name_len, "", status_len, ""); if (status_one_consumer(cp) && !newline) newline = 1; } @@ -838,7 +838,7 @@ std_status(struct gctl_req *req, unsigned flags __unused) struct gmesh mesh; struct gclass *classp; struct ggeom *gp; - size_t name_len, status_len; + int name_len, status_len; int error, *nargs; error = geom_gettree(&mesh); @@ -890,7 +890,7 @@ std_status(struct gctl_req *req, unsigned flags __unused) if (n == 0) goto end; } - printf("%*s %*s %s\n", (int)name_len, "Name", (int)status_len, "Status", + printf("%*s %*s %s\n", name_len, "Name", status_len, "Status", "Components"); if (*nargs > 0) { int i; |