[Linux-aus] enum in /etc/magic

Steven Pickles thatpixguy at gmail.com
Mon Jun 16 19:56:57 EST 2014


Tried really hard to understand what you are trying to do... but, wut?


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/linux-aus/attachments/20140616/5256abe1/attachment.htm 


More information about the linux-aus mailing list