Re: [PATCH] Use sed instead of perl to generatex86/kernel/cpu/capflags.c.
From: AmÃrico Wang
Date: Tue Jan 18 2011 - 23:57:40 EST
On Tue, Jan 18, 2011 at 02:58:27PM -0600, Rob Landley wrote:
>
>From: Rob Landley <rlandley@xxxxxxxxxxxxx>
>
>Replace perl header file generator with smaller/faster/simpler C version.
>
>Signed-off-by: Rob Landley <rlandley@xxxxxxxxxxxxx>
Pretty nice!
One small problem below.
>
>I ran the attached test script to compare the output of the C program
>with the output of the perl version for every HZ from 1 to 5000 to make
>sure it was producing the same constants.
>
I think you can use diff to compare the perl output and C output,
with different HZ values.
>+ fprintf(file, "#endif /* __KERNEL_TIMECONST_H */\n");
>+
>+ /* Notice if the disk fills up. */
>+
>+ fflush(stdout);
>+ return ferror(stdout);
Why do you fflush stdout while you are writing to 'file'?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/