Bruno Haible via GNU coreutils General Discussion <[email protected]> writes:
> In src/fs-is-local.h I read: > > /* Map each S_MAGIC_* value to 1, 0 or -1. > 1 if it is known to be a remote file system type, > 0 if it is known to be a local file system type, or -1 otherwise. */ > ... > case S_MAGIC_EXT2: return 1; > ... > case S_MAGIC_NFS: return 0; > ... > > I think the comment is wrong: The value is 1 for a local file system type, > and 0 for a remote file system type. Good catch. I'll push the attached patch in a bit. Collin
>From b8675fe98cc38e9a49afec52f4102d330d9aaa27 Mon Sep 17 00:00:00 2001 Message-ID: <b8675fe98cc38e9a49afec52f4102d330d9aaa27.1762904586.git.collin.fu...@gmail.com> From: Collin Funk <[email protected]> Date: Tue, 11 Nov 2025 15:37:44 -0800 Subject: [PATCH] maint: fix a comment in the generated src/fs-is-local.h file Reported by Bruno Haible in <https://lists.gnu.org/r/coreutils/2025-11/msg00113.html>. * src/extract-magic ($magic_comment): Mention that the function returns 1 if the file system is local and 0 if it is remote. --- src/extract-magic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extract-magic b/src/extract-magic index 978c88a8c..b9b4f8e38 100644 --- a/src/extract-magic +++ b/src/extract-magic @@ -114,8 +114,8 @@ EOF my $map_comment = <<EOF; /* Map each S_MAGIC_* value to 1, 0 or -1. - 1 if it is known to be a remote file system type, - 0 if it is known to be a local file system type, or -1 otherwise. */ + 1 if it is known to be a local file system type, + 0 if it is known to be a remote file system type, or -1 otherwise. */ EOF my $magic_comment = <<EOF; /* Define the magic numbers as given by statfs(2). -- 2.51.1
