On Thu, 19 Apr 2007 09:19:32 +0200 Borislav Petkov <[EMAIL PROTECTED]> wrote:

> +# get kernel version
> +sub get_kernel_version() {
> +    my $version;
> +    open (FILE, $ENV{"SRCTREE"}."Makefile") || die "Can't open main kernel 
> Makefile: $!";
> +
> +    EOF: while (my $line = <FILE>)
> +    {
> +     if ($line =~ /VERSION\s+=\s+(\d+)/) {
> +          $version .= $1;
> +          next;
> +     }
> +     if ($line =~ /PATCHLEVEL\s+=\s+(\d+)/) {
> +          $version .= ".$1";
> +          next;
> +     }
> +     if ($line =~ /SUBLEVEL\s+=\s+(\d+)/) {
> +          $version .= ".$1";
> +          next;
> +     }
> +     if ($line =~ /EXTRAVERSION\s+=\s+(.*)$/) {
> +          $version .= $1;
> +          last EOF;
> +     }
> +    }
> +    return $version;
> +}

we already did this in the top-level Makefile.  It's in $(KERNELVERSION)
and is printed by `make kernelversion'.

Cannot we use that info somehow?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to