bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jim Meyering
Subject: 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 \
          > address@hidden
        $(AM_V_at)chmod a-w address@hidden
        $(AM_V_at)mv address@hidden $@
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;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]