Re: [PATCH] markup_oops.pl: add options to improve cross-sompilation environments

From: Michal Marek
Date: Fri Feb 05 2010 - 16:39:11 EST


On 1.2.2010 06:41, Hui Zhu wrote:
> I make a patch according to your mail.
>
> Best regards,
> Hui
>
> 1. Fix a little format issue.
> 2. Check the return of "Getopt::Long::GetOptions". Output usage and
> exit if it get error.
> 3. Change $ARGV[$#ARGV] to $ARGV[0].
> 4. Change the code which get $modulefile from modinfo. Replace the
> pipeline with `modinfo -F filename $module`.
> 4. Change usage from "Specify the module directory name" to "Specify the
> module filename".
>
> Signed-off-by: Hui Zhu <teawater@xxxxxxxxx>

Thanks, I applied the previous and this patch. Just to make sure I
didn't miss any of your patches, can you check that
http://repo.or.cz/w/linux-kbuild.git/blob/refs/heads/for-next:/scripts/markup_oops.pl
has all your changes? If something is missing, please resend it, thanks.

Michal

> ---
> scripts/markup_oops.pl | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> --- a/scripts/markup_oops.pl
> +++ b/scripts/markup_oops.pl
> @@ -23,10 +23,10 @@ my $modulefile = "";
> # Get options
> Getopt::Long::GetOptions(
> 'cross-compile|c=s' => \$cross_compile,
> - 'module|m=s' => \$modulefile,
> + 'module|m=s' => \$modulefile,
> 'help|h' => \&usage,
> -);
> -my $vmlinux_name = $ARGV[$#ARGV];
> +) || usage ();
> +my $vmlinux_name = $ARGV[0];
> if (!defined($vmlinux_name)) {
> my $kerver = `uname -r`;
> chomp($kerver);
> @@ -193,7 +193,7 @@ if ($target eq "0") {
> # if it's a module, we need to find the .ko file and calculate a load
> offset
> if ($module ne "") {
> if ($modulefile eq "") {
> - my $modulefile = `modinfo $module | grep '^filename:' | awk '{
> print \$2 }'`;
> + $modulefile = `modinfo -F filename $module`;
> chomp($modulefile);
> }
> $filename = $modulefile;
> @@ -361,7 +361,7 @@ Usage:
>
> OPTION:
> -c, --cross-compile CROSS_COMPILE Specify the prefix used for
> toolchain.
> - -m, --module MODULE_DIRNAME Specify the module directory name.
> + -m, --module MODULE_DIRNAME Specify the module filename.
> -h, --help Help.
> EOT
> exit;
>
>

--
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/