diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-08 14:32:04 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-08 14:32:04 +0000 |
commit | 451009b6a0d6fb60faebc8b753817d11681dacab (patch) | |
tree | 3bea0d5ba67abf5e1cb4443bf35b46148bb52f57 /loader | |
parent | 79b0b922a6ea711a1118a013ebba89651cf62518 (diff) | |
download | anaconda-451009b6a0d6fb60faebc8b753817d11681dacab.tar.gz anaconda-451009b6a0d6fb60faebc8b753817d11681dacab.tar.xz anaconda-451009b6a0d6fb60faebc8b753817d11681dacab.zip |
optionally return the name of the module loaded
Diffstat (limited to 'loader')
-rw-r--r-- | loader/devices.c | 10 | ||||
-rw-r--r-- | loader/devices.h | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/loader/devices.c b/loader/devices.c index 1ed3a3e4f..aa8624bdd 100644 --- a/loader/devices.c +++ b/loader/devices.c @@ -141,7 +141,8 @@ static struct moduleInfo * pickModule(moduleInfoSet modInfo, } int devDeviceMenu(enum driverMajor type, moduleInfoSet modInfo, - moduleList modLoaded, moduleDeps modDeps, int flags) { + moduleList modLoaded, moduleDeps modDeps, int flags, + char ** moduleName) { struct moduleInfo * mod = NULL; enum { S_MODULE, S_ARGS, S_DONE } stage = S_MODULE; int rc; @@ -170,11 +171,14 @@ int devDeviceMenu(enum driverMajor type, moduleInfoSet modInfo, } } - mlLoadModule(mod->moduleName, modLoaded, modDeps, FL_TESTING(flags)); + rc = mlLoadModule(mod->moduleName, modLoaded, modDeps, FL_TESTING(flags)); for (arg = args; *arg; arg++) free(*arg); free(args); + + if (!rc && moduleName) + *moduleName = mod->moduleName; - return 0; + return rc; } diff --git a/loader/devices.h b/loader/devices.h index 0cd8ce852..f1e9bf57f 100644 --- a/loader/devices.h +++ b/loader/devices.h @@ -5,6 +5,7 @@ #include "modules.h" int devDeviceMenu(enum driverMajor type, moduleInfoSet modInfo, - moduleList modLoaded, moduleDeps modDeps, int flags); + moduleList modLoaded, moduleDeps modDeps, int flags, + char ** moduleName); #endif |