From: Bart Van Assche Date: Thu, 1 May 2008 12:35:48 +0000 (+0000) Subject: Make sure the test for kernel version 2.6.22 will work correctly for the future kerne... X-Git-Tag: svn/VALGRIND_3_4_0~666 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcb85a68fbe66dc572d4d4f87ccea8f9b8694375;p=thirdparty%2Fvalgrind.git Make sure the test for kernel version 2.6.22 will work correctly for the future kernel versions 2.6.220 .. 2.6.229. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7971 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 235fb4e32c..f885669330 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -1730,7 +1730,8 @@ static int linux_kernel_2_6_22(void) release[read] = 0; VG_(close)(fd); //VG_(printf)("kernel release = %s\n", release); - result = (VG_(strncmp)(release, "2.6.22", 6) == 0); + result = (VG_(strncmp)(release, "2.6.22", 6) == 0 + && (release[6] < '0' || release[6] > '9')); } return result; }