From nobody@FreeBSD.org  Fri Jan 10 21:51:28 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 4C61E7C1
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Jan 2014 21:51:28 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 3948C13C3
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Jan 2014 21:51:28 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0ALpR8v043986
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Jan 2014 21:51:27 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0ALpRlJ043982;
	Fri, 10 Jan 2014 21:51:27 GMT
	(envelope-from nobody)
Message-Id: <201401102151.s0ALpRlJ043982@oldred.freebsd.org>
Date: Fri, 10 Jan 2014 21:51:27 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: fmtree is unnecessarily noisy
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185648
>Category:       bin
>Synopsis:       [patch] fmtree(8) is unnecessarily noisy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 10 22:00:01 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun Apr 20 03:00:59 UTC 2014
>Originator:     Garrett Cooper
>Release:        11.0-CURRENT
>Organization:
n/a
>Environment:
FreeBSD  11.0-CURRENT FreeBSD 11.0-CURRENT #0 r260516+632bcdb(master): Fri Jan 10 03:39:34 PST 2014     root@fbsd-vm.zonarsystems.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
# test -d /var/tmp/temproot/usr/tests/bin/cat/ && echo it lives
it lives
# fmtree -deU -f /usr/src/etc/mtree/BSD.tests.dist -p /var/tmp/temproot/usr/ | grep bin/cat
./tests/bin/cat missing (directory not created: File exists)
>How-To-Repeat:
mkdir -p /var/tmp/temproot/usr/tests/bin/cat
fetch -o /tmp/BSD.tests.dist https://raw.github.com/yaneurabeya/freebsd/cfc6ad9bc622f4196577ecf38575ca78dfe5c005/etc/mtree/BSD.tests.dist
fmtree -deU -f /tmp/BSD.tests.dist -p /var/tmp/temproot/usr/
>Fix:


>Release-Note:
>Audit-Trail:

From: Garrett Cooper <yaneurabeya@gmail.com>
To: FreeBSD-gnats-submit@FreeBSD.org,
 freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: bin/185648: fmtree is unnecessarily noisy
Date: Thu, 16 Jan 2014 19:40:20 -0800

 --Apple-Mail=_3E02B388-8DD9-411B-AFF7-1ECBB3FD872E
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 	Doing some code inspection, the noise is benign but not human =
 friendly. This patch should make it a little more human-friendly.
 Thanks,
 -Garrett
 
 --Apple-Mail=_3E02B388-8DD9-411B-AFF7-1ECBB3FD872E
 Content-Disposition: attachment;
 	filename=0001-make-the-message-when-EEXIST-occurs-with-mkdir-2-mor.patch
 Content-Type: application/octet-stream;
 	name="0001-make-the-message-when-EEXIST-occurs-with-mkdir-2-mor.patch"
 Content-Transfer-Encoding: quoted-printable
 
 =46rom=20a3e0cf67fab89883913fe516907ab0af7883164e=20Mon=20Sep=2017=20=
 00:00:00=202001=0AFrom:=20Garrett=20Cooper=20<yanegomi@gmail.com>=0A=
 Date:=20Mon,=2013=20Jan=202014=2009:48:27=20-0800=0ASubject:=20[PATCH]=20=
 make=20the=20message=20when=20EEXIST=20occurs=20with=20mkdir(2)=20more=0A=
 =20meaningful=0A=0A---=0A=20usr.sbin/mtree/verify.c=20|=207=20+++++--=0A=20=
 1=20file=20changed,=205=20insertions(+),=202=20deletions(-)=0A=0Adiff=20=
 --git=20a/usr.sbin/mtree/verify.c=20b/usr.sbin/mtree/verify.c=0Aindex=20=
 b7c4fd9..f708846=20100644=0A---=20a/usr.sbin/mtree/verify.c=0A+++=20=
 b/usr.sbin/mtree/verify.c=0A@@=20-218,8=20+218,11=20@@=20miss(NODE=20*p,=20=
 char=20*tail)=0A=20=09=09=09}=20else=20if=20(!(p->flags=20&=20F_MODE))=0A=
 =20=09=09=09=20=20=20=20(void)printf("=20(directory=20not=20created:=20=
 mode=20not=20specified)");=0A=20=09=09=09else=20if=20(mkdir(path,=20=
 S_IRWXU))=0A-=09=09=09=09(void)printf("=20(directory=20not=20created:=20=
 %s)",=0A-=09=09=09=09=20=20=20=20strerror(errno));=0A+=09=09=09=09if=20=
 (errno=20=3D=3D=20EEXIST)=0A+=09=09=09=09=09(void)printf("=20(path=20=
 already=20exists)");=0A+=09=09=09=09else=0A+=09=09=09=09=09=
 (void)printf("=20(directory=20not=20created:=20%s)",=0A+=09=09=09=09=09=20=
 =20=20=20strerror(errno));=0A=20=09=09=09else=20{=0A=20=09=09=09=09=
 create=20=3D=201;=0A=20=09=09=09=09(void)printf("=20(created)");=0A--=20=0A=
 1.8.4.1=0A=0A=
 
 --Apple-Mail=_3E02B388-8DD9-411B-AFF7-1ECBB3FD872E--
>Unformatted:
