Date: Sun, 14 Apr 2002 01:09:41 +1000 (EST) From: Joshua Goodall <joshua@roughtrade.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/37038: fflagstostr and strtofflags don't recognise snapshots Message-ID: <20020413150941.9B2673E42@green.shallow.net>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020413150941.9B2673E42>