diff --git a/detach_disks.sh b/detach_disks.sh index fdac12d..67d5f7e 100644 --- a/detach_disks.sh +++ b/detach_disks.sh @@ -1,11 +1,10 @@ #!/bin/sh -COOKIE=$(mcookie) -DASDFILE=/tmp/dasd.list.${COOKIE} -DETFILE=/tmp/detach.disks.${COOKIE} -KEEPFILE=/tmp/keep.disks.${COOKIE} -NICFILE=/tmp/nic.list.${COOKIE} -FAILFILE=/tmp/error.${COOKIE} +DASDFILE=/tmp/dasd.list.${mcookie} +DETFILE=/tmp/detach.disks.${mcookie} +KEEPFILE=/tmp/keep.disks.${mcookie} +NICFILE=/tmp/nic.list.${mcookie} +FAILFILE=/tmp/error.${mcookie} function expand_RANGE(){ local RANGE=${1} diff --git a/s390-tools-sles15sp3-Format-devices-in-parallel.patch b/s390-tools-sles15sp3-Format-devices-in-parallel.patch index da0eb26..bd7dbc5 100644 --- a/s390-tools-sles15sp3-Format-devices-in-parallel.patch +++ b/s390-tools-sles15sp3-Format-devices-in-parallel.patch @@ -101,6 +101,15 @@ index e7fc501..07c674b 100644 for (i = barlength + 1; i <= 33; i++) printf("-"); printf("|%3d%%", p_new); +@@ -311,7 +318,7 @@ + } + + if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) { +- printf("#"); ++ printf("%d|", g.procnum); + fflush(stdout); + hashcount++; + } @@ -1560,7 +1568,11 @@ char *reqsize_param_str = NULL; char *hashstep_str = NULL; diff --git a/s390-tools-sles15sp3-Implement-Y-yast_mode.patch b/s390-tools-sles15sp3-Implement-Y-yast_mode.patch index e13bd6b..da44b76 100644 --- a/s390-tools-sles15sp3-Implement-Y-yast_mode.patch +++ b/s390-tools-sles15sp3-Implement-Y-yast_mode.patch @@ -104,6 +104,15 @@ index 6dd28fa..5b6023a 100644 printf("ok\n"); } } +@@ -1548,6 +1556,8 @@ + error("%s", str); + + set_geo(&cylinders, &heads); ++ if (g.yast_mode) ++ printf("%d\n", cylinders); + set_label(&vlabel, &format_params, cylinders); + + if (g.check) @@ -1693,6 +1701,10 @@ int main(int argc, char *argv[]) case OPT_NODISCARD: g.no_discard = 1; diff --git a/s390-tools-sles15sp3-check-return-code-from-util_file_read_l.patch b/s390-tools-sles15sp3-check-return-code-from-util_file_read_l.patch new file mode 100644 index 0000000..9e00edd --- /dev/null +++ b/s390-tools-sles15sp3-check-return-code-from-util_file_read_l.patch @@ -0,0 +1,12 @@ +--- a/libdasd/dasd_sys.c 2020-10-28 10:31:59.000000000 -0400 ++++ b/libdasd/dasd_sys.c 2021-02-27 17:41:04.937023501 -0500 +@@ -218,7 +218,8 @@ + return 0; + + path = util_path_sysfs("bus/ccw/devices/%s/host_access_count", busid); +- util_file_read_l(&value, 10, path); ++ if (util_file_read_l(&value, 10, path) == -1) ++ value=0; + free(path); + + return value; diff --git a/s390-tools.changes b/s390-tools.changes index a2291ef..abe779a 100644 --- a/s390-tools.changes +++ b/s390-tools.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sat Feb 27 23:07:46 UTC 2021 - Mark Post + +- Updated detach_disks.sh to not use predictable temporary file + names. (bsc#1182777) +- Made for the following changes for bsc#1182816: + * Updated s390-tools-sles15sp3-Format-devices-in-parallel.patch to + change all instances of the progress bar from printing "#" to + printing the process number of the DASD volume being formatted. + * Updated s390-tools-sles15sp3-Implement-Y-yast_mode.patch to print + out the numbder of cylinders in a device, as was done in the + prior versions of this patch, but was missed when modifying it + for SLES15 SP3. + * Added s390-tools-sles15sp3-check-return-code-from-util_file_read_l.patch + because otherwise a warning message from dasdfmt is being generated + that could interfere with YaST properly processing the progress + of the formatting process. + ------------------------------------------------------------------- Wed Feb 17 20:47:26 UTC 2021 - Mark Post diff --git a/s390-tools.spec b/s390-tools.spec index d01c8d4..0d36023 100644 --- a/s390-tools.spec +++ b/s390-tools.spec @@ -112,6 +112,7 @@ Patch908: s390-tools-sles15sp3-dasdfmt-retry-BIODASDINFO-if-device-is-busy Patch909: 59-dasd.rules-wait_for.patch Patch910: s390-tools-sles12-fdasd-skip-partition-check-and-BLKRRPART-ioctl.patch Patch911: s390-tools-sles15sp1-11-zdev-Do-not-call-zipl-on-initrd-update.patch +Patch912: s390-tools-sles15sp3-check-return-code-from-util_file_read_l.patch BuildRequires: curl-devel BuildRequires: dracut @@ -231,7 +232,7 @@ export OPT_FLAGS="%{optflags}" export KERNELIMAGE_MAKEFLAGS="%%{?_smp_mflags}" make %{?_smp_mflags} \ ZFCPDUMP_DIR=%{_prefix}/lib/s390-tools/zfcpdump \ - DISTRELEASE=%{release} + DISTRELEASE=%{release} V=1 gcc -static -o read_values ${OPT_FLAGS} %{SOURCE86} -lqc %install