diff options
-rw-r--r-- | kernel.c | 27 | ||||
-rw-r--r-- | nvidia-installer.c | 14 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 28 insertions, 15 deletions
@@ -1661,32 +1661,35 @@ PrecompiledInfo *find_precompiled_kernel_interface(Options *op, Package *p) * the user specified via the --kernel-name option, or `uname -r`. */ -char __kernel_name[256]; - char *get_kernel_name(Options *op) { + static char kernel_name[256]; struct utsname uname_buf; - __kernel_name[0] = '\0'; + if (!kernel_name[0]) { + if (uname(&uname_buf) == -1) { + static int uname_failed; - if (uname(&uname_buf) == -1) { - ui_warn(op, "Unable to determine the version of the running kernel " - "(%s).", strerror(errno)); - } else { - strncpy(__kernel_name, uname_buf.release, sizeof(__kernel_name)); - __kernel_name[sizeof(__kernel_name) - 1] = '\0'; + if (!uname_failed) { + ui_warn(op, "Unable to determine the version of the running " + "kernel (%s).", strerror(errno)); + uname_failed = TRUE; + } + } else { + strncpy(kernel_name, uname_buf.release, sizeof(kernel_name) - 1); + } } if (op->kernel_name) { - if (strcmp(op->kernel_name, __kernel_name) != 0) { + if (strcmp(op->kernel_name, kernel_name) != 0) { /* Don't load kernel modules built against a non-running kernel */ op->skip_module_load = TRUE; } return op->kernel_name; } - if (__kernel_name[0]) { - return __kernel_name; + if (kernel_name[0]) { + return kernel_name; } return NULL; diff --git a/nvidia-installer.c b/nvidia-installer.c index 00f8b98..48e684e 100644 --- a/nvidia-installer.c +++ b/nvidia-installer.c @@ -458,7 +458,12 @@ static void parse_commandline(int argc, char *argv[], Options *op) NV_OPTIONAL_BOOL_FALSE; break; case GLVND_GLX_CLIENT_OPTION: - /* This option is no longer used; ignore it. */ + /* This option is no longer used */ + if (!boolval) { + nv_error_msg("The --no-glvnd-glx-client option is no longer supported"); + goto fail; + } + nv_warning_msg("The '--glvnd-glx-client' option is deprecated: " "nvidia-installer will ignore this option."); break; @@ -466,7 +471,12 @@ static void parse_commandline(int argc, char *argv[], Options *op) op->libglvnd_json_path = strval; break; case GLVND_EGL_CLIENT_OPTION: - /* This option is no longer used; ignore it. */ + /* This option is no longer used */ + if (!boolval) { + nv_error_msg("The --no-glvnd-egl-client option is no longer supported"); + goto fail; + } + nv_warning_msg("The '--glvnd-egl-client' option is deprecated: " "nvidia-installer will ignore this option."); break; @@ -1 +1 @@ -NVIDIA_VERSION = 435.21 +NVIDIA_VERSION = 440.26 |