summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-12-07 19:27:25 +0000
committerErik Troan <ewt@redhat.com>2001-12-07 19:27:25 +0000
commit30a754976e334aa9506a346c7e4d58a53a960d35 (patch)
treec49404397d385a78e4e0746e91c66e0dc139167b
parent895130a5765b555bf3f50ab790b20454842537d2 (diff)
downloadanaconda-30a754976e334aa9506a346c7e4d58a53a960d35.tar.gz
anaconda-30a754976e334aa9506a346c7e4d58a53a960d35.tar.xz
anaconda-30a754976e334aa9506a346c7e4d58a53a960d35.zip
use gzip_open, not gunzip_open
-rw-r--r--loader/devices.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/loader/devices.c b/loader/devices.c
index 12df690b4..79061d0c5 100644
--- a/loader/devices.c
+++ b/loader/devices.c
@@ -510,7 +510,7 @@ static char * filterDriverModules(struct driverDiskInfo * ddi,
sprintf(toPath, "/tmp/modules/%s", modNames[0]);
mkdirChain(toPath);
strcat(toPath, "/modules.cgz");
- to = gunzip_open(toPath);
+ to = gzip_open(toPath, O_TRUNC | O_RDWR | O_CREAT, 0600);
/* This message isn't good, but it'll do. */
winStatus(50, 3, _("Loading"), _("Loading %s driver..."),
@@ -549,12 +549,14 @@ char ** extractModules(struct driverDiskInfo * ddi,
int rc;
const char * failedFile;
char fn[255];
+ struct stat sb;
/* this needs to know about modules64.cgz for sparc */
uname(&u);
if (ddi) {
+ logMessage("looking for drivers on driver disk");
ballPath = filterDriverModules(ddi, modNames);
} else {
ballPath = strdup("/modules/modules.cgz");
@@ -600,10 +602,10 @@ char ** extractModules(struct driverDiskInfo * ddi,
if (!oldPaths[i]) {
/* can't trust map; the order changed thanks to qsort */
sprintf(fn, "/tmp/%s.o", modNames[i]);
- if (!access(fn, R_OK)) {
+ if (!stat(fn, &sb)) {
if (ddi)
- logMessage("module %s found on driver disk %s",
- modNames[i], ddi->title);
+ logMessage("module %s found on driver disk %s (%d bytes)",
+ modNames[i], ddi->title, sb.st_size);
oldPaths[i] = strdup(fn);
}
numMaps++;