File git-16-ed897a1090cafb678f75dbed8802bd671d3c1921.patch of Package aaa_base.24604

commit ed897a1090cafb678f75dbed8802bd671d3c1921
Author: Ruediger Oertel <ro@suse.de>
Date:   Thu Feb 6 11:20:51 2020 +0100

    get_kernel_version: fix for current kernel on s390x (from azouhr)
    
    keep on searching if only the string "version:" is found but the
    next char is a null.

diff --git a/get_kernel_version.c b/get_kernel_version.c
index 569b67c..236b749 100644
--- a/get_kernel_version.c
+++ b/get_kernel_version.c
@@ -99,7 +99,9 @@ main (int argc, char *argv[])
 	    buffer[i+6] == 'v' && buffer[i+7] == 'e' &&
 	    buffer[i+8] == 'r' && buffer[i+9] == 's' &&
 	    buffer[i+10] == 'i' && buffer[i+11] == 'o' &&
-	    buffer[i+12] == 'n' && buffer[i+13] == ' ')
+	    buffer[i+12] == 'n' && buffer[i+13] == ' ' &&
+	    /* current s390 images have that string without version: */
+	    buffer[i+14] != 0)
           {
 	    int j = i+14;
 	    int number_dots = 0;
openSUSE Build Service is sponsored by