[File] Help implementing "octal" indirect offset support

Michał Górny mgorny at gentoo.org
Sat Sep 10 12:19:39 UTC 2022


On Sat, 2022-09-10 at 09:31 +0200, Michał Górny wrote:
> On Fri, 2022-09-09 at 11:11 -0400, Christos Zoulas wrote:
> > Yes, that's right ID3 is the closest thing we have for now. But you don't need
> > to do deal with them as quad types since the union also contains a string.
> > You can parse the value from the string directly I think.
> > 
> 
> Thanks, I didn't realize I can implement indirect offsets on top of
> strings.  I've managed to do that.  However, now I've hit another
> obstacle: I need to round the result up to the 512-byte boundary,
> and I can't think of a good way of doing that.  I suppose I'm just
> trying to do things that are too complex for file(1).
> 

Actually, sorry for the noise.  I've just realized that even if I don't
get the exact offset, I can just search the next 511+100 bytes to
account for the padding and get good enough results.  I'll send
the patch in a minute.

-- 
Best regards,
Michał Górny



More information about the File mailing list