diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2013-03-08 16:03:25 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2013-03-08 16:03:25 -0800 |
commit | 236e698ad55856e96279e8a22cb1d5178d2296cd (patch) | |
tree | 3a53e69f6f46f8248bb4efcefe7eba8203153162 | |
parent | f054473d5e36b6a8c338325c9756141707380ec6 (diff) |
-rw-r--r-- | DRIVER_VERSION | 2 | ||||
-rw-r--r-- | kernel.c | 37 |
2 files changed, 26 insertions, 13 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION index 6128725..b53f228 100644 --- a/DRIVER_VERSION +++ b/DRIVER_VERSION @@ -1 +1 @@ -173.14.36 +173.14.37 @@ -159,7 +159,7 @@ int determine_kernel_module_installation_path(Options *op) int determine_kernel_source_path(Options *op, Package *p) { char *CC, *cmd, *result; - char *source_file, *source_path; + char *source_files[2], *source_path; int ret, count = 0; /* determine the kernel source path */ @@ -268,22 +268,35 @@ int determine_kernel_source_path(Options *op, Package *p) } if (strncmp(result, "2.4", 3) == 0) { - source_file = nvstrcat(op->kernel_source_path, - "/include/linux/version.h", NULL); + source_files[0] = nvstrcat(op->kernel_source_path, + "/include/linux/version.h", NULL); + source_files[1] = NULL; source_path = op->kernel_source_path; } else { - source_file = nvstrcat(op->kernel_output_path, - "/include/linux/version.h", NULL); + source_files[0] = nvstrcat(op->kernel_output_path, + "/include/linux/version.h", NULL); + source_files[1] = nvstrcat(op->kernel_output_path, + "/include/generated/uapi/linux/version.h", + NULL); source_path = op->kernel_output_path; } free(result); - - if (access(source_file, F_OK) != 0) { - ui_error(op, "The kernel header file '%s' does not exist. " - "The most likely reason for this is that the kernel " - "source files in '%s' have not been configured.", - source_file, source_path); - return FALSE; + + if (access(source_files[0], F_OK) != 0) { + if (!source_files[1]) { + ui_error(op, "The kernel header file '%s' does not exist. " + "The most likely reason for this is that the kernel " + "source files in '%s' have not been configured.", + source_files[0], source_path); + return FALSE; + } else if (access(source_files[1], F_OK) != 0) { + ui_error(op, "Neither the '%s' nor the '%s' kernel header " + "file exists. The most likely reason for this " + "is that the kernel source files in '%s' have not been " + "configured.", + source_files[0], source_files[1], source_path); + return FALSE; + } } /* OK, we seem to have a path to a configured kernel source tree */ |