Control: tags 976313 confirmed moreinfo Thanks for your patience ...
Steinar H. Gunderson wrote...
> Here's a suggested magic entry for plocate databases:
>
(...)
> 0 string \0plocate plocate database
> >8 long 0 \b, version %d (obsolete)
> >8 long >0 \b, version %d
> >>40 long x \b, max version %d
That will lead to ... interesting results on plocate files created on
big-endian hosts, like
| plocate database, version 16777216, max version 33554432
My suggestion is to probe for a plausible version number. Assuming you
will not get up to 8 any time soon, I'd do:
0 string \0plocate plocate database
>8 lelong 0 \b, version %d (obsolete)
>8 lelong !0
>>8 lelong <8 \b, little endian, version %d
>>>40 lelong x \b, max version %d
>>8 belong <8 \b, big endian, version %d
>>>40 belong x \b, max version %d
Does that look good to you?
Christoph
signature.asc
Description: PGP signature

