[PATCH 1/2] Remove dasdSetup() from loader.

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

 



The dasdSetup() function in hardware.c is no longer necessary with the
current linuxrc.s390.  The linuxrc.s390 handles all DASD setup except
dasdfmt.  If a DASD needs dasdfmt, that's handled by the anaconda
storage code.

The dasdSetup() function would take the contents of /tmp/dasd_ports and
pass it as the dasd= parameter during a forced reload of the dasd_mod
kernel module.  We do not need to do this anymore since linuxrc.s390
sets up the DASD devices before loader starts.
---
 loader/hardware.c   |   51 ---------------------------------------------------
 loader/hardware.h   |    2 --
 loader/linuxrc.s390 |    4 ----
 loader/loader.c     |    1 -
 4 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/loader/hardware.c b/loader/hardware.c
index 6444271..ad20ed5 100644
--- a/loader/hardware.c
+++ b/loader/hardware.c
@@ -148,54 +148,3 @@ int busProbe(int justProbe) {
         return 0;
     return detectHardware();
 }
-
-/* check if the system has been booted with dasd parameters */
-/* These parameters define the order in which the DASDs */
-/* are visible to Linux. Otherwise load dasd modules probeonly, */
-/* then parse proc to find active DASDs */
-/* Reload dasd_mod with correct range of DASD ports */
-void dasdSetup() {
-#if !defined(__s390__) && !defined(__s390x__)
-    return;
-#else
-    char **dasd_parms;
-    char *line;
-    char *parms = NULL, *parms_end;
-    FILE *fd;
-
-    dasd_parms = malloc(sizeof(*dasd_parms) * 2);
-    dasd_parms[0] = NULL;
-    dasd_parms[1] = NULL;
-
-    fd = fopen ("/tmp/dasd_ports", "r");
-    if(fd) {
-        line = (char *)malloc(sizeof(char) * 200);
-        while (fgets (line, 199, fd) != NULL) {
-            if((parms = strstr(line, "dasd=")) ||
-               (parms = strstr(line, "DASD="))) {
-                strncpy(parms, "dasd", 4);
-                parms_end = parms;
-                while(*parms_end && !(isspace(*parms_end))) parms_end++;
-                *parms_end = '\0';
-                break;
-            }
-        }
-        fclose(fd);
-        if (strlen(parms) > 5)
-		dasd_parms[0] = strdup(parms);
-        free(line);
-    }
-    if(dasd_parms[0]) {
-        mlLoadModule("dasd_mod", dasd_parms);
-
-        mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_eckd_mod");
-        free(dasd_parms);
-        return;
-    } else {
-        dasd_parms[0] = "dasd=autodetect";
-        mlLoadModule("dasd_mod", dasd_parms);
-        mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_eckd_mod");
-        free(dasd_parms);
-    }
-#endif
-}
diff --git a/loader/hardware.h b/loader/hardware.h
index d49980d..47c34d2 100644
--- a/loader/hardware.h
+++ b/loader/hardware.h
@@ -25,6 +25,4 @@
 int earlyModuleLoad(int justProbe);
 int busProbe(int justProbe);
 
-void dasdSetup();
-
 #endif
diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 83f5c94..0fd92e9 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -2941,10 +2941,6 @@ if [ -z "$testing" ]; then
 
 fi # testing
 
-if [ -n "$DASD" ]; then
-    echo "DASD=$DASD" > /tmp/dasd_ports
-fi
-
 # syntax check to give user early feedback on parameters provided in parm file
 # (he probably won't notice the logs written by anaconda later on)
 syntax_check_fcp
diff --git a/loader/loader.c b/loader/loader.c
index b1f0fb9..d731f96 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1988,7 +1988,6 @@ int main(int argc, char ** argv) {
 #endif
 
     /* now let's do some initial hardware-type setup */
-    dasdSetup();
 #if defined(__powerpc__)
     mlLoadModule("spufs", NULL);
 #endif
-- 
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[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