kernel-doc: init kernel version
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 24 Oct 2007 22:08:48 +0000 (15:08 -0700)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 28 Jan 2008 22:14:35 +0000 (23:14 +0100)
The kernel-doc script triggers a perl warning when invoked
without KERNELVERSION in the environment, rather make it use
the string "unknown kernel version" instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/kernel-doc

index e4fa8d9568ba6850c513f4465ed00f303863b2ff..8cf528b5e65a5fa9fc2918388431f19949a1c11e 100755 (executable)
@@ -334,7 +334,7 @@ while ($ARGV[0] =~ m/^-(.*)/) {
 
 # get kernel version from env
 sub get_kernel_version() {
-    my $version;
+    my $version = 'unknown kernel version';
 
     if (defined($ENV{'KERNELVERSION'})) {
        $version = $ENV{'KERNELVERSION'};