diff options
author | kib <kib@FreeBSD.org> | 2017-01-13 13:37:09 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2017-01-13 13:37:09 +0000 |
commit | a0454e7cff5b13632ab8c24479efd1074f2f8767 (patch) | |
tree | a513a4560fc50c02cb44f7a79c5b3aa4d0570725 /usr.sbin | |
parent | 2eaa0f81174966046fba99f19c1f0563fe8ccd78 (diff) | |
download | FreeBSD-src-a0454e7cff5b13632ab8c24479efd1074f2f8767.zip FreeBSD-src-a0454e7cff5b13632ab8c24479efd1074f2f8767.tar.gz |
MFC r311522:
Use type-independent formats for printing nlink_t and ino_t.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/fmtree/compare.c | 5 | ||||
-rw-r--r-- | usr.sbin/fmtree/create.c | 3 | ||||
-rw-r--r-- | usr.sbin/fmtree/specspec.c | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/fmtree/compare.c b/usr.sbin/fmtree/compare.c index fdd3767..36d3f79 100644 --- a/usr.sbin/fmtree/compare.c +++ b/usr.sbin/fmtree/compare.c @@ -165,8 +165,9 @@ typeerr: LABEL; if (s->flags & F_NLINK && s->type != F_DIR && s->st_nlink != p->fts_statp->st_nlink) { LABEL; - (void)printf("%slink_count expected %u found %u\n", - tab, s->st_nlink, p->fts_statp->st_nlink); + (void)printf("%slink_count expected %ju found %ju\n", + tab, (uintmax_t)s->st_nlink, + (uintmax_t)p->fts_statp->st_nlink); tab = "\t"; } if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size && diff --git a/usr.sbin/fmtree/create.c b/usr.sbin/fmtree/create.c index 8be9b02..204f40a 100644 --- a/usr.sbin/fmtree/create.c +++ b/usr.sbin/fmtree/create.c @@ -207,7 +207,8 @@ statf(int indent, FTSENT *p) if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) output(indent, &offset, "mode=%#o", p->fts_statp->st_mode & MBITS); if (keys & F_NLINK && p->fts_statp->st_nlink != 1) - output(indent, &offset, "nlink=%u", p->fts_statp->st_nlink); + output(indent, &offset, "nlink=%ju", + (uintmax_t)p->fts_statp->st_nlink); if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) output(indent, &offset, "size=%jd", (intmax_t)p->fts_statp->st_size); diff --git a/usr.sbin/fmtree/specspec.c b/usr.sbin/fmtree/specspec.c index f85882e..ac70c28 100644 --- a/usr.sbin/fmtree/specspec.c +++ b/usr.sbin/fmtree/specspec.c @@ -64,7 +64,7 @@ shownode(NODE *n, int f, char const *path) if (f & F_MODE) printf(" mode=%o", n->st_mode); if (f & F_NLINK) - printf(" nlink=%d", n->st_nlink); + printf(" nlink=%ju", (uintmax_t)n->st_nlink); if (f & F_SIZE) printf(" size=%jd", (intmax_t)n->st_size); if (f & F_UID) |