Merge pull request #58 from nlydeen/master
Altered kernel version check to allow 4.x.x kernels
This commit is contained in:
commit
c3209dfe14
1 changed files with 4 additions and 4 deletions
|
@ -71,9 +71,9 @@ bool is_legacy_kernel()
|
||||||
char *str_kernel_version;
|
char *str_kernel_version;
|
||||||
str_kernel_version = strtok(kernel.release, ".");
|
str_kernel_version = strtok(kernel.release, ".");
|
||||||
|
|
||||||
if (atoi(str_kernel_version) != 3){
|
if (atoi(str_kernel_version) < 3){
|
||||||
syslog(LOG_INFO, "mbpfan detected a non 3.x.x linux kernel. Detected version: %s. Exiting.\n", kernel.release);
|
syslog(LOG_INFO, "mbpfan detected a pre-3.x.x linux kernel. Detected version: %s. Exiting.\n", kernel.release);
|
||||||
printf("mbpfan detected a non 3.x.x linux kernel. Detected version: %s. Exiting.\n", kernel.release);
|
printf("mbpfan detected a pre-3.x.x linux kernel. Detected version: %s. Exiting.\n", kernel.release);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ bool is_legacy_kernel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (kernel_version < 15);
|
return (atoi(kernel.release) == 3 && kernel_version < 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue