GNU bug report logs - #10349
tail: fix --follow on FhGFS remote file systems

Previous Next

Package: coreutils;

Reported by: Sven Breuner <sven.breuner <at> itwm.fraunhofer.de>

Date: Thu, 22 Dec 2011 01:40:09 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #52 received at 10349 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 10349 <at> debbugs.gnu.org, Sven Breuner <sven.breuner <at> itwm.fraunhofer.de>,
	Alan Curry <pacman-cu <at> kosh.dhis.org>, Bob Proulx <bob <at> proulx.com>
Subject: Re: bug#10349: tail: fix --follow on FhGFS remote file systems
Date: Fri, 23 Dec 2011 19:59:05 +0100
Pádraig Brady wrote:

> On 12/23/2011 06:11 PM, Jim Meyering wrote:
>> Here's a proposed patch:
>
> Looks good, one nit.
>
>> --- a/src/extract-magic
>> +++ b/src/extract-magic
>> @@ -65,10 +65,15 @@ FIXME: describe
>>
>>  OPTIONS:
>>
>> -  Derive #define directives from specially formatted `case ...:' statements.
>> +  There are two modes of operation, the default, which is to emit
>> +  #define directives derived from specially formatted `case' statements,
>> +  and that with --local, which is to emit a static inline function
>> +  mapping S_MAGIC_* values to 1, 0, -1, corresponding to known-local,
>> +  known-remote/distributed/network and unknown, respectively.
>>
>> -   --help             display this help and exit
>> -   --version          output version information and exit
>> +   --local    emit an is_local_fs_type function
>> +   --help     display this help and exit
>> +   --version  output version information and exit
>
> s/--local/--remote/ ?

Good catch.  Thank you.
I first did it with --remote, but then switched to --local, but missed two:

diff --git a/src/Makefile.am b/src/Makefile.am
index 7d33803..c12b9d9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -601,7 +601,7 @@ fs-kernel-magic: Makefile
 BUILT_SOURCES += fs-is-local.h
 fs-is-local.h: stat.c extract-magic
 	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic --remote $(srcdir)/stat.c \
+	$(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \
 	  > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
diff --git a/src/extract-magic b/src/extract-magic
index 8a4644f..57d3681 100644
--- a/src/extract-magic
+++ b/src/extract-magic
@@ -86,7 +86,7 @@ EOF

   GetOptions
     (
-     'remote' => sub { $emit_magic = 0 },
+     local => sub { $emit_magic = 0 },
      help => sub { usage 0 },
      version => sub { print "$ME version $VERSION\n"; exit },
     ) or usage 1;




This bug report was last modified 13 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.