Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2013 00:14:25 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255483 - head/usr.sbin/mtree
Message-ID:  <201309120014.r8C0EPvW057766@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Sep 12 00:14:25 2013
New Revision: 255483
URL: http://svnweb.freebsd.org/changeset/base/255483

Log:
  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)

Modified:
  head/usr.sbin/mtree/create.c

Modified: head/usr.sbin/mtree/create.c
==============================================================================
--- head/usr.sbin/mtree/create.c	Wed Sep 11 23:36:56 2013	(r255482)
+++ head/usr.sbin/mtree/create.c	Thu Sep 12 00:14:25 2013	(r255483)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309120014.r8C0EPvW057766>