Blame 0002-dasd_mod-change-rd.dasd-to-dasd_mod-kernel-parameter.patch

Harald Hoyer 18c19d
From 4d76a85df17b600553af1f58ced1dc7bea8a0e7c Mon Sep 17 00:00:00 2001
Harald Hoyer 18c19d
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 18c19d
Date: Tue, 5 Jun 2012 20:23:35 +0200
Harald Hoyer 18c19d
Subject: [PATCH] dasd_mod: change rd.dasd to dasd_mod kernel parameter
Harald Hoyer 18c19d
Harald Hoyer 18c19d
---
Harald Hoyer 18c19d
 dracut.cmdline.7.asc                   |    9 ++-------
Harald Hoyer 18c19d
 modules.d/95dasd_mod/parse-dasd-mod.sh |   34 --------------------------------
Harald Hoyer 18c19d
 2 files changed, 2 insertions(+), 41 deletions(-)
Harald Hoyer 18c19d
Harald Hoyer 18c19d
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
Harald Hoyer 18c19d
index 8a74cf5..9fa0ee8 100644
Harald Hoyer 18c19d
--- a/dracut.cmdline.7.asc
Harald Hoyer 18c19d
+++ b/dracut.cmdline.7.asc
Harald Hoyer 18c19d
@@ -434,14 +434,9 @@ NBD
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
 DASD
Harald Hoyer 18c19d
 ~~~~
Harald Hoyer 18c19d
-**rd.dasd_mod.dasd=**....::
Harald Hoyer 18c19d
+**rd.dasd=**....::
Harald Hoyer 18c19d
     same syntax as the kernel module parameter (s390 only)
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
-**rd.dasd=**_<dasd_adaptor device bus ID>_[,readonly=_X_][,use_diag=_X_][,erplog=_X_]::
Harald Hoyer 18c19d
-    activate DASD device with the given adaptor device bus ID and setting the
Harald Hoyer 18c19d
-    sysfs attributes to the specified values. This parameter can be specified
Harald Hoyer 18c19d
-    multiple times.
Harald Hoyer 18c19d
-
Harald Hoyer 18c19d
 ZFCP
Harald Hoyer 18c19d
 ~~~~
Harald Hoyer 18c19d
 **rd.zfcp=**_<zfcp adaptor device bus ID>_,_<WWPN>_,_<FCPLUN>_::
Harald Hoyer 18c19d
@@ -510,7 +505,7 @@ rdbreak:: rd.break
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
 rd_CCW:: rd.ccw
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
-rd_DASD_MOD:: rd.dasd_mod.dasd
Harald Hoyer 18c19d
+rd_DASD_MOD:: rd.dasd
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
 rd_DASD:: rd.dasd
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
diff --git a/modules.d/95dasd_mod/parse-dasd-mod.sh b/modules.d/95dasd_mod/parse-dasd-mod.sh
Harald Hoyer 18c19d
index 7b197d1..c37aca8 100755
Harald Hoyer 18c19d
--- a/modules.d/95dasd_mod/parse-dasd-mod.sh
Harald Hoyer 18c19d
+++ b/modules.d/95dasd_mod/parse-dasd-mod.sh
Harald Hoyer 18c19d
@@ -3,41 +3,7 @@
Harald Hoyer 18c19d
 # ex: ts=8 sw=4 sts=4 et filetype=sh
Harald Hoyer 18c19d
 mod_args=""
Harald Hoyer 18c19d
 
Harald Hoyer 18c19d
-convert_dasd_param() {
Harald Hoyer 18c19d
-    local bus_id params
Harald Hoyer 18c19d
-    params=""
Harald Hoyer 18c19d
-    bus_id=$1; shift
Harald Hoyer 18c19d
-    while [ $# -gt 0 ]; do
Harald Hoyer 18c19d
-        case "$1" in
Harald Hoyer 18c19d
-            use_diag\=1)
Harald Hoyer 18c19d
-                params="$params,diag"
Harald Hoyer 18c19d
-                ;;
Harald Hoyer 18c19d
-            readonly\=1)
Harald Hoyer 18c19d
-                params="$params,ro"
Harald Hoyer 18c19d
-                ;;
Harald Hoyer 18c19d
-            erplog\=1)
Harald Hoyer 18c19d
-                params="$params,erplog"
Harald Hoyer 18c19d
-                ;;
Harald Hoyer 18c19d
-            failfast\=1)
Harald Hoyer 18c19d
-                params="$params,failfast"
Harald Hoyer 18c19d
-                ;;
Harald Hoyer 18c19d
-        esac
Harald Hoyer 18c19d
-        shift
Harald Hoyer 18c19d
-    done
Harald Hoyer 18c19d
-    params="${params#*,}"
Harald Hoyer 18c19d
-    if [ -n "$params" ]; then
Harald Hoyer 18c19d
-        echo "$bus_id($params)"
Harald Hoyer 18c19d
-    else
Harald Hoyer 18c19d
-        echo "$bus_id"
Harald Hoyer 18c19d
-    fi
Harald Hoyer 18c19d
-}
Harald Hoyer 18c19d
-
Harald Hoyer 18c19d
 for dasd_arg in $(getargs rd.dasd= rd_DASD= DASD=); do
Harald Hoyer 18c19d
-    OLD_IFS=$IFS
Harald Hoyer 18c19d
-    IFS=","
Harald Hoyer 18c19d
-    set -- $dasd_arg
Harald Hoyer 18c19d
-    IFS=$OLD_IFS
Harald Hoyer 18c19d
-    dasd_arg=$(convert_dasd_param "$@")
Harald Hoyer 18c19d
     mod_args="$mod_args,$dasd_arg"
Harald Hoyer 18c19d
 done
Harald Hoyer 18c19d