diff options
author | Erik Troan <ewt@redhat.com> | 2001-10-04 22:48:53 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-10-04 22:48:53 +0000 |
commit | 8457357cc5832bf84ddaeb44162edcec5052e582 (patch) | |
tree | 0a59c983778f42cac764e11968d6a70e6b826b43 /loader/devices.c | |
parent | c3a90361768514a5d697726733184cdbcbb31942 (diff) | |
download | anaconda-8457357cc5832bf84ddaeb44162edcec5052e582.tar.gz anaconda-8457357cc5832bf84ddaeb44162edcec5052e582.tar.xz anaconda-8457357cc5832bf84ddaeb44162edcec5052e582.zip |
driver disks should work, minor syntax cleanups
Diffstat (limited to 'loader/devices.c')
-rw-r--r-- | loader/devices.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/loader/devices.c b/loader/devices.c index b0aa8d8e8..d98b2cc55 100644 --- a/loader/devices.c +++ b/loader/devices.c @@ -443,7 +443,7 @@ int devDeviceMenu(enum driverMajor type, moduleInfoSet modInfo, } static char * filterDriverModules(struct driverDiskInfo * ddi, - const char * const * modNames) { + char * const * modNames) { struct utsname un; gzFile from; gzFile to; @@ -470,8 +470,11 @@ static char * filterDriverModules(struct driverDiskInfo * ddi, for (i = 0, p = pattern; modNames[i]; i++, p++) { *p = alloca(strlen(modNames[i]) + strlen(un.release) + 5); sprintf(*p, "%s*/%s.o", un.release, modNames[i]); - logMessage("extracting pattern %s", *p); + logMessage("extracting pattern %s%s%s", *p, + ddi->title ? " from " : "", + ddi->title ? ddi->title : ""); } + *p = NULL; if (ddi->device) devMakeInode(ddi->device, ddi->mntDevice); @@ -529,7 +532,6 @@ static char * filterDriverModules(struct driverDiskInfo * ddi, gzclose(to); umount("/tmp/drivers"); - sprintf(toPath, "/tmp/modules/%s", modNames[0]); return toPath; } @@ -545,12 +547,12 @@ static char * filterDriverModules(struct driverDiskInfo * ddi, } char ** extractModules(struct driverDiskInfo * ddi, - const char * const * modNames, char ** oldPaths) { + char * const * modNames, char ** oldPaths) { gzFile fd; char * ballPath; struct cpioFileMapping * map; int i, numMaps; - const char * const * m; + char * const * m; struct utsname u; int rc; const char * failedFile; @@ -595,6 +597,9 @@ char ** extractModules(struct driverDiskInfo * ddi, } } + /* nothing to do */ + if (!numMaps) return oldPaths; + qsort(map, numMaps, sizeof(*map), myCpioFileMapCmp); rc = myCpioInstallArchive(fd, map, numMaps, NULL, NULL, &failedFile); |