summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DRIVER_VERSION2
-rw-r--r--kernel.c31
-rw-r--r--misc.c4
-rw-r--r--nvidia-installer.h2
4 files changed, 29 insertions, 10 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION
index 5925946..1799f7a 100644
--- a/DRIVER_VERSION
+++ b/DRIVER_VERSION
@@ -1 +1 @@
-173.14.12
+173.14.15
diff --git a/kernel.c b/kernel.c
index d4fccc8..af9d3dd 100644
--- a/kernel.c
+++ b/kernel.c
@@ -670,8 +670,8 @@ void check_for_warning_messages(Options *op)
int test_kernel_module(Options *op, Package *p)
{
char *cmd = NULL, *data;
- int old_loglevel, new_loglevel = 0;
- int ret, name[] = { CTL_KERN, KERN_PRINTK };
+ int old_loglevel = 0, new_loglevel = 0;
+ int fd, ret, name[] = { CTL_KERN, KERN_PRINTK };
size_t len = sizeof(int);
/*
@@ -687,9 +687,17 @@ int test_kernel_module(Options *op, Package *p)
* Save the original console loglevel to allow restoring it once
* we're done.
*/
- if (!sysctl(name, 2, &old_loglevel, &len, NULL, 0)) {
- new_loglevel = 2; /* KERN_CRIT */
- sysctl(name, 2, NULL, 0, &new_loglevel, len);
+ fd = open("/proc/sys/kernel/printk", O_RDWR);
+ if (fd >= 0) {
+ if (read(fd, &old_loglevel, 1) == 1) {
+ new_loglevel = '2'; /* KERN_CRIT */
+ write(fd, &new_loglevel, 1);
+ }
+ } else {
+ if (!sysctl(name, 2, &old_loglevel, &len, NULL, 0)) {
+ new_loglevel = 2; /* KERN_CRIT */
+ sysctl(name, 2, NULL, 0, &new_loglevel, len);
+ }
}
/*
@@ -782,9 +790,16 @@ int test_kernel_module(Options *op, Package *p)
nvfree(cmd);
nvfree(data);
-
- if (new_loglevel != 0) sysctl(name, 2, NULL, 0, &old_loglevel, len);
-
+
+ if (fd >= 0) {
+ if (new_loglevel != 0)
+ write(fd, &old_loglevel, 1);
+ close(fd);
+ } else {
+ if (new_loglevel != 0)
+ sysctl(name, 2, NULL, 0, &old_loglevel, len);
+ }
+
return ret;
} /* test_kernel_module() */
diff --git a/misc.c b/misc.c
index 540ae2e..10304ac 100644
--- a/misc.c
+++ b/misc.c
@@ -700,7 +700,9 @@ int find_system_utils(Options *op)
{ "grep", "grep" },
{ "dmesg", "util-linux" },
{ "tail", "coreutils" },
- { "cut", "coreutils" }
+ { "cut", "coreutils" },
+ { "tr", "coreutils" },
+ { "sed", "sed" }
};
/* keep in sync with the SystemOptionalUtils enum type */
diff --git a/nvidia-installer.h b/nvidia-installer.h
index e664dbf..509e441 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -46,6 +46,8 @@ typedef enum {
DMESG,
TAIL,
CUT,
+ TR,
+ SED,
MAX_SYSTEM_UTILS
} SystemUtils;