Hello community,

here is the log from the commit of package s390-tools for openSUSE:Factory 
checked in at 2018-03-26 12:32:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/s390-tools (Old)
 and      /work/SRC/openSUSE:Factory/.s390-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "s390-tools"

Mon Mar 26 12:32:26 2018 rev:17 rq:590431 version:2.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/s390-tools/s390-tools.changes    2018-01-16 
09:39:46.448981117 +0100
+++ /work/SRC/openSUSE:Factory/.s390-tools.new/s390-tools.changes       
2018-03-26 12:32:33.907346843 +0200
@@ -1,0 +2,6 @@
+Thu Mar 22 21:16:00 UTC 2018 - [email protected]
+
+- Modified dasd_configure script to set a return code of 8 if a
+  DASD volume being brought online is not formatted. (bsc#1084503)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ s390-tools.spec ++++++
--- /var/tmp/diff_new_pack.ocjcfx/_old  2018-03-26 12:32:36.347259244 +0200
+++ /var/tmp/diff_new_pack.ocjcfx/_new  2018-03-26 12:32:36.347259244 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package s390-tools
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed

++++++ dasd_configure ++++++
--- /var/tmp/diff_new_pack.ocjcfx/_old  2018-03-26 12:32:36.607249909 +0200
+++ /var/tmp/diff_new_pack.ocjcfx/_new  2018-03-26 12:32:36.611249766 +0200
@@ -28,7 +28,8 @@
 #                 1 to use z/VM DIAG250 I/O
 #
 # Return values:
-#   Return codes are determined by the chzdev command.
+#   Return codes are determined by the chzdev command, with one exception: If a
+#   DASD volume is not formatted, we will issue a return code of 8.
 #
 
 mesg () {
@@ -138,9 +139,35 @@
 RC=${?}
 if [ ${RC} -ne 0 ]; then
   exit ${RC}
+elif [ ${ON_OFF} == 1 ]; then
+    exitcode=0
+    # Extract the full busid so that we can reference the proper entries in 
/sys
+    BUSID=$(/sbin/lszdev dasd ${CCW_CHAN_ID} | /usr/bin/sed -e 1d | 
/usr/bin/tr -s " " | /usr/bin/cut -f2 -d" " )
+    # Make sure the DASD volume came online
+    for ((counter=0; counter<30; counter++)); do
+      sleep 0.1
+      read online < /sys/bus/ccw/devices/${BUSID}/online
+      if [ ${online} -eq 1 ] ; then
+        break
+      fi
+    done
+
+    if [ ${online} -ne 1 ]; then
+      debug_mesg "DASD ${CCW_CHAN_ID} did not come online."
+      exit 17
+    fi
+
+    # Check to see if the DASD volume is unformatted. If so, let YaST know.
+    read status < /sys/bus/ccw/devices/${BUSID}/status
+    if [ "${status}" == "unformatted" ]; then
+      mesg "DASD ${CCW_CHAN_ID} is unformatted."
+      exitcode=8
+    fi
 fi
 
 if [ ${ON_OFF} == 1 ]; then
   add_cio_channel "${CCW_CHAN_ID}"
 else remove_cio_channel "${CCW_CHAN_ID}"
 fi
+
+exit ${exitcode}


Reply via email to