[PATCH 02/05] Add and use iscsi flag in loader2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add and use iscsi flag in loader2 code.

diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/loader2/hardware.c iscsi-anaconda-10.91.12/loader2/hardware.c
--- anaconda-10.91.12/loader2/hardware.c	2005-11-10 13:41:06.000000000 -0800
+++ iscsi-anaconda-10.91.12/loader2/hardware.c	2006-02-02 12:53:06.000000000 -0800
@@ -245,6 +245,9 @@ void scsiSetup(moduleList modLoaded, mod
 #if defined(__s390__) || defined(__s390x__)
     mlLoadModule("zfcp", modLoaded, modDeps, modInfo, NULL, flags);
 #endif
+    if (FL_ISCSI(flags))
+        mlLoadModule("iscsi_tcp", modLoaded, modDeps, modInfo, NULL, flags);
+
 }
 
 void ideSetup(moduleList modLoaded, moduleDeps modDeps,
diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/loader2/loader.c iscsi-anaconda-10.91.12/loader2/loader.c
--- anaconda-10.91.12/loader2/loader.c	2006-01-20 13:04:59.000000000 -0800
+++ iscsi-anaconda-10.91.12/loader2/loader.c	2006-02-02 12:53:06.000000000 -0800
@@ -366,7 +366,7 @@ static void checkForHardDrives(int * fla
     struct device ** devices;
 
     devices = probeDevices(CLASS_HD, BUS_UNSPEC, PROBE_LOADED);
-    if (devices)
+    if (devices || FL_ISCSI(flags))
         return;
 
     /* If they're using kickstart, assume they might know what they're doing.
@@ -677,6 +677,7 @@ static int parseCmdLineFlags(int flags, 
                 !strncasecmp(argv[i], "vnc", 3) ||
 		!strncasecmp(argv[i], "vncconnect=", 11) ||
                 !strncasecmp(argv[i], "headless", 8) ||
+                !strncasecmp(argv[i], "iscsi", 5) ||
                 !strncasecmp(argv[i], "usefbx", 6) ||
                 !strncasecmp(argv[i], "dmraid", 6) ||
                 !strncasecmp(argv[i], "nodmraid", 8) ||
@@ -686,6 +687,8 @@ static int parseCmdLineFlags(int flags, 
 		/* vnc implies graphical */
 		if (!strncasecmp(argv[i], "vnc", 3))
 		    flags |= LOADER_FLAGS_GRAPHICAL;
+		else if (!strncasecmp(argv[i], "iscsi", 5))
+		    flags |= LOADER_FLAGS_ISCSI;
 
                 arglen = strlen(argv[i])+3;
                 extraArgs[numExtraArgs] = (char *) malloc(arglen*sizeof(char));
@@ -963,7 +966,8 @@ static char *doLoaderMain(char * locatio
 
         case STEP_NETWORK:
             if ( (installMethods[validMethods[methodNum]].deviceType != 
-                  CLASS_NETWORK) && (!hasGraphicalOverride())) {
+                  CLASS_NETWORK) && (!hasGraphicalOverride()) &&
+                 !FL_ISCSI(flags)) {
                 needsNetwork = 0;
                 if (dir == 1) 
                     step = STEP_URL;
diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/loader2/loader.h iscsi-anaconda-10.91.12/loader2/loader.h
--- anaconda-10.91.12/loader2/loader.h	2005-12-15 11:01:46.000000000 -0800
+++ iscsi-anaconda-10.91.12/loader2/loader.h	2006-02-02 12:53:06.000000000 -0800
@@ -36,6 +36,7 @@
 #define LOADER_FLAGS_HALT       	(1 << 13)
 #define LOADER_FLAGS_SELINUX            (1 << 14)
 #define LOADER_FLAGS_VIRTPCONSOLE       (1 << 15)
+#define LOADER_FLAGS_ISCSI              (1 << 16)
 #define LOADER_FLAGS_UB                 (1 << 21)
 #define LOADER_FLAGS_NOSTORAGE	        (1 << 30)
 
@@ -72,6 +73,7 @@
 #define FL_VIRTPCONSOLE(a)  ((a) & LOADER_FLAGS_VIRTPCONSOLE)
 #define FL_NOSTORAGE(a)     ((a) & LOADER_FLAGS_NOSTORAGE)
 #define FL_NOPROBE(a)       (FL_NOSTORAGE(a) | FL_NONET(a))
+#define FL_ISCSI(a)         ((a) & LOADER_FLAGS_ISCSI)
 #define FL_UB(a)            ((a) & LOADER_FLAGS_UB)
 
 void startNewt(int flags);


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux