summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-02-13 10:21:37 -0800
committerAaron Plattner <aplattner@nvidia.com>2008-02-13 10:21:37 -0800
commit2237736ab7b463710696a5c979931852528bf78e (patch)
treed127ef76dacff334ab8db37bcaa17490f5c55e3c
parente891529a4151bc9276d8be655540a8456f3fa6f7 (diff)
1.0-96391.0-9639
-rw-r--r--DRIVER_VERSION2
-rw-r--r--backup.c6
-rw-r--r--command-list.c17
-rw-r--r--files.c202
-rw-r--r--install-from-cwd.c6
-rw-r--r--misc.c19
-rw-r--r--nvLegacy.h92
-rw-r--r--nvidia-installer.h10
-rw-r--r--user-interface.c15
9 files changed, 178 insertions, 191 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION
index 44494f7..ea7fd6a 100644
--- a/DRIVER_VERSION
+++ b/DRIVER_VERSION
@@ -1 +1 @@
-1.0-9762
+1.0-9639
diff --git a/backup.c b/backup.c
index dbb168c..85e2130 100644
--- a/backup.c
+++ b/backup.c
@@ -494,9 +494,9 @@ static int do_uninstall(Options *op)
"Your driver installation has been "
"altered since it was initially installed; this may happen, "
"for example, if you have since installed the NVIDIA driver through "
- "a mechanism other than the nvidia-installer (such as rpm or "
- "with the NVIDIA tarballs). The nvidia-installer will "
- "attempt to uninstall as best it can.";
+ "a mechanism other than nvidia-installer (such as your "
+ "distribution's native package management system). "
+ "nvidia-installer will attempt to uninstall as best it can.";
/* do we even have a backup directory? */
diff --git a/command-list.c b/command-list.c
index c768d8c..e604a20 100644
--- a/command-list.c
+++ b/command-list.c
@@ -174,7 +174,6 @@ CommandList *build_command_list(Options *op, Package *p)
/*
* find any existing files that clash with what we're going to
* install
- * DON'T include files of type FILE_TYPE_NEWSYM
*/
find_existing_files(p, l, installable_files | FILE_TYPE_SYMLINK);
@@ -240,21 +239,7 @@ CommandList *build_command_list(Options *op, Package *p)
/* create any needed symbolic links */
for (i = 0; i < p->num_entries; i++) {
- if ((p->entries[i].flags & FILE_TYPE_SYMLINK) ||
- (p->entries[i].flags & FILE_TYPE_NEWSYM)) {
- /* if it's a NEWSYM and the file already exists, don't add a command
- * for it */
- if (p->entries[i].flags & FILE_TYPE_NEWSYM) {
- struct stat buf;
- if(!stat(p->entries[i].dst, &buf) || errno != ENOENT) {
- ui_expert(op, "Not creating a symlink from %s to %s "
- "because a file already exists at that path "
- "or the path is inaccessible.",
- p->entries[i].dst, p->entries[i].target);
- continue;
- }
- }
-
+ if (p->entries[i].flags & FILE_TYPE_SYMLINK) {
add_command(c, SYMLINK_CMD, p->entries[i].dst,
p->entries[i].target);
}
diff --git a/files.c b/files.c
index fb028d5..77b5449 100644
--- a/files.c
+++ b/files.c
@@ -522,7 +522,6 @@ int set_destinations(Options *op, Package *p)
case FILE_TYPE_XMODULE_SHARED_LIB:
case FILE_TYPE_XMODULE_SYMLINK:
- case FILE_TYPE_XMODULE_NEWSYM:
prefix = op->x_module_path;
dir = "";
path = p->entries[i].path;
@@ -1977,6 +1976,66 @@ static char *get_xdg_data_dir(void)
}
+
+/*
+ * extract_x_path() - take a comma-separated list of directories, and
+ * extract the next available directory in the list. Assign the
+ * 'next' pointer so that it points to where we should continue during
+ * the next call of extract_x_path().
+ *
+ * On success, return a pointer to the next directory in the string,
+ * and update the 'next' pointer. When we have exhausted the list,
+ * NULL is returned.
+ *
+ * Note that this will destructively replace commas with NULL
+ * terminators in the string.
+ */
+
+static char *extract_x_path(char *str, char **next)
+{
+ char *start;
+
+ /*
+ * choose where to start in the string: either we start at the
+ * beginning, or we start immediately after where we found a comma
+ * last time
+ */
+
+ start = str;
+
+ if (*next) start = *next;
+
+ /* skip past any commas at the start */
+
+ while (*start == ',') start++;
+
+ /* if we hit the end of the string, return now */
+
+ if (*start == '\0') return NULL;
+
+ /*
+ * find the next comma in the string; if we find one, change it to
+ * a NULL terminator (and move 'next' to the character immediately
+ * after the comma); if we don't find a comma, move the 'next'
+ * pointer to the end of the string, so that we terminate on the
+ * next call to extract_x_path()
+ */
+
+ *next = strchr(start, ',');
+
+ if (*next) {
+ **next = '\0';
+ (*next)++;
+ } else {
+ *next = strchr(start, '\0');
+ }
+
+ return start;
+
+} /* extract_x_path() */
+
+
+
/*
* get_x_paths_helper() - helper function for determining the X
* library and module paths; returns 'TRUE' if we had to guess at the
@@ -1990,7 +2049,7 @@ static int get_x_paths_helper(Options *op,
char *name,
char **path)
{
- char *dir, *cmd;
+ char *dirs, *cmd, *dir, *next;
int ret, guessed = 0;
/*
@@ -2003,94 +2062,121 @@ static int get_x_paths_helper(Options *op,
}
/*
- * if this is a modular X server, then attempt to determine the
- * path through the various query mechanisms
+ * attempt to determine the path through the various query mechanisms
+ *
+ * xorg-server >= 1.3 has a stupid version number regression because the
+ * reported Xorg version was tied to the server version, meaning what used
+ * to report 7.2 now reports, for example, 1.2.99.903. This means we set
+ * op->modular_xorg to FALSE. However, any server with this regression will
+ * also support the -showDefaultModulePath option so we should still be able
+ * to get the right path.
*/
-
- if (op->modular_xorg) {
-
- /*
- * first, try the X server commandline option; this is the
- * recommended query mechanism as of X.Org 7.2
- */
-
- if (op->utils[XSERVER]) {
-
- dir = NULL;
- cmd = nvstrcat(op->utils[XSERVER], " ", xserver_cmd, NULL);
- ret = run_command(op, cmd, &dir, FALSE, 0, TRUE);
- nvfree(cmd);
+
+ /*
+ * first, try the X server commandline option; this is the
+ * recommended query mechanism as of X.Org 7.2
+ */
+ if (op->utils[XSERVER]) {
+
+ dirs = NULL;
+ cmd = nvstrcat(op->utils[XSERVER], " ", xserver_cmd, NULL);
+ ret = run_command(op, cmd, &dirs, FALSE, 0, TRUE);
+ nvfree(cmd);
+
+ if ((ret == 0) && dirs) {
+
+ next = NULL;
+
+ dir = extract_x_path(dirs, &next);
- if ((ret == 0) && dir) {
+ while (dir) {
if (directory_exists(op, dir)) {
ui_expert(op, "X %s path '%s' determined from `%s %s`",
name, dir, op->utils[XSERVER], xserver_cmd);
- *path = dir;
+ *path = nvstrdup(dir);
+
+ nvfree(dirs);
+
return FALSE;
-
+
} else {
ui_warn(op, "You appear to be using a modular X.Org "
"release, but the X %s installation "
- "path reported by `%s %s` does not exist. "
+ "path, '%s', reported by `%s %s` does not exist. "
"Please check your X.Org installation.",
- name, op->utils[XSERVER], xserver_cmd);
+ name, dir, op->utils[XSERVER], xserver_cmd);
}
+
+ dir = extract_x_path(dirs, &next);
}
-
- nvfree(dir);
}
-
- /*
- * then, try the pkg-config command; this was the the
- * pseudo-recommended query mechanism between X.Org 7.0 and
- * X.Org 7.2
- */
-
- if (op->utils[PKG_CONFIG]) {
-
- dir = NULL;
- cmd = nvstrcat(op->utils[PKG_CONFIG], " ",
- pkg_config_cmd, NULL);
- ret = run_command(op, cmd, &dir, FALSE, 0, TRUE);
- nvfree(cmd);
+
+ nvfree(dirs);
+ }
+
+ /*
+ * then, try the pkg-config command; this was the the
+ * pseudo-recommended query mechanism between X.Org 7.0 and
+ * X.Org 7.2
+ */
+ if (op->utils[PKG_CONFIG]) {
+
+ dirs = NULL;
+ cmd = nvstrcat(op->utils[PKG_CONFIG], " ",
+ pkg_config_cmd, NULL);
+ ret = run_command(op, cmd, &dirs, FALSE, 0, TRUE);
+ nvfree(cmd);
+
+ if ((ret == 0) && dirs) {
+
+ next = NULL;
- if ((ret == 0) && dir) {
+ dir = extract_x_path(dirs, &next);
+
+ while (dir) {
if (directory_exists(op, dir)) {
-
+
ui_expert(op, "X %s path '%s' determined from `%s %s`",
name, dir, op->utils[PKG_CONFIG],
pkg_config_cmd);
+
+ *path = nvstrdup(dir);
+
+ nvfree(dirs);
- *path = dir;
return FALSE;
-
+
} else {
ui_warn(op, "You appear to be using a modular X.Org "
"release, but the X %s installation "
- "path reported by `%s %s` does not exist. "
+ "path, '%s', reported by `%s %s` does not exist. "
"Please check your X.Org installation.",
- name, op->utils[PKG_CONFIG], pkg_config_cmd);
+ name, dir, op->utils[PKG_CONFIG], pkg_config_cmd);
}
+
+ dir = extract_x_path(dirs, &next);
}
-
- nvfree(dir);
}
-
- /*
- * neither of the above mechanisms yielded a usable path; fall
- * through to constructing the path by hand; record that we
- * have to guess the path so that we can print a warning when
- * we are done
- */
-
- guessed = TRUE;
+
+ nvfree(dirs);
}
-
-
+
+ /*
+ * neither of the above mechanisms yielded a usable path; fall
+ * through to constructing the path by hand. If this is a modular X server,
+ * record that we have to guess the path so that we can print a warning when
+ * we are done. For non-modular X, the default of /usr/X11R6/lib is
+ * standard.
+ */
+
+ if (op->modular_xorg)
+ guessed = TRUE;
+
+
/* build the path */
if (library) {
diff --git a/install-from-cwd.c b/install-from-cwd.c
index 90f7285..10ff483 100644
--- a/install-from-cwd.c
+++ b/install-from-cwd.c
@@ -655,8 +655,6 @@ static Package *parse_manifest (Options *op)
p->entries[n].flags |= FILE_TYPE_XMODULE_SHARED_LIB;
else if (strcmp(flag, "XMODULE_SYMLINK") == 0)
p->entries[n].flags |= FILE_TYPE_XMODULE_SYMLINK;
- else if (strcmp(flag, "XMODULE_NEWSYM") == 0)
- p->entries[n].flags |= FILE_TYPE_XMODULE_NEWSYM;
else {
nvfree(flag);
goto invalid_manifest_file;
@@ -709,9 +707,9 @@ static Package *parse_manifest (Options *op)
p->entries[n].path = NULL;
}
- /* symlinks and newsyms have a target */
+ /* symlinks have a target */
- if (p->entries[n].flags & FILE_TYPE_HAVE_TARGET) {
+ if (p->entries[n].flags & FILE_TYPE_SYMLINK) {
p->entries[n].target = read_next_word(c, &c);
if (!p->entries[n].target) goto invalid_manifest_file;
} else {
diff --git a/misc.c b/misc.c
index 52d91ca..85dfab4 100644
--- a/misc.c
+++ b/misc.c
@@ -1237,8 +1237,6 @@ void check_installed_files_from_package(Options *op, Package *p)
ui_status_update(op, percent, p->entries[i].dst);
if (p->entries[i].flags & FILE_TYPE_SYMLINK) {
- /* Don't bother checking FILE_TYPE_NEWSYMs because we may not have
- * installed them. */
if (!check_symlink(op, p->entries[i].target,
p->entries[i].dst,
p->description)) {
@@ -2080,24 +2078,11 @@ int check_for_nvidia_graphics_devices(Options *op, Package *p)
int found_legacy_device = FALSE;
for (i = 0; i < sizeof(LegacyList) / sizeof(LEGACY_INFO); i++) {
if (dev->device_id == LegacyList[i].uiDevId) {
- int j, nstrings;
- const char *branch_string = "";
- nstrings = sizeof(LegacyStrings) / sizeof(LEGACY_STRINGS);
- for (j = 0; j < nstrings; j++) {
- if (LegacyStrings[j].branch == LegacyList[i].branch) {
- branch_string = LegacyStrings[j].description;
- break;
- }
- }
-
ui_warn(op, "The NVIDIA %s GPU installed in this system is supported "
- "through the NVIDIA %s legacy Linux graphics drivers. Please "
+ "through the NVIDIA legacy Linux graphics drivers. Please "
"visit http://www.nvidia.com/object/unix.html for more "
"information. The %s NVIDIA Linux graphics driver will "
- "ignore this GPU.",
- LegacyList[i].AdapterString,
- branch_string,
- p->version_string);
+ "ignore this GPU.", LegacyList[i].AdapterString, p->version_string);
found_legacy_device = TRUE;
}
}
diff --git a/nvLegacy.h b/nvLegacy.h
index 9fb21fe..c2ec23c 100644
--- a/nvLegacy.h
+++ b/nvLegacy.h
@@ -1,7 +1,7 @@
/*
* nvLegacy.h
*
- * Copyright (c) 2006, Nvidia Corporation. All rights reserved.
+ * Copyright (c) 2005, Nvidia Corporation. All rights reserved.
*
* THE INFORMATION CONTAINED HEREIN IS PROPRIETARY AND CONFIDENTIAL TO
* NVIDIA, CORPORATION. USE, REPRODUCTION OR DISCLOSURE TO ANY THIRD PARTY
@@ -12,84 +12,26 @@
#define __NV_LEGACY_H
typedef struct _LEGACY_INFO {
- unsigned int uiDevId;
- unsigned int branch;
- char* AdapterString;
+ unsigned int uiDevId;
+ char* AdapterString;
} LEGACY_INFO;
-typedef struct _LEGACY_STRINGS {
- unsigned int branch;
- char* description;
-} LEGACY_STRINGS;
-
-/*
- * This table describes how we should refer to legacy branches.
- */
-static const LEGACY_STRINGS LegacyStrings[] = {
- { 2, "1.0-96xx" },
- { 1, "1.0-71xx" }
-};
-
// This is the list of the legacy GPUs
static const LEGACY_INFO LegacyList[] = {
-// PCI-ID Branch Marketing name
- { 0x0020, 1, "RIVA TNT" },
- { 0x0028, 1, "RIVA TNT2/TNT2 Pro" },
- { 0x0029, 1, "RIVA TNT2 Ultra" },
- { 0x002C, 1, "Vanta/Vanta LT" },
- { 0x002D, 1, "RIVA TNT2 Model 64/Model 64 Pro" },
- { 0x00A0, 1, "Aladdin TNT2" },
- { 0x0100, 1, "GeForce 256" },
- { 0x0101, 1, "GeForce DDR" },
- { 0x0103, 1, "Quadro" },
- { 0x0110, 2, "GeForce2 MX/MX 400" },
- { 0x0111, 2, "GeForce2 MX 100/200" },
- { 0x0112, 2, "GeForce2 Go" },
- { 0x0113, 2, "Quadro2 MXR/EX/Go" },
- { 0x0150, 1, "GeForce2 GTS/GeForce2 Pro" },
- { 0x0151, 1, "GeForce2 Ti" },
- { 0x0152, 1, "GeForce2 Ultra" },
- { 0x0153, 1, "Quadro2 Pro" },
- { 0x0170, 2, "GeForce4 MX 460" },
- { 0x0171, 2, "GeForce4 MX 440" },
- { 0x0172, 2, "GeForce4 MX 420" },
- { 0x0173, 2, "GeForce4 MX 440-SE" },
- { 0x0174, 2, "GeForce4 440 Go" },
- { 0x0175, 2, "GeForce4 420 Go" },
- { 0x0176, 2, "GeForce4 420 Go 32M" },
- { 0x0177, 2, "GeForce4 460 Go" },
- { 0x0178, 2, "Quadro4 550 XGL" },
- { 0x0179, 2, "GeForce4 440 Go 64M" },
- { 0x017A, 2, "Quadro NVS 400" },
- { 0x017C, 2, "Quadro4 500 GoGL" },
- { 0x017D, 2, "GeForce4 410 Go 16M" },
- { 0x0181, 2, "GeForce4 MX 440 with AGP8X" },
- { 0x0182, 2, "GeForce4 MX 440SE with AGP8X" },
- { 0x0183, 2, "GeForce4 MX 420 with AGP8X" },
- { 0x0185, 2, "GeForce4 MX 4000" },
- { 0x0188, 2, "Quadro4 580 XGL" },
- { 0x018A, 2, "Quadro NVS 280 SD" },
- { 0x018B, 2, "Quadro4 380 XGL" },
- { 0x018C, 2, "Quadro NVS 50 PCI" },
- { 0x01A0, 2, "GeForce2 Integrated GPU" },
- { 0x01F0, 2, "GeForce4 MX Integrated GPU" },
- { 0x0200, 2, "GeForce3" },
- { 0x0201, 2, "GeForce3 Ti 200" },
- { 0x0202, 2, "GeForce3 Ti 500" },
- { 0x0203, 2, "Quadro DCC" },
- { 0x0250, 2, "GeForce4 Ti 4600" },
- { 0x0251, 2, "GeForce4 Ti 4400" },
- { 0x0253, 2, "GeForce4 Ti 4200" },
- { 0x0258, 2, "Quadro4 900 XGL" },
- { 0x0259, 2, "Quadro4 750 XGL" },
- { 0x025B, 2, "Quadro4 700 XGL" },
- { 0x0280, 2, "GeForce4 Ti 4800" },
- { 0x0281, 2, "GeForce4 Ti 4200 with AGP8X" },
- { 0x0282, 2, "GeForce4 Ti 4800 SE" },
- { 0x0286, 2, "GeForce4 4200 Go" },
- { 0x0288, 2, "Quadro4 980 XGL" },
- { 0x0289, 2, "Quadro4 780 XGL" },
- { 0x028C, 2, "Quadro4 700 GoGL" }
+// PCI-ID Marketing name
+ { 0x0020, "RIVA TNT" },
+ { 0x0028, "RIVA TNT2/TNT2 Pro" },
+ { 0x00A0, "Aladdin TNT2" },
+ { 0x002C, "Vanta/Vanta LT" },
+ { 0x0029, "RIVA TNT2 Ultra" },
+ { 0x002D, "RIVA TNT2 Model 64/Model 64 Pro" },
+ { 0x0100, "GeForce 256" },
+ { 0x0101, "GeForce DDR" },
+ { 0x0103, "Quadro" },
+ { 0x0150, "GeForce2 GTS/GeForce2 Pro" },
+ { 0x0151, "GeForce2 Ti" },
+ { 0x0152, "GeForce2 Ultra" },
+ { 0x0153, "Quadro2 Pro" }
};
#endif /* __NV_LEGACY_H */
diff --git a/nvidia-installer.h b/nvidia-installer.h
index c5df1e8..aacc02e 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -302,9 +302,7 @@ typedef struct {
#define FILE_TYPE_UTILITY_SYMLINK 0x00020000
#define FILE_TYPE_XMODULE_SHARED_LIB 0x00040000
#define FILE_TYPE_XMODULE_SYMLINK 0x00080000
-/* Create a symlink only if the file doesn't exist */
-#define FILE_TYPE_XMODULE_NEWSYM 0x00100000
-#define FILE_TYPE_MANPAGE 0x00200000
+#define FILE_TYPE_MANPAGE 0x00100000
/* file class: this is used to distinguish OpenGL libraries */
@@ -336,7 +334,6 @@ typedef struct {
#define FILE_TYPE_HAVE_PATH (FILE_TYPE_XMODULE_LIB | \
FILE_TYPE_XMODULE_SYMLINK | \
- FILE_TYPE_XMODULE_NEWSYM | \
FILE_TYPE_MANPAGE | \
FILE_TYPE_OPENGL_HEADER | \
FILE_TYPE_TLS_LIB | \
@@ -359,11 +356,6 @@ typedef struct {
FILE_TYPE_XMODULE_SYMLINK | \
FILE_TYPE_UTILITY_SYMLINK)
-#define FILE_TYPE_NEWSYM (FILE_TYPE_XMODULE_NEWSYM)
-
-#define FILE_TYPE_HAVE_TARGET (FILE_TYPE_SYMLINK | \
- FILE_TYPE_NEWSYM)
-
#define FILE_TYPE_RTLD_CHECKED (FILE_TYPE_OPENGL_LIB | \
FILE_TYPE_TLS_LIB)
diff --git a/user-interface.c b/user-interface.c
index c9910fa..55b7b2c 100644
--- a/user-interface.c
+++ b/user-interface.c
@@ -433,8 +433,8 @@ void ui_status_end(Options *op, const char *fmt, ...)
void ui_close (Options *op)
{
- if (__ui) __ui->close(op);
-
+ __ui->close(op);
+
if (__extracted_user_interface_filename) {
unlink(__extracted_user_interface_filename);
}
@@ -582,12 +582,11 @@ static void ui_signal_handler(int n)
};
const char *s;
-
- ui_close(NULL); /*
- * XXX don't have an Options struct to
- * pass to ui_close()
- */
-
+
+ if (__ui) __ui->close(NULL); /*
+ * XXX don't have an Options struct to
+ * pass to close()
+ */
/*
* print to stderr with write(2) rather than fprintf(3), since
* fprintf isn't guaranteed to be reentrant