forked from pool/s390-tools
089c94ca65
- Upgrade to version 2.27.0 (jsc#PED-3275) - Changes of existing tools: * s390-tools cross-compile and non-s390x support: - pkg-config is now mandatory for the build process - Add PKG_CONFIG Makefile variable to select pkg-config program; default pkg-config or $(CROSS_COMPILE)pkg-config if CROSS_COMPILE is set - Rename Makefile variable ARCH to HOST_ARCH. HOST_ARCH is the architecture that will run the produced (executable) objects - Add the Makefile variable BUILD_ARCH. BUILD_ARCH is the architecture of the build system. For each Makefile variable like CC, LINK, CPP, ... there is a suffixed version of it - e.g. CC_FOR_BUILD. This is useful for cross compiling, and this naming convention is very similar to the Meson convention (see https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine). - Limit build targets for non-s390x architectures (pvattest) * dasdfmt: Fall back to full format if space release fails * dbginfo.sh: Add nstat for network and SNMP stats * dbginfo.sh: Rework crypto data collection * hyptop: Show thread util by default * zipl: Add support for list-directed IPL dump from ECKD DASD - Bug Fixes: * lszcrypt: Fix argument parsing * zdev/dracut: Fix out-of-memory (OOM) situations in the kdump crashkernel environment * ziomon/ziorep_config: Fix for SCSI devices of type disk without block dev * pvextract-hdr: Fix parsing issues on little-endian systems - Amended the .patches to fit the 2.27 version - Removed obsolete patches (the fixes are included in this version) * s390-tools-sles15sp5-zipl-boot-disable-Warray-bounds-for-now.patch * s390-tools-sles15sp5-zkey-Support-EP11-host-library-version-4.patch * s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch * s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch * s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch * s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch * s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch * s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch * s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch * s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch * s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch * s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch * s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch * s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch * s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch * s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch * s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch * s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch * s390-tools-sles15sp5-01-ziomon-ziorep_config-fix-missing-SG-major-minor-for-.patch * s390-tools-sles15sp5-02-ziomon-ziorep_config-fix-for-SCSI-devices-of-type-di.patch * s390-tools-sles15sp5-fix-chown-commands-syntax.patch OBS-URL: https://build.opensuse.org/request/show/1093105 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=174
57 lines
1.5 KiB
Diff
57 lines
1.5 KiB
Diff
From 943e577440d74ad7f8787af2590c8ab4579a459b Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Thu, 5 Nov 2015 10:57:38 +0100
|
|
Subject: [PATCH] dasdfmt: retry BIODASDINFO if device is busy
|
|
|
|
Modern udev have the wonderful 'feature' to sending a 'change'
|
|
event whenever a device opened with O_RDWR is closed again.
|
|
The reasoning is that the said program _might_ have changed
|
|
the partition table and hence we _might_ have missed a partition
|
|
update.
|
|
But in doing so it not only generated tons of pointless events
|
|
but also confused the hell out of other programs.
|
|
Idiots.
|
|
|
|
References: bsc#937340
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
dasdfmt/dasdfmt.c | 19 ++++++++++++++++++-
|
|
1 file changed, 18 insertions(+), 1 deletion(-)
|
|
|
|
--- a/dasdfmt/dasdfmt.c
|
|
+++ b/dasdfmt/dasdfmt.c
|
|
@@ -621,7 +621,7 @@
|
|
*/
|
|
static void check_disk(void)
|
|
{
|
|
- int err;
|
|
+ int err, index = 0 ;
|
|
bool ro;
|
|
|
|
err = dasd_is_ro(g.dev_node, &ro);
|
|
@@ -631,6 +631,23 @@
|
|
if (ro)
|
|
error("Disk %s is read only!", g.dev_path);
|
|
if (!g.force) {
|
|
+ /*
|
|
+ * udev strikes again.
|
|
+ * Modern udev will issue a 'change' event whenever
|
|
+ * a device opened with O_RDWR is closed again.
|
|
+ * On the grounds that program _might_ have changed
|
|
+ * the partition table.
|
|
+ * And confusing the hell out ouf anyone else.
|
|
+ * Bah.
|
|
+ */
|
|
+ for ( index = 0 ; index < 6 ; index++ ) {
|
|
+ if (g.dasd_info.open_count > 1) {
|
|
+ dasd_get_info(g.dev_node, &g.dasd_info);
|
|
+ sleep(1);
|
|
+ }
|
|
+ else break;
|
|
+
|
|
+ }
|
|
if (g.dasd_info.open_count > 1)
|
|
error("Disk %s is in use!", g.dev_path);
|
|
}
|