summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-09-12 00:14:25 +0000
committerdelphij <delphij@FreeBSD.org>2013-09-12 00:14:25 +0000
commit457a4abaaa7de84cf5a48440b6a97a66bcabbb7b (patch)
tree3cb7956ccb5c9f570b46ffb62a3554c92d9c5e65 /usr.sbin
parent3d45194f2c642afe3a51b0836f8172cc80ba0ae3 (diff)
downloadFreeBSD-src-457a4abaaa7de84cf5a48440b6a97a66bcabbb7b.zip
FreeBSD-src-457a4abaaa7de84cf5a48440b6a97a66bcabbb7b.tar.gz
Do not emit size for non-regular files. There is nothing that
mtree(1) can do in this situation and would cause confusion. MFC candidate. Approved by: re (hrs)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mtree/create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c
index da72fc6..8be9b02 100644
--- a/usr.sbin/mtree/create.c
+++ b/usr.sbin/mtree/create.c
@@ -208,7 +208,7 @@ statf(int indent, FTSENT *p)
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);
- if (keys & F_SIZE)
+ if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode))
output(indent, &offset, "size=%jd",
(intmax_t)p->fts_statp->st_size);
if (keys & F_TIME)
OpenPOWER on IntegriCloud