diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2005-03-14 08:34:02 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2005-03-14 08:34:02 +0000 |
commit | da80913d35248922cee8a5b580936bcc6d7ccbf3 (patch) | |
tree | 5ed36bb1ad06171c5d89371655f596b36f10c759 | |
parent | 159b454819e5d465665ecb06c7ea79a02da9a6fd (diff) | |
download | src-da80913d35248922cee8a5b580936bcc6d7ccbf3.tar.gz src-da80913d35248922cee8a5b580936bcc6d7ccbf3.zip |
Use int instead of size_t (%*s needs int).
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=143558
-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 dd10163beabe..e282e25850bd 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; |