From owner-freebsd-bugs Sat Apr 13 8:10:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 209AB37B416 for ; Sat, 13 Apr 2002 08:10:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3DFA2J12001; Sat, 13 Apr 2002 08:10:03 -0700 (PDT) (envelope-from gnats) Received: from green.shallow.net (c16486.smelb1.vic.optusnet.com.au [210.49.224.105]) by hub.freebsd.org (Postfix) with ESMTP id C6B1937B405 for ; Sat, 13 Apr 2002 08:09:44 -0700 (PDT) Received: by green.shallow.net (Postfix, from userid 1001) id 9B2673E42; Sun, 14 Apr 2002 01:09:41 +1000 (EST) Message-Id: <20020413150941.9B2673E42@green.shallow.net> Date: Sun, 14 Apr 2002 01:09:41 +1000 (EST) From: Joshua Goodall Reply-To: Joshua Goodall To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/37038: fflagstostr and strtofflags don't recognise snapshots Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37038 >Category: bin >Synopsis: fflagstostr and strtofflags don't recognise snapshots >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: Sat Apr 13 08:10:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Joshua Goodall >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD gold.shallow.net 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sat Apr 13 22:44:01 EST 2002 joshua@green.shallow.net:/usr/obj/usr/current/sys/GENERIC i386 >Description: strtofflags and (more usefully) fflagstostr don't recognise SF_SNAPSHOT. As a result, ls -lo doesn't distinguish a snapshot file. >How-To-Repeat: root@gold:~# mount -u -o snapshot /.snap1 / root@gold:~# ls -lo /.snap1 -r--------- 1 root wheel - 1782579200 Apr 14 10:24 /.snap >Fix: n.b. xinstall (included in the build bootstrap toolchain) uses strtofflags.c, so we have to check for the definition of SF_SNAPSHOT to avoid breaking world. After this is committed, you'll see root@gold:~# ls -lo /.snap1 -r--------- 1 root wheel snapshot 1782579200 Apr 14 10:24 /.snap Index: lib/libc/gen/strtofflags.c =================================================================== RCS file: /cvs/src/lib/libc/gen/strtofflags.c,v retrieving revision 1.20 diff -u -r1.20 strtofflags.c --- lib/libc/gen/strtofflags.c 8 Feb 2002 09:34:17 -0000 1.20 +++ lib/libc/gen/strtofflags.c 13 Apr 2002 03:13:24 -0000 @@ -61,6 +61,9 @@ { "nosimmutable", SF_IMMUTABLE, 0 }, { "nosunlnk", SF_NOUNLINK, 0 }, { "nosunlink", SF_NOUNLINK, 0 }, +#ifdef SF_SNAPSHOT + { "nosnapshot", SF_SNAPSHOT, 0 }, +#endif { "nouappnd", UF_APPEND, 0 }, { "nouappend", UF_APPEND, 0 }, { "nouchg", UF_IMMUTABLE, 0 }, >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message