[Linux-aus] enum in /etc/magic

Russell Coker russell at coker.com.au
Tue Jun 17 00:26:07 EST 2014


On Mon, 16 Jun 2014 23:33:49 Chris Martin wrote:
> There is no way to shorten the test that I am aware of.
> The ">" indicates the level of the test,  so I ma thinking that you should
> be use an extra ">" when you get to the 3rd test

I think that an extra ">" is only needed for nested tests.  But the ">2" line 
isn't a test, it's just printing a value so there's no point in extra 
indenting.  Also the ">0x0033" line doesn't depend on the values of any of the 
">3" lines AFAIK.

I've attached a new version which will display correctly when byte 3 isn't one 
of the known values (there is a range reserved for "DYNAMIC").

-- 
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,
>3	byte			0		Type UNKNOWN,
>3	byte			1		Type DIAM_ISAM,
>3	byte			2		Type HASH,
>3	byte			3		Type MISAM,
>3	byte			4		Type PISAM,
>3	byte			5		Type RMS_ISAM,
>3	byte			6		Type HEAP,
>3	byte			7		Type ISAM,
>3	byte			8		Type MRG_ISAM,
>3	byte			9		Type MYISAM,
>3	byte			10		Type MRG_MYISAM,
>3	byte			11		Type BERKELEY_DB,
>3	byte			12		Type INNODB,
>3	byte			13		Type GEMINI,
>3	byte			14		Type NDBCLUSTER,
>3	byte			15		Type EXAMPLE_DB,
>3	byte			16		Type CSV_DB,
>3	byte			17		Type FEDERATED_DB,
>3	byte			18		Type BLACKHOLE_DB,
>3	byte			19		Type PARTITION_DB,
>3	byte			20		Type BINLOG,
>3	byte			21		Type SOLID,
>3	byte			22		Type PBXT,
>3	byte			23		Type TABLE_FUNCTION,
>3	byte			24		Type MEMCACHE,
>3	byte			25		Type FALCON,
>3	byte			26		Type MARIA,
>3	byte			27		Type PERFORMANCE_SCHEMA,
>3	byte			127		Type DEFAULT,
>0x0033	ulong			x		MySQL version %d.


More information about the linux-aus mailing list