summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-10-29 16:17:00 -0700
committerAaron Plattner <aplattner@nvidia.com>2008-10-29 16:17:00 -0700
commit93461d368967342e206d2f5fbe3eb0307af98bb4 (patch)
tree020457ee02a2f7f8b3f6c9450c1e5a0683ff281e
parent292703f5c8bfcda129f1b92fe9a77b289ee89342 (diff)
71.86.0771.86.07
-rw-r--r--DRIVER_VERSION2
-rw-r--r--kernel.c31
-rw-r--r--misc.c4
-rw-r--r--nvidia-installer.h2
-rw-r--r--snarf.c6
-rw-r--r--update.c9
6 files changed, 44 insertions, 10 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION
index e1a9ec3..dd1ac03 100644
--- a/DRIVER_VERSION
+++ b/DRIVER_VERSION
@@ -1 +1 @@
-71.86.06
+71.86.07
diff --git a/kernel.c b/kernel.c
index d0c0e89..122d2c5 100644
--- a/kernel.c
+++ b/kernel.c
@@ -668,8 +668,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);
/*
@@ -685,9 +685,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);
+ }
}
/*
@@ -770,9 +778,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 b9500ae..37a980a 100644
--- a/misc.c
+++ b/misc.c
@@ -695,7 +695,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 0e87fdf..e719b8a 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -46,6 +46,8 @@ typedef enum {
DMESG,
TAIL,
CUT,
+ TR,
+ SED,
MAX_SYSTEM_UTILS
} SystemUtils;
diff --git a/snarf.c b/snarf.c
index 147fcb5..35d8e81 100644
--- a/snarf.c
+++ b/snarf.c
@@ -68,6 +68,12 @@ int snarf(Options *op, const char *url, int out_fd, uint32 flags)
UrlResource *rsrc = NULL;
int ret;
+ if (op->no_network) {
+ ui_error(op, "Unable to access file '%s', because the '--no-network' "
+ "commandline option was specified.", url);
+ return FALSE;
+ }
+
rsrc = url_resource_new();
rsrc->url = url_new();
rsrc->op = op;
diff --git a/update.c b/update.c
index 3615db5..ed491b2 100644
--- a/update.c
+++ b/update.c
@@ -284,6 +284,15 @@ static int get_latest_driver_version_and_filename(Options *op,
url = nvstrcat(op->ftp_site, "/XFree86/", INSTALLER_OS, "-",
INSTALLER_ARCH, "/latest.txt", NULL);
+ /* check for no_network option */
+
+ if (op->no_network) {
+ ui_error(op, "Unable to determine most recent NVIDIA %s-%s driver "
+ "version: cannot access '%s', because the '--no-network' "
+ "commandline option was specified.", INSTALLER_OS, INSTALLER_ARCH, url);
+ goto done;
+ }
+
if ((fd = mkstemp(tmpfile)) == -1) {
ui_error(op, "Unable to create temporary file (%s)", strerror(errno));
goto done;