2005/9/29, Colin Watson <[EMAIL PROTECTED]>:
> On Wed, Sep 28, 2005 at 02:41:34PM -0600, Shaun Jackman wrote:
> > binfmt-support allows the hex \x## escape sequence for the magic
> > option. Could the magic option also support the octal \### escape
> > sequence? It is particularly nice for \0, \1, etc.
>
> It's actually the kernel's binfmt_misc module that does the
> interpretation of \x. I could probably make update-binfmts mangle the
> magic byte-sequence on the way through, but I think it might be better
> just to teach the kernel to understand octal escapes. Does that make
> sense to you?
That surprises me. I thought the interface to the kernel would be
something a little more... orthogonal. For example...
$ grep magic /proc/sys/fs/binfmt_misc/arm-elf
magic 7f454c4601010161
The preceding would be a sensible format for the kernel interface to
me. the binfmt_misc/register interface being what it is though, I'd
agree that teaching the kernel to understand octal escape sequences
makes sense.
Cheers,
Shaun