[Linux-aus] enum in /etc/magic
Russell Coker
russell at coker.com.au
Mon Jun 16 20:21:21 EST 2014
On Mon, 16 Jun 2014 19:26:57 Steven Pickles wrote:
> Tried really hard to understand what you are trying to do... but, wut?
Make a shorter version of the attached file.
> On 15 June 2014 20:50, Russell Coker <russell at coker.com.au> wrote:
> > I've got an enum in a data structure that I'd like to display in the
> > output of
> > file(1).
> >
> > 0 beshort 0xfe01 MySQL table definition
> > file
> >
> > >2 byte x Version %d,
> > >3 byte 9 Type MYISAM
> > >3 byte 12 Type INNODB
> >
> > The above is a sample of what I'm doing, values 9 and 12 in byte 3
> > correspond
> > to MYISAM and INNODB entries for the MySQL FRM file.
> >
> > https://github.com/twitter/mysql/blob/master/sql/handler.h
> >
> > The above URL has what seems to be a complete list, so I could write 31
> > lines
> > in /etc/magic for this, but that's ugly. Is there a way I can specify a
> > list
> > of values to match followed by a list of strings to display and not have
> > 31
> > lines?
> >
> > I'd like to develop a patch that can be accepted into the Debian package
> > and
> > hopefully upstream so it has to be the least ugly way of doing it.
> >
> > --
> > My Main Blog http://etbe.coker.com.au/
> > My Documents Blog http://doc.coker.com.au/
> >
> >
> > _______________________________________________
> > linux-aus mailing list
> > linux-aus at lists.linux.org.au
> > http://lists.linux.org.au/listinfo/linux-aus
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
-------------- next part --------------
# Magic local data for file(1) command.
# Insert here your local magic data. Format is described in magic(5).
0 beshort 0xfe01 MySQL table definition file
>2 byte x Version %d, Type
>3 byte 0 UNKNOWN,
>3 byte 1 DIAM_ISAM,
>3 byte 2 HASH,
>3 byte 3 MISAM,
>3 byte 4 PISAM,
>3 byte 5 RMS_ISAM,
>3 byte 6 HEAP,
>3 byte 7 ISAM,
>3 byte 8 MRG_ISAM,
>3 byte 9 MYISAM,
>3 byte 10 MRG_MYISAM,
>3 byte 11 BERKELEY_DB,
>3 byte 12 INNODB,
>3 byte 13 GEMINI,
>3 byte 14 NDBCLUSTER,
>3 byte 15 EXAMPLE_DB,
>3 byte 16 CSV_DB,
>3 byte 17 FEDERATED_DB,
>3 byte 18 BLACKHOLE_DB,
>3 byte 19 PARTITION_DB,
>3 byte 20 BINLOG,
>3 byte 21 SOLID,
>3 byte 22 PBXT,
>3 byte 23 TABLE_FUNCTION,
>3 byte 24 MEMCACHE,
>3 byte 25 FALCON,
>3 byte 26 MARIA,
>3 byte 27 PERFORMANCE_SCHEMA,
>3 byte 127 DEFAULT,
>0x0033 ulong x MySQL version %d.
More information about the linux-aus
mailing list