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/ ? > diff --git a/src/stat.c b/src/stat.c > index 801073b..0a454cd 100644 > --- a/src/stat.c > +++ b/src/stat.c > + case S_MAGIC_AFS: /* 0x5346414F remote */ > + case S_MAGIC_CIFS: /* 0xFF534D42 remote */ > + case S_MAGIC_CODA: /* 0x73757245 remote */ > + case S_MAGIC_FHGFS: /* 0x19830326 remote */ > + case S_MAGIC_FUSEBLK: /* 0x65735546 remote */ > + case S_MAGIC_FUSECTL: /* 0x65735543 remote */ > + case S_MAGIC_GFS: /* 0x1161970 remote */ > + case S_MAGIC_GPFS: /* 0x47504653 remote */ > + case S_MAGIC_KAFS: /* 0x6B414653 remote */ > + case S_MAGIC_LUSTRE: /* 0x0BD00BD0 remote */ > + case S_MAGIC_NCP: /* 0x564C remote */ > + case S_MAGIC_NFS: /* 0x6969 remote */ > + case S_MAGIC_NFSD: /* 0x6E667364 remote */ > + case S_MAGIC_OCFS2: /* 0x7461636f remote */ > + case S_MAGIC_SMB: /* 0x517B remote */ cheers, Pádraig.
