NetBSD Problem Report #60380

From www@netbsd.org  Sun Jun 28 18:37:37 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F0F6E1A923A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Jun 2026 18:37:36 +0000 (UTC)
Message-Id: <20260628183735.D35F31A923B@mollari.NetBSD.org>
Date: Sun, 28 Jun 2026 18:37:35 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: find(1) can't find snapshots
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60380
>Category:       bin
>Synopsis:       find(1) can't find snapshots
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          pending-pullups
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 28 18:40:00 +0000 2026
>Closed-Date:    
>Last-Modified:  Fri Oct 23 16:35:01 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
The NetBSnapD Findation, Inc.
>Environment:
>Description:

	find(1) apparently lacks any way to detect snapshot files:

	# find / -flags snap
	find: -flags: snap: illegal flags string
	# find / -flags snapshot
	find: -flags: snapshot: illegal flags string

	(Call the police, I did something illegal!)

>How-To-Repeat:

	as above

>Fix:

	Maybe teach libutil string_to_flags to accept `snap' just like
	flags_to_string yields it.

	Make sure to update
	https://wiki.NetBSD.org/tutorials/how_to_use_snapshots/
	if this is fixed.

>Release-Note:

>Audit-Trail:

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60380 CVS commit: src/lib/libutil
Date: Sun, 23 Aug 2026 23:22:15 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sun Aug 23 23:22:15 UTC 2026

 Modified Files:
 	src/lib/libutil: stat_flags.c

 Log Message:
 string_to_flags(3): Support `snap' (SF_SNAPSHOT).

 PR bin/60380: find(1) can't find snapshots


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 src/lib/libutil/stat_flags.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60380 CVS commit: src/lib/libutil
Date: Sun, 23 Aug 2026 23:23:37 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sun Aug 23 23:23:37 UTC 2026

 Modified Files:
 	src/lib/libutil: stat_flags.c

 Log Message:
 string_to_flags(3): Put `snap' under #ifdef SF_SNAPSHOT.

 Same as in flags_to_string(3).  Not really sure why, but let's keep it
 consistent so there's only one question to ponder and not two.

 PR bin/60380: find(1) can't find snapshots


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/lib/libutil/stat_flags.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sun, 23 Aug 2026 23:44:14 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-11, pullup-10, pullup-9


From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60380 CVS commit: src/tests/dev/fss
Date: Mon, 24 Aug 2026 00:17:35 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Mon Aug 24 00:17:35 UTC 2026

 Modified Files:
 	src/tests/dev/fss: t_fss.sh

 Log Message:
 tests/dev/fss: New test of internal snapshots.

 Verify that ls(1), find(1), and file(1) identify them as such too.

 PR bin/60379: file(1) should recognize snapshot files
 PR bin/60380: find(1) can't find snapshots


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/tests/dev/fss/t_fss.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 22 Oct 2026 15:00:24 +0000
State-Changed-Why:
pullup-11 #538
pullup-10 #1384


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60380 CVS commit: [netbsd-11] src
Date: Fri, 23 Oct 2026 16:28:27 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Oct 23 16:28:27 UTC 2026

 Modified Files:
 	src/external/bsd/file/dist [netbsd-11]: configure.ac
 	src/external/bsd/file/dist/src [netbsd-11]: fsmagic.c
 	src/external/bsd/file/include [netbsd-11]: config.h
 	src/lib/libutil [netbsd-11]: stat_flags.c
 	src/tests/dev/fss [netbsd-11]: t_fss.sh

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #538):

 	external/bsd/file/dist/src/fsmagic.c: revision 1.19
 	external/bsd/file/include/config.h: revision 1.22
 	tests/dev/fss/t_fss.sh: revision 1.8
 	lib/libutil/stat_flags.c: revision 1.4
 	lib/libutil/stat_flags.c: revision 1.5
 	external/bsd/file/dist/configure.ac: revision 1.24
 	(all via patch)

 string_to_flags(3): Support `snap' (SF_SNAPSHOT).

 PR bin/60380: find(1) can't find snapshots

 string_to_flags(3): Put `snap' under #ifdef SF_SNAPSHOT.

 Same as in flags_to_string(3).  Not really sure why, but let's keep it
 consistent so there's only one question to ponder and not two.

 PR bin/60380: find(1) can't find snapshots

 file(1): Detect internal file system snapshots.

 PR bin/60379: file(1) should recognize snapshot files

 tests/dev/fss: New test of internal snapshots.
 Verify that ls(1), find(1), and file(1) identify them as such too.
 PR bin/60379: file(1) should recognize snapshot files
 PR bin/60380: find(1) can't find snapshots


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.22.4.1 src/external/bsd/file/dist/configure.ac
 cvs rdiff -u -r1.18 -r1.18.4.1 src/external/bsd/file/dist/src/fsmagic.c
 cvs rdiff -u -r1.20 -r1.20.2.1 src/external/bsd/file/include/config.h
 cvs rdiff -u -r1.3 -r1.3.6.1 src/lib/libutil/stat_flags.c
 cvs rdiff -u -r1.7 -r1.7.2.1 src/tests/dev/fss/t_fss.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60380 CVS commit: [netbsd-10] src
Date: Fri, 23 Oct 2026 16:30:36 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Oct 23 16:30:36 UTC 2026

 Modified Files:
 	src/external/bsd/file/dist [netbsd-10]: configure.ac
 	src/external/bsd/file/dist/src [netbsd-10]: fsmagic.c
 	src/external/bsd/file/include [netbsd-10]: config.h
 	src/lib/libutil [netbsd-10]: stat_flags.c
 	src/tests/dev/fss [netbsd-10]: t_fss.sh

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1384):

 	external/bsd/file/dist/src/fsmagic.c: revision 1.19
 	external/bsd/file/include/config.h: revision 1.22
 	tests/dev/fss/t_fss.sh: revision 1.8
 	lib/libutil/stat_flags.c: revision 1.4
 	lib/libutil/stat_flags.c: revision 1.5
 	external/bsd/file/dist/configure.ac: revision 1.24
 	(all via patch)

 string_to_flags(3): Support `snap' (SF_SNAPSHOT).

 PR bin/60380: find(1) can't find snapshots

 string_to_flags(3): Put `snap' under #ifdef SF_SNAPSHOT.

 Same as in flags_to_string(3).  Not really sure why, but let's keep it
 consistent so there's only one question to ponder and not two.

 PR bin/60380: find(1) can't find snapshots

 file(1): Detect internal file system snapshots.

 PR bin/60379: file(1) should recognize snapshot files

 tests/dev/fss: New test of internal snapshots.
 Verify that ls(1), find(1), and file(1) identify them as such too.
 PR bin/60379: file(1) should recognize snapshot files
 PR bin/60380: find(1) can't find snapshots


 To generate a diff of this commit:
 cvs rdiff -u -r1.21 -r1.21.2.1 src/external/bsd/file/dist/configure.ac
 cvs rdiff -u -r1.17 -r1.17.2.1 src/external/bsd/file/dist/src/fsmagic.c
 cvs rdiff -u -r1.18 -r1.18.2.1 src/external/bsd/file/include/config.h
 cvs rdiff -u -r1.3 -r1.3.2.1 src/lib/libutil/stat_flags.c
 cvs rdiff -u -r1.5 -r1.5.2.1 src/tests/dev/fss/t_fss.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.