From 81f9028dc2e391653b00430e88c15105cab59585 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Oct 26 2018 22:09:50 +0000 Subject: Handle kernel versions after 2.4.x/2.6.x Originally from Debian Signed-off-by: Al Stone --- diff --git a/ChangeLog b/ChangeLog index 29b39c9..a5dd7ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ acpitool-0.5.2 - 26 Oct 2018 - correct reading of battery info (Authors: Evgeni Golov , Michael Meskes ) + * src/acpitool.cpp: + - handle versions of the kernel after 2.4.x/2.6.x (originally + from Debian) acpitool-0.5.1 - 13-08-2008 diff --git a/src/acpitool.cpp b/src/acpitool.cpp index 2a610a5..bf80db7 100644 --- a/src/acpitool.cpp +++ b/src/acpitool.cpp @@ -205,8 +205,7 @@ int Set_Kernel_Version() Kernel_24 = 1; Kernel_26 = 0; } - - if(strncmp(str,"2.6",3)==0) + else { Kernel_24 = 0; Kernel_26 = 1;