On Mon, 23 May 2005 09:01:48 BST, David Woodhouse said:
On Sun, 2005-05-22 at 17:57 -0400, Steve Grubb wrote:
> syscall. Life would be so much easier if arch was before
syscall. The
> attached patch fixes this. Its against the .46 kernel.
I can see the point in the former, but I don't see why the latter makes
any difference. Anyway, as far as I'm concerned they're fine, but I'd
like an ack from Kris.
It allows you to do Perl-ish stuff like this more easily:
($common, $arch, $rest) =~ /(.*)arch=([\S]*)\s(.*)/
if $arch=64bit then // parse $rest with 64 bit pattern
else // parse $rest with 32 bit pattern
If there's arch-dependent values in the $common part, you then need to
re-parse $common as well.
Similar arguments apply for scanf-based parsing - backtracking there is a
pain in the butt....