summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2000-07-19 16:58:39 +0000
committerMike Fulbright <msf@redhat.com>2000-07-19 16:58:39 +0000
commit0bf3841d3a69c37aadfbd23fe9d4d9e431bfcc0d (patch)
treee6389f2618f934f483fd2692df0ac0a7685d5d6a
parentc51d050f703e8440a88568c07e2ecfb67856b4a5 (diff)
downloadanaconda-0bf3841d3a69c37aadfbd23fe9d4d9e431bfcc0d.tar.gz
anaconda-0bf3841d3a69c37aadfbd23fe9d4d9e431bfcc0d.tar.xz
anaconda-0bf3841d3a69c37aadfbd23fe9d4d9e431bfcc0d.zip
added nousb cmdline option to disable usb module insertion
-rw-r--r--loader/loader.c6
-rw-r--r--loader/loader.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 67bc9e460..57c931c4e 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1768,6 +1768,8 @@ static int parseCmdLineFlags(int flags, char * cmdLine, char ** ksSource,
if (!strcasecmp(argv[i], "expert"))
flags |= LOADER_FLAGS_EXPERT | LOADER_FLAGS_NOPROBE |
LOADER_FLAGS_MODDISK;
+ else if (!strcasecmp(argv[i], "nousb"))
+ flags |= LOADER_FLAGS_NOUSB;
else if (!strcasecmp(argv[i], "noprobe"))
flags |= LOADER_FLAGS_NOPROBE;
else if (!strcasecmp(argv[i], "text"))
@@ -2173,6 +2175,8 @@ static int usbInitialize(moduleList modLoaded, moduleDeps modDeps,
if (FL_TESTING(flags)) return 0;
+ if (FL_NOUSB(flags)) return 0;
+
logMessage("looking for usb controllers");
devices = probeDevices(CLASS_USB, BUS_PCI, PROBE_ALL);
@@ -2204,6 +2208,8 @@ static int usbInitialize(moduleList modLoaded, moduleDeps modDeps,
static void usbInitializeMouse(moduleList modLoaded, moduleDeps modDeps,
moduleInfoSet modInfo, int flags) {
+ if (FL_NOUSB(flags)) return 0;
+
logMessage("looking for USB mouse...");
if (probeDevices(CLASS_MOUSE, BUS_USB, PROBE_ALL)) {
logMessage("USB mouse found, loading mousedev module");
diff --git a/loader/loader.h b/loader/loader.h
index 32d3e4ab5..57ee398b6 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -19,6 +19,7 @@
#define LOADER_FLAGS_KSCDROM (1 << 13)
#define LOADER_FLAGS_MCHECK (1 << 14)
#define LOADER_FLAGS_KSNFS (1 << 15)
+#define LOADER_FLAGS_NOUSB (1 << 16)
#define FL_TESTING(a) ((a) & LOADER_FLAGS_TESTING)
#define FL_EXPERT(a) ((a) & LOADER_FLAGS_EXPERT)
@@ -36,6 +37,7 @@
#define FL_KSCDROM(a) ((a) & LOADER_FLAGS_KSCDROM)
#define FL_MCHECK(a) ((a) & LOADER_FLAGS_MCHECK)
#define FL_KSNFS(a) ((a) & LOADER_FLAGS_KSNFS)
+#define FL_NOUSB(a) ((a) & LOADER_FLAGS_NOUSB)
#define CODE_PCMCIA 1