On Sat, Sep 20, 2014 at 4:52 AM, Dmitry V. Levin <[email protected]> wrote:
> Hi,
>
> On Fri, Sep 19, 2014 at 06:30:09PM -0700, enh wrote:
>> how do i regenerate an xlat .in file from a uapi header file? i notice
>> that fsmagic.in is very out of date.
>
> fsmagic.in differs from most of other xlat files: it doesn't rely on
> macros provided by linux kernel headers because there was no
> <linux/magic.h> before linux 2.6.19.  We can either continue or end this
> practice.
>
> In the former case, the script to regenerate fsmagic.in is likely to be this:
> $ sed -rn 
> 's/^#define[[:space:]]+([^[:space:]]+)[[:space:]]+(0x[^[:space:]]+).*/\t{\2,\t"\1"\t},/p'
>  include/uapi/linux/magic.h |sort -u -k2,2
>
> In the latter case, a bit shorter script would do:
> $ sed -rn 
> 's/^#define[[:space:]]+([^[:space:]]+)[[:space:]]+(0x[^[:space:]]+).*/\2\t\1/p'
>  include/uapi/linux/magic.h |sort -u -k1,1 |cut -f2
> (preceded by #include <linux/magic.h>)
>
> The "sort -u -k" is required to get rid of EXT2/3/4 duplications.
>
> I'm slightly more inclined to choose a conservative approach.

i just did a "git fetch" before doing this and found you'd already
done it (and more). thanks! merged to Android.

 --elliott

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to