summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2014-02-18 11:23:09 -0800
committerAaron Plattner <aplattner@nvidia.com>2014-02-18 11:23:09 -0800
commit719dd3c25c5d14f6149ee410df2792a5665b6c9f (patch)
tree440a2a300a5a56a0d6b39838a98ac93b98da83af
parente49143d67bf5c67efb9293455d5d69d068c23e6c (diff)
331.49331.49
-rw-r--r--backup.c9
-rw-r--r--files.c42
-rw-r--r--kernel.c4
-rw-r--r--manifest.c3
-rw-r--r--nvidia-installer.h13
-rw-r--r--version.mk2
6 files changed, 52 insertions, 21 deletions
diff --git a/backup.c b/backup.c
index e199396..1f2bef5 100644
--- a/backup.c
+++ b/backup.c
@@ -541,7 +541,7 @@ int log_mkdir(Options *op, const char *dirs)
*/
static int reverse_strlen_compare(const void *a, const void *b)
{
- return strlen((const char *)b) - strlen((const char *)a);
+ return strlen(*(char * const *)b) - strlen(*(char * const *)a);
}
@@ -557,7 +557,7 @@ static int reverse_strlen_compare(const void *a, const void *b)
static int rmdir_recursive(Options *op)
{
FILE *log;
- char *dir, **dirs;
+ char **dirs;
int eof = FALSE, ret = TRUE, lines, i;
/* open the log file */
@@ -572,6 +572,7 @@ static int rmdir_recursive(Options *op)
/* Count the number of lines */
for (lines = 0; !eof; lines++) {
+ char *dir;
dir = fget_next_line(log, &eof);
nvfree(dir);
}
@@ -586,11 +587,11 @@ static int rmdir_recursive(Options *op)
qsort(dirs, lines, sizeof(char*), reverse_strlen_compare);
- for (i = lines; i < lines; i++) {
+ for (i = 0; i < lines; i++) {
if (dirs[i]) {
/* Ignore empty lines and the backup directory itself, since it is
* never empty as long as the dirs file is still around. */
- if (strlen(dirs[i]) && strcmp(dir, BACKUP_DIRECTORY) != 0) {
+ if (strlen(dirs[i]) && strcmp(dirs[i], BACKUP_DIRECTORY) != 0) {
if (rmdir(dirs[i]) != 0) {
ui_log(op, "Failed to delete the directory '%s' (%s).",
dirs[i], strerror(errno));
diff --git a/files.c b/files.c
index 754f2bc..2e74c0e 100644
--- a/files.c
+++ b/files.c
@@ -2175,23 +2175,43 @@ void get_default_prefixes_and_paths(Options *op)
if (op->distro == DEBIAN && !op->compat32_chroot) {
/*
- * Newer versions of Debian have moved to the Ubuntu style of compat32
- * path, so use that if it exists.
+ * Newer versions of Debian install 32-bit compatibility libraries
+ * to dedicated directories that are not part of a chroot structure.
+ * Search for the known paths and use the first one that is found.
*/
- char *default_path = nvstrcat(op->compat32_prefix, "/"
- UBUNTU_DEFAULT_COMPAT32_LIBDIR, NULL);
- struct stat buf;
- if (lstat(default_path, &buf) < 0 || S_ISLNK(buf.st_mode)) {
+
+ char *debian_compat32_paths[] = { DEBIAN_DEFAULT_COMPAT32_LIBDIR,
+ UBUNTU_DEFAULT_COMPAT32_LIBDIR };
+ int i, found = FALSE;
+
+ for (i = 0; i < ARRAY_LEN(debian_compat32_paths); i++) {
+ char *default_path = nvstrcat(op->compat32_prefix, "/",
+ debian_compat32_paths[i], NULL);
+
+ struct stat buf;
+
+ if (lstat(default_path, &buf) == 0 && !S_ISLNK(buf.st_mode)) {
+ /* path exists and is not a symbolic link, so use it */
+ op->compat32_libdir = debian_compat32_paths[i];
+ found = TRUE;
+ }
+
+ nvfree(default_path);
+
+ if (found) {
+ break;
+ }
+ }
+
+ if (!found) {
/*
- * Path doesn't exist or is a symbolic link. Use the compat32
+ * Paths don't exist or are symbolic links. Use the compat32
* chroot path instead.
*/
+
op->compat32_chroot = DEBIAN_DEFAULT_COMPAT32_CHROOT;
- } else {
- /* <prefix>/lib32 exists, so use that */
- op->compat32_libdir = UBUNTU_DEFAULT_COMPAT32_LIBDIR;
}
- nvfree(default_path);
+
}
#endif
diff --git a/kernel.c b/kernel.c
index ae54df6..8612cc3 100644
--- a/kernel.c
+++ b/kernel.c
@@ -598,11 +598,13 @@ static int build_kernel_module_helper(Options *op, const char *dir,
ui_status_end(op, "Error.");
ui_error(op, "Unable to build the %s kernel module.", module);
/* XXX need more descriptive error message */
+
+ return FALSE;
}
ui_status_end(op, "done.");
- return ret == 0;
+ return TRUE;
}
diff --git a/manifest.c b/manifest.c
index b8a304d..39439fe 100644
--- a/manifest.c
+++ b/manifest.c
@@ -173,7 +173,8 @@ void get_installable_file_type_list(
continue;
}
- if ((type == FILE_TYPE_KERNEL_MODULE_SRC) &&
+ if (((type == FILE_TYPE_KERNEL_MODULE_SRC) ||
+ (type == FILE_TYPE_UVM_MODULE_SRC)) &&
op->no_kernel_module_source) {
continue;
}
diff --git a/nvidia-installer.h b/nvidia-installer.h
index 904d43c..6ec5d0a 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -443,9 +443,9 @@ typedef struct __package {
#define XORG7_DEFAULT_X_MODULEDIR "xorg/modules"
/*
- * Debian GNU/Linux for x86-64 installs 32-bit compatibility
- * libraries relative to a chroot-like top-level directory; the
- * prefix below is prepended to the full paths.
+ * Older versions of Debian GNU/Linux for x86-64 install 32-bit
+ * compatibility libraries relative to a chroot-like top-level
+ * directory; the prefix below is prepended to the full paths.
*/
#define DEBIAN_DEFAULT_COMPAT32_CHROOT "/emul/ia32-linux"
@@ -464,6 +464,13 @@ typedef struct __package {
*/
#define UBUNTU_DEFAULT_COMPAT32_LIBDIR "lib32"
+/*
+ * Newer versions of Debian GNU/Linux may install 32-bit
+ * compatibility libraries to ../lib/i386-linux-gnu instead
+ * of ../lib32.
+ */
+
+#define DEBIAN_DEFAULT_COMPAT32_LIBDIR "lib/i386-linux-gnu"
#define DEFAULT_PROC_MOUNT_POINT "/proc"
diff --git a/version.mk b/version.mk
index 2bca142..1012493 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 331.38
+NVIDIA_VERSION = 331.49