2 Commits

Author SHA256 Message Date
f29d8c9bf0 Fixed a logic error in s390-tools-combined.patch (parse-zfcp.sh)
Updated the code for IBM z17 machine type 9176
Changed read_value* and cputype*
2026-02-13 09:19:30 +01:00
7fc43c6f5d - Reworked and combined all s390-tools patches 2026-02-09 09:55:42 +01:00
24 changed files with 1678 additions and 2017 deletions

View File

@@ -64,7 +64,8 @@ case "${machine}" in
8562) echo "${machine} = z15 T02 IBM z15 T02" ;;
3931) echo "${machine} = z16 A01 IBM z16 A01" ;;
3932) echo "${machine} = z16 A02 IBM z16 A02" ;;
9175) echo "${machine} = z17 IBM z17 " ;;
9175) echo "${machine} = z17 ME1 IBM z17 ME1" ;;
9176) echo "${machine} = z17 IBM z17 " ;;
*) echo "An unknown machine type was reported: ${machine}" >&2
echo "Please file a bug report with this output:" >&2
/bin/cat /proc/cpuinfo >&2

View File

@@ -1,4 +1,4 @@
.TH cputype 1 "April 2014" "s390-tools"
.TH cputype 8 "February 2016" "1.0" "s390-tools cputype"
.SH NAME
cputype \- Based on the IBM machine model, returns a (hopefully) human understandable string that identifies the processor.
.SH SYNOPSIS
@@ -42,9 +42,5 @@ This is most likely seen because the command was run on a newer generation proce
and the script has not been updated with the new model number.
The contents of /proc/cpuinfo are printed. Return code 4 is set.
.RE
.SH Author
Mark Post (mpost@suse.com)
.SH Copyright
Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
.SH BUGS
Gotta be some, I'm sure. If you find one, please open a bug report.

View File

@@ -1,4 +1,4 @@
.TH read_values "8" "March 2015" "s390-tools"
.TH read_values 8 "February 2026" "1.1.0" "s390-tools read_values"
.SH NAME
read_values \- Read information from the /sys and /proc filesystems for SUSE Customer Center (SCC) and the like.
.SH SYNOPSIS

File diff suppressed because it is too large Load Diff

345
s390-tools-combined.patch Normal file
View File

@@ -0,0 +1,345 @@
diff -Naur a/etc/sysconfig/dumpconf b/etc/sysconfig/dumpconf
--- a/etc/sysconfig/dumpconf 2025-12-11 17:03:28.000000000 +0100
+++ b/etc/sysconfig/dumpconf 2026-02-06 14:03:46.482188674 +0100
@@ -1,3 +1,4 @@
+###########################################################################################
#
# s390 dump config
#
@@ -78,3 +79,135 @@
# dumpconf becomes active immediately during system startup.
#
# ON_PANIC=reipl
+
+############################ Begin Definitions ###########################################
+## Path: System/Dumpconf
+## Description: Configures the actions which should be performed after a kernel panic
+## Type: list(stop,dump,vmcmd,reipl,dump_reipl)
+## Default: "stop"
+## ServiceRestart: dumpconf
+#
+# Define the action that should be taken if a kernel panic happens.
+#
+ON_PANIC="stop"
+
+## Type: integer(0:300)
+## Default: 5
+## ServiceRestart: dumpconf
+#
+# Using reipl or dump_reipl actions with ON_PANIC can lead to the system
+# looping with alternating IPLs and crashes. Use DELAY_MINUTES to prevent
+# such a loop. DELAY_MINUTES delays activating the specified panic action
+# for a newly started system. When the specified time has elapsed, dumpconf
+# activates the specified panic action. This action is taken should the
+# system subsequently crash. If the system crashes before the time has
+# elapsed the previously defined action is taken. If no previous action has
+# been defined the default action (STOP) is performed.
+#
+DELAY_MINUTES="5"
+
+## Type: list(ccw,fcp,nvme)
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the type, ccw for DASD, fcp for zFCP, or nvme for NVMe Disk.
+#
+DUMP_TYPE=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the device id for a DASD or SCSI over zFCP dump device.
+#
+# For example (DASD and SCSI over zFCP have the same structure): DEVICE=0.0.4711
+#
+DEVICE=""
+
+# Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the WWPN for a zFCP dump device.
+#
+# For example: WWPN=0x5005076303004711
+#
+WWPN=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the LUN for a zFCP dump device.
+#
+# For example: LUN=0x4711000000000000
+#
+LUN=""
+
+## Type: integer(0:30)
+## Default: "0"
+## ServiceRestart: dumpconf
+#
+# Define the Boot program selector for a zFCP dump device.
+#
+# A decimal value between 0 and 30 specifying the program to be loaded from
+# the FCP-I/O device.
+#
+BOOTPROG="0"
+
+## Type: string
+## Default: "0"
+## ServiceRestart: dumpconf
+#
+# Define the Boot record logical block address for a zFCP dump device.
+#
+# The hexadecimal digits designating the logical-block address of the boot record of the FCP-I/O device.
+# It must be a value from 0-FFFFFFFF FFFFFFFF. For values longer than 8 hex characters at least one separator
+# blank is required after the 8th character.
+#
+BR_LBA="0"
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the Function ID for NVMe dump device.
+#
+# The hexadecimal digits designating the Function ID for the NMVe disk.
+#
+# For example: FID=0x00000300
+#
+FID=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the Namespace ID for the NVMe dump device
+#
+# The hexadecimal digits designating the Namespace ID for the NMVe disk.
+#
+# For example: NSID=0x00000001
+#
+NSID=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# VMCMD_<X>
+# Specifies a CP command, <X> is a number from one to eight. You can
+# specify up to eight CP commands that are executed in case of a kernel
+# panic. Note that VM commands, device adresses, and VM guest names
+# must be uppercase.
+#
+VMCMD_1=""
+VMCMD_2=""
+VMCMD_3=""
+VMCMD_4=""
+VMCMD_5=""
+VMCMD_6=""
+VMCMD_7=""
+VMCMD_8=""
+
+############################### End Definitions ##############################################
diff -Naur a/etc/udev/rules.d/59-dasd.rules b/etc/udev/rules.d/59-dasd.rules
--- a/etc/udev/rules.d/59-dasd.rules 2025-12-11 17:03:28.000000000 +0100
+++ b/etc/udev/rules.d/59-dasd.rules 2026-02-06 15:49:49.132244953 +0100
@@ -6,16 +6,17 @@
SUBSYSTEM!="block", GOTO="dasd_symlinks_end"
KERNEL!="dasd*", GOTO="dasd_symlinks_end"
-ACTION!="change", GOTO="dasd_block_end"
+ACTION!="change|add", GOTO="dasd_block_end"
# by-id (hardware serial number)
KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/sbin/dasdinfo -a -e -b $kernel"
+KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/usr/sbin/dasdinfo -a -e -b $kernel"
KERNEL=="dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="dasd*[!0-9]", ENV{ID_UID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_UID}"
KERNEL=="dasd*[!0-9]", ENV{ID_XUID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_XUID}"
LABEL="dasd_block_end"
-ACTION!="change|add", GOTO="dasd_symlinks_end"
+ACTION!="change|add", GOTO="dasd_partition_end"
# for partitions import parent information
KERNEL=="dasd*[0-9]", IMPORT{parent}=="ID_*"
@@ -24,6 +25,14 @@
KERNEL=="dasd*[0-9]", ENV{ID_UID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_UID}-part%n"
KERNEL=="dasd*[0-9]", ENV{ID_XUID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_XUID}-part%n"
+LABEL="dasd_partition_end"
+
+ENV{ID_SERIAL}!="?*", GOTO="dasd_symlinks_end"
+# by-label/by-uuid (filesystem properties)
+IMPORT{builtin}="blkid"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+
LABEL="dasd_symlinks_end"
# on device add set request queue scheduler to none
diff -Naur a/fdasd/fdasd.c b/fdasd/fdasd.c
--- a/fdasd/fdasd.c 2025-12-11 17:03:28.000000000 +0100
+++ b/fdasd/fdasd.c 2026-02-06 14:10:08.461803766 +0100
@@ -1232,10 +1232,13 @@
*/
static void fdasd_reread_partition_table(fdasd_anchor_t *anc)
{
+ int rc = 0 ;
+
if (!anc->silent)
printf("rereading partition table...\n");
- if (dasd_reread_partition_table(options.device, 5) != 0) {
+ rc = dasd_reread_partition_table(options.device, 1);
+ if (rc == EINVAL && !anc->force_virtual) {
fdasd_error(anc, unable_to_ioctl, "Error while rereading "
"partition table.\nPlease reboot!");
}
diff -Naur a/zdev/dracut/95zdev/parse-dasd.sh b/zdev/dracut/95zdev/parse-dasd.sh
--- a/zdev/dracut/95zdev/parse-dasd.sh 2025-12-11 17:03:28.000000000 +0100
+++ b/zdev/dracut/95zdev/parse-dasd.sh 2026-02-06 14:13:41.947730795 +0100
@@ -10,6 +10,8 @@
# parameters are evaluated and used to configure dasd devices.
#
+zdev_dasd_base_args="--no-settle --yes --no-root-update --force"
+
# shellcheck source=/dev/null
type zdev_parse_dasd_list > /dev/null 2>&1 || . /lib/s390-tools/zdev-from-dasd_mod.dasd
@@ -27,9 +29,21 @@
zdev_parse_rd_dasd() {
local _zdev_dasd _zdev_dasd_list
- for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do
- _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd"
- done
+ # autodetect active bootdev from zipl device
+ if ! getargbool 0 'rd.dasd' \
+ && [[ -f /sys/firmware/ipl/ipl_type ]] \
+ && [[ $(< /sys/firmware/ipl/ipl_type) == "ccw" ]]; then
+ read -r _ccw < /sys/firmware/ipl/device
+
+ if lszdev --offline "$_ccw" &>/dev/null; then
+ chzdev --offline --existing --enable --active $zdev_dasd_base_args \
+ dasd "$_ccw"
+ fi
+ else
+ for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do
+ _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd"
+ done
+ fi
echo "$_zdev_dasd_list"
}
diff -Naur a/zdev/dracut/95zdev/parse-zfcp.sh b/zdev/dracut/95zdev/parse-zfcp.sh
--- a/zdev/dracut/95zdev/parse-zfcp.sh 2025-12-11 17:03:28.000000000 +0100
+++ b/zdev/dracut/95zdev/parse-zfcp.sh 2026-02-12 10:49:05.939509610 +0100
@@ -11,26 +11,43 @@
#
zdev_zfcp_base_args="--no-settle --yes --no-root-update --force"
+zdev_vinfo() {
+ local _zdev_vinfo_line
+ while read -r _zdev_vinfo_line || [ -n "$_zdev_vinfo_line" ]; do
+ # Prefix "<30>" represents facility LOG_DAEMON 3 and loglevel INFO 6:
+ # (facility << 3) | level.
+ echo "<30>dracut: $_zdev_vinfo_line" > /dev/kmsg
+ done
+}
-for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
- (
- IFS_SAVED="$IFS"
- IFS="," # did not work in front of built-in set command below
- # shellcheck disable=SC2086
- set -- $zdev_zfcp_arg
- IFS=":" args="$*"
- IFS="$IFS_SAVED"
- echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo
- if [ "$#" -eq 1 ]; then
+# autodetect active bootdev from zipl device
+if ! getargbool 0 'rd.zfcp' \
+ && [[ -f /sys/firmware/ipl/ipl_type ]] \
+ && [[ $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then
+ chzdev --offline --existing --enable --active $zdev_zfcp_base_args \
+ zfcp-host 2>&1 | zdev_vinfo
+else
+ for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
+ (
+ IFS_SAVED="$IFS"
+ IFS="," # did not work in front of built-in set command below
# shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-host "$args" 2>&1 | zdev_vinfo
- else
- # shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-lun "$args" 2>&1 | zdev_vinfo
- fi
- )
-done
+ set -- $zdev_zfcp_arg
+ IFS=":" args="$*"
+ IFS="$IFS_SAVED"
+ echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo
+ if [ "$#" -eq 1 ]; then
+ # shellcheck disable=SC2086
+ chzdev --enable --persistent $zdev_zfcp_base_args \
+ zfcp-host "$args" 2>&1 | zdev_vinfo
+ else
+ # shellcheck disable=SC2086
+ chzdev --enable --persistent $zdev_zfcp_base_args \
+ zfcp-lun "$args" 2>&1 | zdev_vinfo
+ fi
+ )
+ done
+fi
+
unset zdev_zfcp_arg
unset zdev_zfcp_base_args
diff -Naur a/zdev/dracut/95zdev-kdump/module-setup.sh b/zdev/dracut/95zdev-kdump/module-setup.sh
--- a/zdev/dracut/95zdev-kdump/module-setup.sh 2025-12-11 17:03:28.000000000 +0100
+++ b/zdev/dracut/95zdev-kdump/module-setup.sh 2026-02-06 14:20:29.803412303 +0100
@@ -78,6 +78,7 @@
inst_multiple /lib/s390-tools/zdev-from-dasd_mod.dasd
inst_rules "59-dasd.rules"
+ inst_rules "59-zfcp-compat.rules"
# Obtain kdump target device configuration
diff -Naur a/zdev/src/zdev-root-update.dracut b/zdev/src/zdev-root-update.dracut
--- a/zdev/src/zdev-root-update.dracut 2025-12-11 17:03:28.000000000 +0100
+++ b/zdev/src/zdev-root-update.dracut 2026-02-06 14:25:03.817945754 +0100
@@ -20,10 +20,4 @@
exit 1
}
-echo "Installing IPL record"
-zipl --noninteractive || {
- echo "${TOOLNAME}: Error: Could not install IPL record" >&2
- exit 1
-}
-
exit 0
diff -Naur a/zipl/boot/menu.c b/zipl/boot/menu.c
--- a/zipl/boot/menu.c 2025-12-11 17:03:28.000000000 +0100
+++ b/zipl/boot/menu.c 2026-02-06 14:29:07.392321346 +0100
@@ -191,8 +191,11 @@
/* print config list */
menu_list();
- if (is_zvm())
- printf("Note: VM users please use '#cp vi vmsg <input>'\n");
+ if (is_zvm()) {
+ printf(" \n");
+ printf("Note: VM users please use '#cp vi vmsg <input> <kernel-parameters>'\n");
+ printf(" \n");
+ }
value = menu_read();

View File

@@ -0,0 +1,743 @@
diff -Naur a/dasdfmt/dasdfmt.8 b/dasdfmt/dasdfmt.8
--- a/dasdfmt/dasdfmt.8 2025-12-11 17:03:28.000000000 +0100
+++ b/dasdfmt/dasdfmt.8 2026-02-06 11:00:31.937570213 +0100
@@ -7,18 +7,18 @@
dasdfmt \- formatting of DASD (ECKD) disk drives.
.SH SYNOPSIS
-\fBdasdfmt\fR [\-h] [\-t] [\-v] [\-y] [\-p] [\-P] [\-m \fIstep\fR]
+\fBdasdfmt\fR [\-h] [\-t] [\-v] [\-y] [\-p] [\-Q] [\-P] [\-Y] [\-m \fIstep\fR]
.br
[\-r \fIcylinder\fR] [\-b \fIblksize\fR] [\-l \fIvolser\fR] [\-d \fIlayout\fR]
.br
- [\-L] [\-V] [\-F] [\-k] [\-C] [\-M \fImode\fR] \fIdevice\fR
+ [\-L] [\-V] [\-F] [\-k] [\-C] [\-M \fImode\fR] [-f \fIdevice\fR] [\fIdevice\fR]
.SH DESCRIPTION
-\fBdasdfmt\fR formats a DASD (ECKD) disk drive to prepare it
+\fBdasdfmt\fR formats one or several DASD (ECKD) disk drive(s) to prepare them
for usage with Linux for S/390.
The \fIdevice\fR is the node of the device (e.g. '/dev/dasda').
Any device node created by udev for kernel 2.6 can be used
-(e.g. '/dev/dasd/0.0.b100/disc').
+(e.g. '/dev/dasd/0.0.b100/disc'). It is possible to specify up to 512 devices.
.br
\fBWARNING\fR: Careless usage of \fBdasdfmt\fR can result in
@@ -41,6 +41,10 @@
Increases verbosity.
.TP
+\fB-f\fR \fIdevice\fR or \fB--device\fR=\fIdevice\fR
+Specify device to format. For backwards compability only.
+
+.TP
\fB\-y\fR
Start formatting without further user-confirmation.
@@ -95,7 +99,7 @@
running in background or redirecting the output to a file.
.TP
-\fB\-P\fR or \fB\-\-percentage\fR
+\fB\-Q\fR or \fB\-\-percentage\fR
Print one line for each formatted cylinder showing the number of the
cylinder and percentage of formatting process.
Intended to be used by higher level interfaces.
@@ -112,6 +116,11 @@
.br
.TP
+\fB-Y\fR or \fB--yast_mode\fR
+YaST mode; suppress most output.
+.br
+
+.TP
\fB\-M\fR \fImode\fR or \fB\-\-mode\fR=\fImode\fR
Specify the \fImode\fR to be used to format the device. Valid modes are:
.RS
@@ -164,6 +173,18 @@
.TP
\fB\-l\fR \fIvolser\fR or \fB\-\-label\fR=\fIvolser\fR
+\fB-P\fR \fInumdisks\fR or \fB--max_parallel\fR=\fInumdisks\fR
+Specify the number of disks to be formatted in parallel.
+\fInumdisks\fR specifies the number of formatting processed,
+independent on the overall number of disks to be formatted.
+The maximum value for \fInumdisks\fR is 512. Default is 1.
+.br
+Using this option can decrease overall processing time when formatting
+several disks. Please note that the I/O throughput will dramatically
+increase when using this option. Use with care.
+.br
+
+.TP
Specify the volume serial number or volume identifier to be written
to disk after formatting. If no label is specified, a sensible default
is used. \fIvolser\fR is interpreted as ASCII string and is automatically
diff -Naur a/dasdfmt/dasdfmt.c b/dasdfmt/dasdfmt.c
--- a/dasdfmt/dasdfmt.c 2025-12-11 17:03:28.000000000 +0100
+++ b/dasdfmt/dasdfmt.c 2026-02-06 11:34:15.367040138 +0100
@@ -13,6 +13,8 @@
#include <sys/sysmacros.h>
#include <sys/time.h>
#include <sys/utsname.h>
+#include <sys/wait.h>
+
#include "lib/dasd_base.h"
#include "lib/dasd_sys.h"
@@ -26,6 +28,8 @@
#include "dasdfmt.h"
#include "dasdfmt_cli.h"
+#define MAX_DEVICES 512
+#define MAX_LENGTH 256
#define BUSIDSIZE 8
#define SEC_PER_DAY (60 * 60 * 24)
#define SEC_PER_HOUR (60 * 60)
@@ -58,7 +62,9 @@
static struct dasdfmt_globals {
dasd_information2_t dasd_info;
char *dev_path; /* device path entered by user */
+ char dev_path_array[MAX_DEVICES][MAX_LENGTH]; /* Array of device paths entered by user */
char *dev_node; /* reliable device node determined by dasdfmt */
+ char dev_node_array[MAX_DEVICES][MAX_LENGTH]; /* Array of reliable device nodes determined by dasdfmt */
int verbosity;
int testmode;
int withoutprompt;
@@ -78,6 +84,8 @@
int mode_specified;
int ese;
int no_discard;
+ int procnum;
+ int yast_mode;
} g = {
.dasd_info = { 0 },
};
@@ -202,7 +210,9 @@
}
if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) {
- printf("#");
+ if (g.yast_mode)
+ printf("%d|", g.procnum);
+ else printf("#");
fflush(stdout);
hashcount++;
}
@@ -276,7 +286,7 @@
unsigned int kl = 0;
int blksize = cdata->expect.blksize;
- if (g.print_progressbar || g.print_hashmarks)
+ if ((g.print_progressbar || g.print_hashmarks) && !g.yast_mode)
printf("\n");
/*
@@ -379,15 +389,15 @@
program_interrupt_in_progress = 1;
if (disk_disabled) {
- printf("Re-accessing the device...\n");
+ printf("Re-accessing %s...\n", g.dev_path);
disk_enable();
}
- printf("Rereading the partition table...\n");
+ printf("Rereading the partition table for %s...\n", g.dev_path);
rc = dasd_reread_partition_table(g.dev_node, 5);
if (rc) {
ERRMSG("%s: (signal handler) Re-reading partition table "
- "failed. (%s)\n", prog_name, strerror(rc));
+ "for %s failed. (%s)\n", prog_name, g.dev_path, strerror(rc));
} else {
printf("Exiting...\n");
}
@@ -407,9 +417,6 @@
unsigned int maj, min;
struct stat dev_stat;
- if (optind + 1 < argc)
- error("More than one device specified!");
-
if (optind >= argc)
error("No device specified!");
@@ -497,7 +504,7 @@
*/
static void check_disk(void)
{
- int err;
+ int err, index = 0 ;
bool ro;
err = dasd_is_ro(g.dev_node, &ro);
@@ -505,10 +512,27 @@
error("the ioctl call to retrieve read/write status information failed: %s",
strerror(err));
if (ro)
- error("Disk is read only!");
+ 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 in use!");
+ error("Disk %s is in use!", g.dev_path);
}
if (strncmp(g.dasd_info.type, "ECKD", 4) != 0) {
warnx("Unsupported disk type");
@@ -595,7 +619,7 @@
struct dasd_eckd_characteristics *characteristics;
if (g.verbosity > 0)
- printf("Retrieving disk geometry...\n");
+ printf("Retrieving disk geometry for %s...\n", g.dev_path);
characteristics = (struct dasd_eckd_characteristics *)
&g.dasd_info.characteristics;
@@ -623,13 +647,13 @@
"Cylinders above this limit will not be"
" accessible as a linux partition!\n"
"Type \"yes\" to continue, no will leave"
- " the disk untouched: ", LV_COMPAT_CYL);
+ " the %s disk untouched: ", LV_COMPAT_CYL, g.dev_path);
if (fgets(inp_buffer, sizeof(inp_buffer), stdin) == NULL)
return;
if (strcasecmp(inp_buffer, "yes") &&
strcasecmp(inp_buffer, "yes\n")) {
- printf("Omitting ioctl call (disk will "
- "NOT be formatted).\n");
+ printf("Omitting ioctl call (disk %s will "
+ "NOT be formatted).\n", g.dev_path);
return;
}
}
@@ -667,8 +691,9 @@
g.hashstep = 10;
}
- printf("Printing hashmark every %d cylinders.\n",
- g.hashstep);
+ if (!g.yast_mode)
+ printf("Printing hashmark every %d cylinders.\n",
+ g.hashstep);
}
}
@@ -767,7 +792,7 @@
check_params->start_unit = 0;
check_params->stop_unit = (cylinders * heads) - 1;
- printf("Checking format of the entire disk...\n");
+ printf("Checking format of the entire %s disk...\n", g.dev_path);
if (g.testmode) {
printf("Test mode active, omitting ioctl.\n");
@@ -791,7 +816,7 @@
if (process_tracks(cylinders, heads, check_params))
error("Use --mode=full to perform a clean format.");
- printf("Done. Disk is fine.\n");
+ printf("Done. Disk %s is fine.\n", g.dev_path);
}
/*
@@ -841,8 +866,8 @@
printf("Device Type: %s Provisioned\n",
g.ese ? "Thinly" : "Fully");
- printf("\nI am going to format the device ");
- printf("%s in the following way:\n", g.dev_path);
+ printf("\nI am going to format %s ", g.dev_path);
+ printf("in the following way:\n");
printf(" Device number of device : 0x%x\n", g.dasd_info.devno);
printf(" Labelling device : %s\n",
(g.writenolabel) ? "no" : "yes");
@@ -907,7 +932,7 @@
int ipl1_record_len, ipl2_record_len;
if (g.verbosity > 0)
- printf("Retrieving dasd information... ");
+ printf("Retrieving dasd information for %s... ", g.dev_path);
get_blocksize(&blksize);
@@ -925,7 +950,7 @@
/* write empty bootstrap (initial IPL records) */
if (g.verbosity > 0)
- printf("Writing empty bootstrap...\n");
+ printf("Writing label to %s...\n", g.dev_path);
/*
* Note: ldl labels do not contain the key field
@@ -1015,7 +1040,7 @@
}
if (g.verbosity > 0)
- printf("Writing VTOC... ");
+ printf("Writing VTOC to %s... ", g.dev_path);
label_position = (VTOC_START_CC * heads + VTOC_START_HH) *
geo.sectors * blksize;
@@ -1137,7 +1162,7 @@
if (!g.ese || g.no_discard)
return;
- printf("Releasing space for the entire device...\n");
+ printf("Releasing space for the entire %s device...\n", g.dev_path);
err = dasd_release_space(g.dev_node, &r);
if (err)
error("Could not release space: %s", strerror(err));
@@ -1156,20 +1181,21 @@
int err;
if (!(g.withoutprompt && g.verbosity < 1))
- printf("Formatting the device. This may take a while "
- "(get yourself a coffee).\n");
+ printf("Formatting the %s device. This may take a while "
+ "(get yourself a coffee).\n", g.dev_path);
if (g.verbosity > 0)
- printf("Detaching the device...\n");
+ printf("Detaching the %s device...\n", g.dev_path);
disk_disable(g.dev_node);
if (g.verbosity > 0)
- printf("Invalidate first track...\n");
+ printf("Invalidate first track on %s...\n", g.dev_path);
err = dasd_format_disk(filedes, &temp);
if (err != 0)
- error("(invalidate first track) IOCTL BIODASDFMT failed: %s", strerror(err));
+ error("(invalidate first track) IOCTL BIODASDFMT failed for %s: %s",
+ g.dev_path, strerror(err));
/* except track 0 from standard formatting procss */
p->start_unit = 1;
@@ -1177,19 +1203,19 @@
process_tracks(cylinders, heads, p);
if (g.verbosity > 0)
- printf("formatting tracks complete...\n");
+ printf("formatting tracks for %s complete...\n", g.dev_path);
temp.intensity = p->intensity;
if (g.verbosity > 0)
- printf("Revalidate first track...\n");
+ printf("Revalidate first track on %s...\n", g.dev_path);
err = dasd_format_disk(filedes, &temp);
if (err != 0)
error("(re-validate first track) IOCTL BIODASDFMT failed: %s", strerror(err));
if (g.verbosity > 0)
- printf("Re-accessing the device...\n");
+ printf("Re-accessing the %s device...\n", g.dev_path);
disk_enable();
}
@@ -1201,18 +1227,18 @@
format_data_t *p)
{
if (!(g.withoutprompt && g.verbosity < 1))
- printf("Formatting the device. This may take a while "
- "(get yourself a coffee).\n");
+ printf("Formatting the %s device. This may take a while "
+ "(get yourself a coffee).\n", g.dev_path);
if (g.verbosity > 0)
- printf("Detaching the device...\n");
+ printf("Detaching the %s device...\n", g.dev_path);
disk_disable(g.dev_node);
process_tracks(cylinders, heads, p);
if (g.verbosity > 0)
- printf("Formatting tracks complete...\n");
+ printf("formatting tracks for %s complete...\n", g.dev_path);
if (g.verbosity > 0)
printf("Re-accessing the device...\n");
@@ -1321,16 +1347,16 @@
if (!g.withoutprompt) {
printf("\n");
if (mode != EXPAND)
- printf("--->> ATTENTION! <<---\nAll data of "
- "that device will be lost.\n");
+ printf("--->> ATTENTION! <<---\nAll data on "
+ "the %s device will be lost.\n", g.dev_path);
printf("Type \"yes\" to continue, no will leave the "
"disk untouched: ");
if (fgets(inp_buffer, sizeof(inp_buffer), stdin) == NULL)
return;
if (strcasecmp(inp_buffer, "yes") &&
strcasecmp(inp_buffer, "yes\n")) {
- printf("Omitting ioctl call (disk will "
- "NOT be formatted).\n");
+ printf("Omitting ioctl call (disk %s will "
+ "NOT be formatted).\n", g.dev_path);
return;
}
}
@@ -1348,17 +1374,19 @@
break;
}
- printf("Finished formatting the device.\n");
+ if (!g.yast_mode)
+ printf("Finished formatting the %s device.\n", g.dev_path);
if (!(g.writenolabel || mode == EXPAND))
dasdfmt_write_labels(vlabel, cylinders, heads);
- printf("Rereading the partition table... ");
+ if (!g.yast_mode)
+ printf("Rereading the partition table for %s... ", g.dev_path);
err = dasd_reread_partition_table(g.dev_node, 5);
if (err != 0) {
ERRMSG("%s: error during rereading the partition "
"table: %s.\n", prog_name, strerror(err));
- } else {
+ } else if (!g.yast_mode) {
printf("ok\n");
}
}
@@ -1367,7 +1395,7 @@
static void eval_format_mode(void)
{
if (!g.force && g.mode_specified && g.ese && mode == EXPAND) {
- warnx("WARNING: The specified device is thin-provisioned");
+ warnx("WARNING: The specified device, %s, is thin-provisioned", g.dev_path);
warnx("Format mode 'expand' is not feasible.");
error("Use --mode=full or --mode=quick to perform a clean format");
}
@@ -1390,7 +1418,7 @@
prog_name = p + 1;
}
-int main(int argc, char *argv[])
+void process_dasd(volume_label_t *orig_vlabel, format_data_t format_params)
{
volume_label_t vlabel;
char old_volser[7];
@@ -1398,12 +1426,93 @@
char str[ERR_LENGTH];
char buf[7];
+ unsigned int cylinders, heads; int rc;
+
+ rc = dasd_get_info(g.dev_node, &g.dasd_info);
+ if (rc != 0)
+ error("the ioctl call to retrieve device information failed: %s", strerror(rc));
+
+ g.ese = dasd_sys_ese(g.dev_node);
+ eval_format_mode();
+
+ /* Not sure this next line is needed in the new version of the code. */
+ memcpy(&vlabel, orig_vlabel, sizeof(vlabel));
+
+ /* Either let the user specify the blksize or get it from the kernel */
+ if (!g.blksize_specified) {
+ if (!(mode == FULL ||
+ g.dasd_info.format == DASD_FORMAT_NONE) || g.check)
+ get_blocksize(&format_params.blksize);
+ else
+ format_params = ask_user_for_blksize(format_params);
+ }
+
+ if (g.keep_volser) {
+ if (g.labelspec)
+ error("The -k and -l options are mutually exclusive");
+ if (!(format_params.intensity & DASD_FMT_INT_COMPAT))
+ error("WARNING: VOLSER cannot be kept when using the ldl format!");
+
+ if (dasdfmt_get_volser(old_volser) == 0)
+ vtoc_volume_label_set_volser(&vlabel, old_volser);
+ else
+ error("VOLSER not found on device %s", g.dev_path);
+ }
+
+ check_disk();
+
+ if (check_param(str, ERR_LENGTH, &format_params) < 0)
+ error("%s", str);
+
+ set_geo(&cylinders, &heads);
+
+ set_label(&vlabel, &format_params, cylinders);
+
+ if (g.check)
+ check_disk_format(cylinders, heads, &format_params);
+ else
+ do_format_dasd(&vlabel, &format_params, cylinders, heads);
+
+ }
+
+static void yast_print_cylinfo(const char *dev_filename)
+{
+ unsigned int cylinders = -1u;
+ int fd;
+ dasd_information2_t dasd_info;
+ struct dasd_eckd_characteristics *characteristics;
+
+ fd = open(dev_filename, O_RDONLY);
+ if ((fd != -1) && ( ! ioctl(fd, BIODASDINFO2, &dasd_info))) {
+
+ characteristics = (struct dasd_eckd_characteristics *) &dasd_info.characteristics;
+ if (characteristics->no_cyl == LV_COMPAT_CYL && characteristics->long_no_cyl)
+ cylinders = characteristics->long_no_cyl;
+ else
+ cylinders = characteristics->no_cyl;
+ }
+
+ if (fd != -1)
+ close(fd);
+ printf("%u\n", cylinders);
+ fflush(stdout);
+}
+
+int main(int argc, char *argv[])
+ {
+ volume_label_t vlabel;
+
+ char buf[7];
+
char *blksize_param_str = NULL;
char *reqsize_param_str = NULL;
char *hashstep_str = NULL;
- int rc;
- unsigned int cylinders, heads;
+ int rc, numdev = 0, numproc = 0, status;
+ int max_parallel =1 ;
+ int running = 0;
+ int chpid;
+ int tmp;
/* Establish a handler for interrupt signals. */
signal(SIGTERM, program_interrupt_signal);
@@ -1447,6 +1556,12 @@
}
g.layout_specified = 1;
break;
+ case 'f':
+ get_device_name(optind-1, argc, argv);
+ strncpy(g.dev_path_array[numdev], g.dev_path, strlen(g.dev_path));
+ strncpy(g.dev_node_array[numdev], g.dev_node, strlen(g.dev_node));
+ numdev++;
+ break;
case 'y':
g.withoutprompt = 1;
break;
@@ -1466,7 +1581,7 @@
g.print_hashmarks = 1;
}
break;
- case 'P':
+ case 'Q':
if (!(g.print_hashmarks || g.print_progressbar))
g.print_percentage = 1;
break;
@@ -1525,6 +1640,13 @@
case OPT_NODISCARD:
g.no_discard = 1;
break;
+ case 'Y':
+ /* YaST mode */
+ g.yast_mode = 1;
+ break;
+ case 'P':
+ max_parallel = atoi(optarg);
+ break;
case OPT_CHECK:
g.check = 1;
break;
@@ -1539,6 +1661,9 @@
break; /* exit loop if finished */
}
+ /* Reset the value of rc since we're going to use it again later. */
+ rc = 0;
+
CHECK_SPEC_MAX_ONCE(g.blksize_specified, "blocksize");
CHECK_SPEC_MAX_ONCE(g.labelspec, "label");
CHECK_SPEC_MAX_ONCE(g.writenolabel, "omit-label-writing flag");
@@ -1554,54 +1679,70 @@
reqsize = DEFAULT_REQUESTSIZE;
}
+/* If -Y (YaST mode) was specified by the caller, then we need to suppress
+ * most of all the other output that might be generated. But, we _do_ want
+ * hashmarks printed so that YaST can track what's going on. If it wasn't
+ * specified on the command line, set it to a default of 10 cylinders.
+ */
+ if (g.yast_mode) {
+ g.verbosity = 0;
+ g.print_progressbar = 0;
+ g.print_percentage = 0;
+ if (! g.print_hashmarks) {
+ g.print_hashmarks = 1;
+ hashstep_str = "10";
+ }
+ }
+
if (g.print_hashmarks)
PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep");
- get_device_name(optind, argc, argv);
-
- rc = dasd_get_info(g.dev_node, &g.dasd_info);
- if (rc != 0)
- error("the ioctl call to retrieve device information failed: %s", strerror(rc));
-
- g.ese = dasd_sys_ese(g.dev_node);
- eval_format_mode();
-
- /* Either let the user specify the blksize or get it from the kernel */
- if (!g.blksize_specified) {
- if (!(mode == FULL ||
- g.dasd_info.format == DASD_FORMAT_NONE) || g.check)
- get_blocksize(&format_params.blksize);
- else
- format_params = ask_user_for_blksize(format_params);
- }
-
- if (g.keep_volser) {
- if (g.labelspec)
- error("The -k and -l options are mutually exclusive");
- if (!(format_params.intensity & DASD_FMT_INT_COMPAT))
- error("WARNING: VOLSER cannot be kept when using the ldl format!");
-
- if (dasdfmt_get_volser(old_volser) == 0)
- vtoc_volume_label_set_volser(&vlabel, old_volser);
- else
- error("VOLSER not found on device %s", g.dev_path);
- }
-
- check_disk();
+ while (optind < argc) {
+ get_device_name(optind, argc, argv);
+ strncpy(g.dev_path_array[numdev], g.dev_path, strlen(g.dev_path));
+ strncpy(g.dev_node_array[numdev], g.dev_node, strlen(g.dev_node));
+
+ optind++;
+ numdev++;
+ }
+
+ if (numdev > 1 && g.labelspec)
+ error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
+
+ if (g.yast_mode) {
+ for (numproc = 0; numproc < numdev; numproc++)
+ yast_print_cylinfo(g.dev_path_array[numproc]);
+
+ }
+
+ for (numproc = 0; numproc < numdev; numproc++) {
+ chpid = fork();
+ if (chpid == -1 )
+ ERRMSG_EXIT(EXIT_FAILURE,
+ "%s: Unable to create child process: %s\n",
+ prog_name, strerror(errno));
+ if (!chpid) {
+ g.procnum = numproc;
+ strncpy(g.dev_path, g.dev_path_array[numproc], strlen(g.dev_path_array[numproc])+1);
+ strncpy(g.dev_node, g.dev_node_array[numproc], strlen(g.dev_node_array[numproc])+1);
+ process_dasd(&vlabel, format_params);
+
+ free(g.dev_path);
+ free(g.dev_node);
+ exit(0);
+ } else {
+ running++;
+ if (running >= max_parallel) {
+ if (wait(&tmp) > 0 && WEXITSTATUS(tmp))
+ rc = WEXITSTATUS(tmp);
+ running--;
+ }
+ }
+ }
+ /* wait until all formatting children have finished */
+ while(wait(&status) > 0)
+ if (WEXITSTATUS(status))
+ rc = WEXITSTATUS(status);
- if (check_param(str, ERR_LENGTH, &format_params) < 0)
- error("%s", str);
-
- set_geo(&cylinders, &heads);
- set_label(&vlabel, &format_params, cylinders);
-
- if (g.check)
- check_disk_format(cylinders, heads, &format_params);
- else
- do_format_dasd(&vlabel, &format_params, cylinders, heads);
-
- free(g.dev_path);
- free(g.dev_node);
-
- return 0;
+ return rc;
}
diff -Naur a/dasdfmt/dasdfmt_cli.h b/dasdfmt/dasdfmt_cli.h
--- a/dasdfmt/dasdfmt_cli.h 2025-12-11 17:03:28.000000000 +0100
+++ b/dasdfmt/dasdfmt_cli.h 2026-02-06 11:01:52.002323129 +0100
@@ -34,6 +34,11 @@
.desc = "Perform complete format check on device",
.flags = UTIL_OPT_FLAG_NOSHORT,
},
+ {
+ .option = { "max_parallel", required_argument, NULL, 'P' },
+ .desc = "Format devices in parallel",
+ .flags = UTIL_OPT_FLAG_NOLONG,
+ },
UTIL_OPT_SECTION("FORMAT OPTIONS"),
{
.option = { "blocksize", required_argument, NULL, 'b' },
@@ -80,6 +85,10 @@
.desc = "Start formatting without further user-confirmation",
.flags = UTIL_OPT_FLAG_NOLONG,
},
+ {
+ .option = { "device", required_argument, NULL, 'f' },
+ .desc = "Specify device to format",
+ },
UTIL_OPT_SECTION("DISPLAY PROGRESS"),
{
.option = { "hashmarks", required_argument, NULL, 'm' },
@@ -91,9 +100,13 @@
.desc = "Show a progressbar",
},
{
- .option = { "percentage", no_argument, NULL, 'P' },
+ .option = { "percentage", no_argument, NULL, 'Q' },
.desc = "Show progress in percent",
},
+ {
+ .option = { "yast_mode", no_argument, NULL, 'Y' },
+ .desc = "YaST mode",
+ },
UTIL_OPT_SECTION("MISC"),
{
.option = { "check_host_count", no_argument, NULL, 'C' },

View File

@@ -1,32 +0,0 @@
---
etc/udev/rules.d/59-dasd.rules | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: s390-tools-2.40.0/etc/udev/rules.d/59-dasd.rules
===================================================================
--- s390-tools-2.40.0.orig/etc/udev/rules.d/59-dasd.rules
+++ s390-tools-2.40.0/etc/udev/rules.d/59-dasd.rules
@@ -15,7 +15,7 @@ KERNEL=="dasd*[!0-9]", ENV{ID_XUID}=="?*
LABEL="dasd_block_end"
-ACTION!="change|add", GOTO="dasd_symlinks_end"
+ACTION!="change|add", GOTO="dasd_partition_end"
# for partitions import parent information
KERNEL=="dasd*[0-9]", IMPORT{parent}=="ID_*"
@@ -24,6 +24,14 @@ KERNEL=="dasd*[0-9]", ENV{ID_SERIAL}=="?
KERNEL=="dasd*[0-9]", ENV{ID_UID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_UID}-part%n"
KERNEL=="dasd*[0-9]", ENV{ID_XUID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_XUID}-part%n"
+LABEL="dasd_partition_end"
+
+ENV{ID_SERIAL}!="?*", GOTO="dasd_symlinks_end"
+# by-label/by-uuid (filesystem properties)
+IMPORT{builtin}="blkid"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+
LABEL="dasd_symlinks_end"
# on device add set request queue scheduler to none

View File

@@ -1,35 +0,0 @@
From d0c2ffc90b9ee0e7b741d1c4b644cdf79f1d922b Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 20 May 2015 11:57:11 +0200
Subject: [PATCH] fdasd: skip partition check and BLKRRPART ioctl for emulated
devices
If 'fdasd -f' is called we cannot rely on the partition detection
via a simple check of the minor number, so the check should be
suppressed.
Similarly, not every emulated device supports the BLKRRPART ioctl,
so we should be suppressing the error message for these devices, too.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
fdasd/fdasd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: s390-tools-2.40.0/fdasd/fdasd.c
===================================================================
--- s390-tools-2.40.0.orig/fdasd/fdasd.c
+++ s390-tools-2.40.0/fdasd/fdasd.c
@@ -1232,10 +1232,12 @@ static int fdasd_get_volser(fdasd_anchor
*/
static void fdasd_reread_partition_table(fdasd_anchor_t *anc)
{
+ int rc = 0 ;
if (!anc->silent)
printf("rereading partition table...\n");
- if (dasd_reread_partition_table(options.device, 5) != 0) {
+ rc = dasd_reread_partition_table(options.device, 1);
+ if (rc == EINVAL && !anc->force_virtual) {
fdasd_error(anc, unable_to_ioctl, "Error while rereading "
"partition table.\nPlease reboot!");
}

View File

@@ -1,34 +0,0 @@
From f7a0f391f2c4e8acc96b21ab5de54a178aa60088 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 22 Nov 2013 15:39:38 +0100
Subject: [PATCH] 59-dasd.rules: generate by-id links on 'change' and 'add'
The by-id rules need to be triggered on both, 'change' and 'add',
to work correctly during restarting udev.
References: bnc#808042
Signed-off-by: Robert Milasan <rmilasan@suse.de>
---
etc/udev/rules.d/59-dasd.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/udev/rules.d/59-dasd.rules b/etc/udev/rules.d/59-dasd.rules
index 2b1435c..a08cb7c 100644
--- a/etc/udev/rules.d/59-dasd.rules
+++ b/etc/udev/rules.d/59-dasd.rules
@@ -6,9 +6,9 @@
SUBSYSTEM!="block", GOTO="dasd_symlinks_end"
KERNEL!="dasd*", GOTO="dasd_symlinks_end"
-ACTION!="change", GOTO="dasd_block_end"
+ACTION!="change|add", GOTO="dasd_block_end"
# by-id (hardware serial number)
-KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/sbin/dasdinfo -a -e -b $kernel"
+KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/usr/sbin/dasdinfo -a -e -b $kernel"
KERNEL=="dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="dasd*[!0-9]", ENV{ID_UID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_UID}"
KERNEL=="dasd*[!0-9]", ENV{ID_XUID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_XUID}"
--
1.8.1.4

View File

@@ -1,26 +0,0 @@
From f7a0f391f2c4e8acc96b21ab5de54a178aa60088 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 22 Nov 2013 15:39:38 +0100
Subject: [PATCH] 59-dasd.rules: generate by-id links on 'change' and 'add'
The by-id rules need to be triggered on both, 'change' and 'add',
to work correctly during restarting udev.
References: bnc#808042
Signed-off-by: Robert Milasan <rmilasan@suse.de>
---
etc/udev/rules.d/59-dasd.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/etc/udev/rules.d/59-dasd.rules
+++ b/etc/udev/rules.d/59-dasd.rules
@@ -6,7 +6,7 @@
SUBSYSTEM!="block", GOTO="dasd_symlinks_end"
KERNEL!="dasd*", GOTO="dasd_symlinks_end"
-ACTION!="change", GOTO="dasd_block_end"
+ACTION!="change|add", GOTO="dasd_block_end"
# by-id (hardware serial number)
KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/sbin/dasdinfo -a -e -b $kernel"
KERNEL=="dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

View File

@@ -1,22 +0,0 @@
---
zipl/boot/menu.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: s390-tools-2.40.0/zipl/boot/menu.c
===================================================================
--- s390-tools-2.40.0.orig/zipl/boot/menu.c
+++ s390-tools-2.40.0/zipl/boot/menu.c
@@ -191,8 +191,11 @@ int menu(void)
/* print config list */
menu_list();
- if (is_zvm())
- printf("Note: VM users please use '#cp vi vmsg <input>'\n");
+ if (is_zvm()) {
+ printf(" \n");
+ printf("Note: VM users please use '#cp vi vmsg <input> <kernel-parameters>'\n");
+ printf(" \n");
+ }
value = menu_read();

View File

@@ -1,150 +0,0 @@
---
etc/sysconfig/dumpconf | 133 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 133 insertions(+)
Index: s390-tools-2.40.0/etc/sysconfig/dumpconf
===================================================================
--- s390-tools-2.40.0.orig/etc/sysconfig/dumpconf
+++ s390-tools-2.40.0/etc/sysconfig/dumpconf
@@ -1,3 +1,4 @@
+###########################################################################################
#
# s390 dump config
#
@@ -78,3 +79,135 @@
# dumpconf becomes active immediately during system startup.
#
# ON_PANIC=reipl
+
+############################ Begin Definitions ###########################################
+## Path: System/Dumpconf
+## Description: Configures the actions which should be performed after a kernel panic
+## Type: list(stop,dump,vmcmd,reipl,dump_reipl)
+## Default: "stop"
+## ServiceRestart: dumpconf
+#
+# Define the action that should be taken if a kernel panic happens.
+#
+ON_PANIC="stop"
+
+## Type: integer(0:300)
+## Default: 5
+## ServiceRestart: dumpconf
+#
+# Using reipl or dump_reipl actions with ON_PANIC can lead to the system
+# looping with alternating IPLs and crashes. Use DELAY_MINUTES to prevent
+# such a loop. DELAY_MINUTES delays activating the specified panic action
+# for a newly started system. When the specified time has elapsed, dumpconf
+# activates the specified panic action. This action is taken should the
+# system subsequently crash. If the system crashes before the time has
+# elapsed the previously defined action is taken. If no previous action has
+# been defined the default action (STOP) is performed.
+#
+DELAY_MINUTES="5"
+
+## Type: list(ccw,fcp,nvme)
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the type, ccw for DASD, fcp for zFCP, or nvme for NVMe Disk.
+#
+DUMP_TYPE=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the device id for a DASD or SCSI over zFCP dump device.
+#
+# For example (DASD and SCSI over zFCP have the same structure): DEVICE=0.0.4711
+#
+DEVICE=""
+
+# Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the WWPN for a zFCP dump device.
+#
+# For example: WWPN=0x5005076303004711
+#
+WWPN=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the LUN for a zFCP dump device.
+#
+# For example: LUN=0x4711000000000000
+#
+LUN=""
+
+## Type: integer(0:30)
+## Default: "0"
+## ServiceRestart: dumpconf
+#
+# Define the Boot program selector for a zFCP dump device.
+#
+# A decimal value between 0 and 30 specifying the program to be loaded from
+# the FCP-I/O device.
+#
+BOOTPROG="0"
+
+## Type: string
+## Default: "0"
+## ServiceRestart: dumpconf
+#
+# Define the Boot record logical block address for a zFCP dump device.
+#
+# The hexadecimal digits designating the logical-block address of the boot record of the FCP-I/O device.
+# It must be a value from 0-FFFFFFFF FFFFFFFF. For values longer than 8 hex characters at least one separator
+# blank is required after the 8th character.
+#
+BR_LBA="0"
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the Function ID for NVMe dump device.
+#
+# The hexadecimal digits designating the Function ID for the NMVe disk.
+#
+# For example: FID=0x00000300
+#
+FID=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# Define the Namespace ID for the NVMe dump device
+#
+# The hexadecimal digits designating the Namespace ID for the NMVe disk.
+#
+# For example: NSID=0x00000001
+#
+NSID=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dumpconf
+#
+# VMCMD_<X>
+# Specifies a CP command, <X> is a number from one to eight. You can
+# specify up to eight CP commands that are executed in case of a kernel
+# panic. Note that VM commands, device adresses, and VM guest names
+# must be uppercase.
+#
+VMCMD_1=""
+VMCMD_2=""
+VMCMD_3=""
+VMCMD_4=""
+VMCMD_5=""
+VMCMD_6=""
+VMCMD_7=""
+VMCMD_8=""
+
+############################### End Definitions ##############################################
\ No newline at end of file

View File

@@ -1,50 +0,0 @@
Subject: zdev: Add support for handling I/O configuration data
From: Peter Oberparleiter <oberpar@linux.ibm.com>
Summary: zdev: Add support for handling I/O configuration data
Description: LPARs that are running in IBM Dynamic Partition Manager (DPM) mode
can access a firmware-generated I/O configuration data file that
contains s390-specific information about available I/O devices
such as qeth device numbers and parameters, and FCP device IDs.
This data file is intended to remove the need for users to
manually enter the corresponding device data during installation.
Linux kernels with the corresponding support make the I/O
configuration data available at the following location:
/sys/firmware/sclp_sd/config/data
This patch set adds support for handling this data file using the
chzdev and lszdev tools:
- I/O configuration data can be applied using chzdev's --import
option
- Initial RAM-Disk scripts automatically apply the
I/O configuration data to the system configuration
- lszdev can be used to display the applied auto-configuration
data
- chzdev can be used to manually override the
auto-configuration data
Upstream-ID: -
Problem-ID: LS1604
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
---
zdev/src/zdev-root-update.dracut | 6 ------
1 file changed, 6 deletions(-)
--- a/zdev/src/zdev-root-update.dracut
+++ b/zdev/src/zdev-root-update.dracut
@@ -20,10 +20,4 @@
exit 1
}
-echo "Installing IPL record"
-zipl --noninteractive || {
- echo "${TOOLNAME}: Error: Could not install IPL record" >&2
- exit 1
-}
-
exit 0

View File

@@ -1,474 +0,0 @@
From d6582bbaf0f3986a42f562046dc0caa9de89c75e Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 6 Oct 2017 08:58:17 +0200
Subject: [PATCH] dasdfmt: Allow multiple device arguments
Allow the user to specify several devices as arguments to dasdfmt.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
dasdfmt/dasdfmt.8 | 6 -
dasdfmt/dasdfmt.c | 197 +++++++++++++++++++++++++++++++-----------------------
2 files changed, 119 insertions(+), 84 deletions(-)
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.8
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.8
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.8
@@ -11,14 +11,14 @@ dasdfmt \- formatting of DASD (ECKD) dis
.br
[\-r \fIcylinder\fR] [\-b \fIblksize\fR] [\-l \fIvolser\fR] [\-d \fIlayout\fR]
.br
- [\-L] [\-V] [\-F] [\-k] [\-C] [\-M \fImode\fR] \fIdevice\fR
+ [\-L] [\-V] [\-F] [\-k] [\-C] [\-M \fImode\fR] \fIdevice\fR [\fIdevice\fR]
.SH DESCRIPTION
-\fBdasdfmt\fR formats a DASD (ECKD) disk drive to prepare it
+\fBdasdfmt\fR formats one or several DASD (ECKD) disk drive(s) to prepare them
for usage with Linux for S/390.
The \fIdevice\fR is the node of the device (e.g. '/dev/dasda').
Any device node created by udev for kernel 2.6 can be used
-(e.g. '/dev/dasd/0.0.b100/disc').
+(e.g. '/dev/dasd/0.0.b100/disc'). It is possible to specify up to 512 devices.
.br
\fBWARNING\fR: Careless usage of \fBdasdfmt\fR can result in
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.c
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.c
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.c
@@ -26,6 +26,8 @@
#include "dasdfmt.h"
#include "dasdfmt_cli.h"
+#define MAX_DEVICES 512
+#define MAX_LENGTH 256
#define BUSIDSIZE 8
#define SEC_PER_DAY (60 * 60 * 24)
#define SEC_PER_HOUR (60 * 60)
@@ -58,7 +60,9 @@ static const struct util_prg prg = {
static struct dasdfmt_globals {
dasd_information2_t dasd_info;
char *dev_path; /* device path entered by user */
+ char dev_path_array[MAX_DEVICES][MAX_LENGTH]; /* Array of device paths entered by user */
char *dev_node; /* reliable device node determined by dasdfmt */
+ char dev_node_array[MAX_DEVICES][MAX_LENGTH]; /* Array of reliable device nodes determined by dasdfmt */
int verbosity;
int testmode;
int withoutprompt;
@@ -379,15 +383,15 @@ static void program_interrupt_signal(int
program_interrupt_in_progress = 1;
if (disk_disabled) {
- printf("Re-accessing the device...\n");
+ printf("Re-accessing %s...\n", g.dev_path);
disk_enable();
}
- printf("Rereading the partition table...\n");
+ printf("Rereading the partition table for %s...\n", g.dev_path);
rc = dasd_reread_partition_table(g.dev_node, 5);
if (rc) {
ERRMSG("%s: (signal handler) Re-reading partition table "
- "failed. (%s)\n", prog_name, strerror(rc));
+ "for %s failed. (%s)\n", prog_name, g.dev_path, strerror(rc));
} else {
printf("Exiting...\n");
}
@@ -407,9 +411,6 @@ static void get_device_name(int optind,
unsigned int maj, min;
struct stat dev_stat;
- if (optind + 1 < argc)
- error("More than one device specified!");
-
if (optind >= argc)
error("No device specified!");
@@ -505,10 +506,10 @@ static void check_disk(void)
error("the ioctl call to retrieve read/write status information failed: %s",
strerror(err));
if (ro)
- error("Disk is read only!");
+ error("Disk %s is read only!", g.dev_path);
if (!g.force) {
if (g.dasd_info.open_count > 1)
- error("Disk in use!");
+ error("Disk %s is in use!", g.dev_path);
}
if (strncmp(g.dasd_info.type, "ECKD", 4) != 0) {
warnx("Unsupported disk type");
@@ -595,7 +596,7 @@ static void set_geo(unsigned int *cylind
struct dasd_eckd_characteristics *characteristics;
if (g.verbosity > 0)
- printf("Retrieving disk geometry...\n");
+ printf("Retrieving disk geometry for %s...\n", g.dev_path);
characteristics = (struct dasd_eckd_characteristics *)
&g.dasd_info.characteristics;
@@ -623,13 +624,13 @@ static void set_label(volume_label_t *vl
"Cylinders above this limit will not be"
" accessible as a linux partition!\n"
"Type \"yes\" to continue, no will leave"
- " the disk untouched: ", LV_COMPAT_CYL);
+ " the %s disk untouched: ", LV_COMPAT_CYL, g.dev_path);
if (fgets(inp_buffer, sizeof(inp_buffer), stdin) == NULL)
return;
if (strcasecmp(inp_buffer, "yes") &&
strcasecmp(inp_buffer, "yes\n")) {
- printf("Omitting ioctl call (disk will "
- "NOT be formatted).\n");
+ printf("Omitting ioctl call (disk %s will "
+ "NOT be formatted).\n", g.dev_path);
return;
}
}
@@ -767,7 +768,7 @@ static void check_disk_format(unsigned i
check_params->start_unit = 0;
check_params->stop_unit = (cylinders * heads) - 1;
- printf("Checking format of the entire disk...\n");
+ printf("Checking format of the entire %s disk...\n", g.dev_path);
if (g.testmode) {
printf("Test mode active, omitting ioctl.\n");
@@ -791,7 +792,7 @@ static void check_disk_format(unsigned i
if (process_tracks(cylinders, heads, check_params))
error("Use --mode=full to perform a clean format.");
- printf("Done. Disk is fine.\n");
+ printf("Done. Disk %s is fine.\n", g.dev_path);
}
/*
@@ -841,8 +842,8 @@ static void dasdfmt_print_info(volume_la
printf("Device Type: %s Provisioned\n",
g.ese ? "Thinly" : "Fully");
- printf("\nI am going to format the device ");
- printf("%s in the following way:\n", g.dev_path);
+ printf("\nI am going to format %s ", g.dev_path);
+ printf("in the following way:\n");
printf(" Device number of device : 0x%x\n", g.dasd_info.devno);
printf(" Labelling device : %s\n",
(g.writenolabel) ? "no" : "yes");
@@ -907,7 +908,7 @@ static void dasdfmt_write_labels(volume_
int ipl1_record_len, ipl2_record_len;
if (g.verbosity > 0)
- printf("Retrieving dasd information... ");
+ printf("Retrieving dasd information for %s... ", g.dev_path);
get_blocksize(&blksize);
@@ -925,7 +926,7 @@ static void dasdfmt_write_labels(volume_
/* write empty bootstrap (initial IPL records) */
if (g.verbosity > 0)
- printf("Writing empty bootstrap...\n");
+ printf("Writing empty bootstrap to %s...\n", g.dev_path);
/*
* Note: ldl labels do not contain the key field
@@ -984,7 +985,7 @@ static void dasdfmt_write_labels(volume_
label_position = g.dasd_info.label_block * blksize;
if (g.verbosity > 0)
- printf("Writing label...\n");
+ printf("Writing label to %s...\n", g.dev_path);
rc = lseek(fd, label_position, SEEK_SET);
if (rc != label_position) {
@@ -1015,7 +1016,7 @@ static void dasdfmt_write_labels(volume_
}
if (g.verbosity > 0)
- printf("Writing VTOC... ");
+ printf("Writing VTOC to %s... ", g.dev_path);
label_position = (VTOC_START_CC * heads + VTOC_START_HH) *
geo.sectors * blksize;
@@ -1137,7 +1138,7 @@ static void dasdfmt_release_space(void)
if (!g.ese || g.no_discard)
return;
- printf("Releasing space for the entire device...\n");
+ printf("Releasing space for the entire %s device...\n", g.dev_path);
err = dasd_release_space(g.dev_node, &r);
if (err)
error("Could not release space: %s", strerror(err));
@@ -1156,20 +1157,21 @@ static void dasdfmt_prepare_and_format(u
int err;
if (!(g.withoutprompt && g.verbosity < 1))
- printf("Formatting the device. This may take a while "
- "(get yourself a coffee).\n");
+ printf("Formatting the %s device. This may take a while "
+ "(get yourself a coffee).\n", g.dev_path);
if (g.verbosity > 0)
- printf("Detaching the device...\n");
+ printf("Detaching the %s device...\n", g.dev_path);
disk_disable(g.dev_node);
if (g.verbosity > 0)
- printf("Invalidate first track...\n");
+ printf("Invalidate first track on %s...\n", g.dev_path);
err = dasd_format_disk(filedes, &temp);
if (err != 0)
- error("(invalidate first track) IOCTL BIODASDFMT failed: %s", strerror(err));
+ error("(invalidate first track) IOCTL BIODASDFMT failed for %s: %s",
+ g.dev_path, strerror(err));
/* except track 0 from standard formatting procss */
p->start_unit = 1;
@@ -1177,19 +1179,19 @@ static void dasdfmt_prepare_and_format(u
process_tracks(cylinders, heads, p);
if (g.verbosity > 0)
- printf("formatting tracks complete...\n");
+ printf("formatting tracks for %s complete...\n", g.dev_path);
temp.intensity = p->intensity;
if (g.verbosity > 0)
- printf("Revalidate first track...\n");
+ printf("Revalidate first track on %s...\n", g.dev_path);
err = dasd_format_disk(filedes, &temp);
if (err != 0)
error("(re-validate first track) IOCTL BIODASDFMT failed: %s", strerror(err));
if (g.verbosity > 0)
- printf("Re-accessing the device...\n");
+ printf("Re-accessing the %s device...\n", g.dev_path);
disk_enable();
}
@@ -1201,18 +1203,18 @@ static void dasdfmt_expand_format(unsign
format_data_t *p)
{
if (!(g.withoutprompt && g.verbosity < 1))
- printf("Formatting the device. This may take a while "
- "(get yourself a coffee).\n");
+ printf("Formatting the %s device. This may take a while "
+ "(get yourself a coffee).\n", g.dev_path);
if (g.verbosity > 0)
- printf("Detaching the device...\n");
+ printf("Detaching the %s device...\n", g.dev_path);
disk_disable(g.dev_node);
process_tracks(cylinders, heads, p);
if (g.verbosity > 0)
- printf("Formatting tracks complete...\n");
+ printf("formatting tracks for %s complete...\n", g.dev_path);
if (g.verbosity > 0)
printf("Re-accessing the device...\n");
@@ -1321,16 +1323,16 @@ static void do_format_dasd(volume_label_
if (!g.withoutprompt) {
printf("\n");
if (mode != EXPAND)
- printf("--->> ATTENTION! <<---\nAll data of "
- "that device will be lost.\n");
+ printf("--->> ATTENTION! <<---\nAll data on "
+ "the %s device will be lost.\n", g.dev_path);
printf("Type \"yes\" to continue, no will leave the "
"disk untouched: ");
if (fgets(inp_buffer, sizeof(inp_buffer), stdin) == NULL)
return;
if (strcasecmp(inp_buffer, "yes") &&
strcasecmp(inp_buffer, "yes\n")) {
- printf("Omitting ioctl call (disk will "
- "NOT be formatted).\n");
+ printf("Omitting ioctl call (disk %s will "
+ "NOT be formatted).\n", g.dev_path);
return;
}
}
@@ -1348,12 +1350,12 @@ static void do_format_dasd(volume_label_
break;
}
- printf("Finished formatting the device.\n");
+ printf("Finished formatting the %s device.\n", g.dev_path);
if (!(g.writenolabel || mode == EXPAND))
dasdfmt_write_labels(vlabel, cylinders, heads);
- printf("Rereading the partition table... ");
+ printf("Rereading the partition table for %s... ", g.dev_path);
err = dasd_reread_partition_table(g.dev_node, 5);
if (err != 0) {
ERRMSG("%s: error during rereading the partition "
@@ -1367,7 +1369,7 @@ static void do_format_dasd(volume_label_
static void eval_format_mode(void)
{
if (!g.force && g.mode_specified && g.ese && mode == EXPAND) {
- warnx("WARNING: The specified device is thin-provisioned");
+ warnx("WARNING: The specified device, %s, is thin-provisioned", g.dev_path);
warnx("Format mode 'expand' is not feasible.");
error("Use --mode=full or --mode=quick to perform a clean format");
}
@@ -1390,20 +1392,70 @@ static void set_prog_name(char *s)
prog_name = p + 1;
}
-int main(int argc, char *argv[])
+void process_dasd(volume_label_t *orig_vlabel, format_data_t format_params)
{
volume_label_t vlabel;
char old_volser[7];
-
char str[ERR_LENGTH];
+ unsigned int cylinders, heads; int rc;
+
+ rc = dasd_get_info(g.dev_node, &g.dasd_info);
+ if (rc != 0)
+ error("the ioctl call to retrieve device information failed: %s", strerror(rc));
+
+ g.ese = dasd_sys_ese(g.dev_node);
+ eval_format_mode();
+
+ /* Not sure this next line is needed in the new version of the code. */
+ memcpy(&vlabel, orig_vlabel, sizeof(vlabel));
+
+ /* Either let the user specify the blksize or get it from the kernel */
+ if (!g.blksize_specified) {
+ if (!(mode == FULL ||
+ g.dasd_info.format == DASD_FORMAT_NONE) || g.check)
+ get_blocksize(&format_params.blksize);
+ else
+ format_params = ask_user_for_blksize(format_params);
+ }
+
+ if (g.keep_volser) {
+ if (g.labelspec)
+ error("The -k and -l options are mutually exclusive");
+ if (!(format_params.intensity & DASD_FMT_INT_COMPAT))
+ error("WARNING: VOLSER cannot be kept when using the ldl format!");
+
+ if (dasdfmt_get_volser(old_volser) == 0)
+ vtoc_volume_label_set_volser(&vlabel, old_volser);
+ else
+ error("VOLSER not found on device %s", g.dev_path);
+ }
+
+ check_disk();
+
+ if (check_param(str, ERR_LENGTH, &format_params) < 0)
+ error("%s", str);
+
+ set_geo(&cylinders, &heads);
+ set_label(&vlabel, &format_params, cylinders);
+
+ if (g.check)
+ check_disk_format(cylinders, heads, &format_params);
+ else
+ do_format_dasd(&vlabel, &format_params, cylinders, heads);
+
+}
+
+int main(int argc, char *argv[])
+{
+ volume_label_t vlabel;
+
char buf[7];
char *blksize_param_str = NULL;
char *reqsize_param_str = NULL;
char *hashstep_str = NULL;
- int rc;
- unsigned int cylinders, heads;
+ int rc, numdev = 0, i;
/* Establish a handler for interrupt signals. */
signal(SIGTERM, program_interrupt_signal);
@@ -1539,6 +1591,9 @@ int main(int argc, char *argv[])
break; /* exit loop if finished */
}
+ /* Reset the value of rc since we're going to use it again later. */
+ rc = 0;
+
CHECK_SPEC_MAX_ONCE(g.blksize_specified, "blocksize");
CHECK_SPEC_MAX_ONCE(g.labelspec, "label");
CHECK_SPEC_MAX_ONCE(g.writenolabel, "omit-label-writing flag");
@@ -1557,49 +1612,29 @@ int main(int argc, char *argv[])
if (g.print_hashmarks)
PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep");
- get_device_name(optind, argc, argv);
-
- rc = dasd_get_info(g.dev_node, &g.dasd_info);
- if (rc != 0)
- error("the ioctl call to retrieve device information failed: %s", strerror(rc));
-
- g.ese = dasd_sys_ese(g.dev_node);
- eval_format_mode();
-
- /* Either let the user specify the blksize or get it from the kernel */
- if (!g.blksize_specified) {
- if (!(mode == FULL ||
- g.dasd_info.format == DASD_FORMAT_NONE) || g.check)
- get_blocksize(&format_params.blksize);
- else
- format_params = ask_user_for_blksize(format_params);
- }
-
- if (g.keep_volser) {
- if (g.labelspec)
- error("The -k and -l options are mutually exclusive");
- if (!(format_params.intensity & DASD_FMT_INT_COMPAT))
- error("WARNING: VOLSER cannot be kept when using the ldl format!");
-
- if (dasdfmt_get_volser(old_volser) == 0)
- vtoc_volume_label_set_volser(&vlabel, old_volser);
- else
- error("VOLSER not found on device %s", g.dev_path);
+ while (optind < argc) {
+ get_device_name(optind, argc, argv);
+ strncpy(g.dev_path_array[numdev], g.dev_path, strlen(g.dev_path));
+ strncpy(g.dev_node_array[numdev], g.dev_node, strlen(g.dev_node));
+
+ optind++;
+ numdev++;
+ }
+
+ if (!numdev)
+ error("%s: No device specified!\n",
+ prog_name);
+
+ if (numdev > 1 && g.labelspec)
+ error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
+
+ for (i = 0; i < numdev; i++)
+ {
+ strncpy(g.dev_path, g.dev_path_array[i], strlen(g.dev_path_array[i])+1);
+ strncpy(g.dev_node, g.dev_node_array[i], strlen(g.dev_node_array[i])+1);
+ process_dasd(&vlabel, format_params);
}
- check_disk();
-
- if (check_param(str, ERR_LENGTH, &format_params) < 0)
- error("%s", str);
-
- set_geo(&cylinders, &heads);
- set_label(&vlabel, &format_params, cylinders);
-
- if (g.check)
- check_disk_format(cylinders, heads, &format_params);
- else
- do_format_dasd(&vlabel, &format_params, cylinders, heads);
-
free(g.dev_path);
free(g.dev_node);

View File

@@ -1,11 +0,0 @@
--- a/dasdfmt/dasdfmt_cli.h 2025-12-11 17:03:28.000000000 +0100
+++ b/dasdfmt/dasdfmt_cli.h 2026-01-05 13:25:46.220565369 +0100
@@ -91,7 +91,7 @@
.desc = "Show a progressbar",
},
{
- .option = { "percentage", no_argument, NULL, 'P' },
+ .option = { "percentage", no_argument, NULL, 'Q' },
.desc = "Show progress in percent",
},
UTIL_OPT_SECTION("MISC"),

View File

@@ -1,171 +0,0 @@
From a61154fd93122f5a0f2b74f21c3ac29eb437f150 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 6 Oct 2017 09:39:36 +0200
Subject: [PATCH] dasdfmt: Format devices in parallel
Allow dasdfmt to run in parallel when several devices are specified.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
dasdfmt/dasdfmt.8 | 16 +++++++++++++-
dasdfmt/dasdfmt.c | 58 ++++++++++++++++++++++++++++++++++++++++++------------
2 files changed, 60 insertions(+), 14 deletions(-)
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.8
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.8
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.8
@@ -7,7 +7,7 @@
dasdfmt \- formatting of DASD (ECKD) disk drives.
.SH SYNOPSIS
-\fBdasdfmt\fR [\-h] [\-t] [\-v] [\-y] [\-p] [\-P] [\-m \fIstep\fR]
+\fBdasdfmt\fR [\-h] [\-t] [\-v] [\-y] [\-p] [\-Q] [\-P] [\-m \fIstep\fR]
.br
[\-r \fIcylinder\fR] [\-b \fIblksize\fR] [\-l \fIvolser\fR] [\-d \fIlayout\fR]
.br
@@ -95,7 +95,7 @@ Do not use this option if you are using
running in background or redirecting the output to a file.
.TP
-\fB\-P\fR or \fB\-\-percentage\fR
+\fB\-Q\fR or \fB\-\-percentage\fR
Print one line for each formatted cylinder showing the number of the
cylinder and percentage of formatting process.
Intended to be used by higher level interfaces.
@@ -164,6 +164,18 @@ and always be a power of two. The recomm
.TP
\fB\-l\fR \fIvolser\fR or \fB\-\-label\fR=\fIvolser\fR
+\fB-P\fR \fInumdisks\fR or \fB--max_parallel\fR=\fInumdisks\fR
+Specify the number of disks to be formatted in parallel.
+\fInumdisks\fR specifies the number of formatting processed,
+independent on the overall number of disks to be formatted.
+The maximum value for \fInumdisks\fR is 512. Default is 1.
+.br
+Using this option can decrease overall processing time when formatting
+several disks. Please note that the I/O throughput will dramatically
+increase when using this option. Use with care.
+.br
+
+.TP
Specify the volume serial number or volume identifier to be written
to disk after formatting. If no label is specified, a sensible default
is used. \fIvolser\fR is interpreted as ASCII string and is automatically
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.c
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.c
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.c
@@ -13,6 +13,7 @@
#include <sys/sysmacros.h>
#include <sys/time.h>
#include <sys/utsname.h>
+#include <sys/wait.h>
#include "lib/dasd_base.h"
#include "lib/dasd_sys.h"
@@ -82,6 +83,7 @@ static struct dasdfmt_globals {
int mode_specified;
int ese;
int no_discard;
+ int procnum;
} g = {
.dasd_info = { 0 },
};
@@ -106,6 +108,11 @@ static void error(const char *format, ..
/*
* Helper function to calculate the days, hours, minutes, and seconds
* for a given timestamp in seconds
+ {
+ .option = { "max_parallel", required_argument, NULL, 'P' },
+ .desc = "Format devices in parallel",
+ .flags = UTIL_OPT_FLAG_NOLONG,
+ },
*/
static void calc_time(time_t time, int *d, int *h, int *m, int *s)
{
@@ -206,7 +213,7 @@ static void draw_progress(int cyl, unsig
}
if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) {
- printf("#");
+ printf("%d|", g.procnum);
fflush(stdout);
hashcount++;
}
@@ -1455,7 +1462,11 @@ int main(int argc, char *argv[])
char *reqsize_param_str = NULL;
char *hashstep_str = NULL;
- int rc, numdev = 0, i;
+ int rc, numdev = 0, numproc = 0, status;
+ int max_parallel =1 ;
+ int running = 0;
+ int chpid;
+ int tmp;
/* Establish a handler for interrupt signals. */
signal(SIGTERM, program_interrupt_signal);
@@ -1518,7 +1529,7 @@ int main(int argc, char *argv[])
g.print_hashmarks = 1;
}
break;
- case 'P':
+ case 'Q':
if (!(g.print_hashmarks || g.print_progressbar))
g.print_percentage = 1;
break;
@@ -1577,6 +1588,9 @@ int main(int argc, char *argv[])
case OPT_NODISCARD:
g.no_discard = 1;
break;
+ case 'P':
+ max_parallel = atoi(optarg);
+ break;
case OPT_CHECK:
g.check = 1;
break;
@@ -1628,15 +1642,35 @@ int main(int argc, char *argv[])
if (numdev > 1 && g.labelspec)
error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
- for (i = 0; i < numdev; i++)
- {
- strncpy(g.dev_path, g.dev_path_array[i], strlen(g.dev_path_array[i])+1);
- strncpy(g.dev_node, g.dev_node_array[i], strlen(g.dev_node_array[i])+1);
- process_dasd(&vlabel, format_params);
+ for (numproc = 0; numproc < numdev; numproc++) {
+ chpid = fork();
+ if (chpid == -1 )
+ ERRMSG_EXIT(EXIT_FAILURE,
+ "%s: Unable to create child process: %s\n",
+ prog_name, strerror(errno));
+ if (!chpid) {
+ g.procnum = numproc;
+ strncpy(g.dev_path, g.dev_path_array[numproc], strlen(g.dev_path_array[numproc])+1);
+ strncpy(g.dev_node, g.dev_node_array[numproc], strlen(g.dev_node_array[numproc])+1);
+ process_dasd(&vlabel, format_params);
+
+ free(g.dev_path);
+ free(g.dev_node);
+ exit(0);
+ } else {
+ running++;
+ if (running >= max_parallel) {
+ if (wait(&tmp) > 0 && WEXITSTATUS(tmp))
+ rc = WEXITSTATUS(tmp);
+ running--;
+ }
+ }
}
- free(g.dev_path);
- free(g.dev_node);
+ /* wait until all formatting children have finished */
+ while(wait(&status) > 0)
+ if (WEXITSTATUS(status))
+ rc = WEXITSTATUS(status);
- return 0;
+ return rc;
}

View File

@@ -1,189 +0,0 @@
From eabcb26fa4a91d410a6f75a9915a9ebb9f702c6b Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 6 Oct 2017 09:55:40 +0200
Subject: [PATCH] dasdfmt: Implement '-Y/--yast_mode'
Implement an option '-Y' to suppress most output.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
dasdfmt/dasdfmt.8 | 7 ++++-
dasdfmt/dasdfmt.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 72 insertions(+), 8 deletions(-)
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.8
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.8
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.8
@@ -7,7 +7,7 @@
dasdfmt \- formatting of DASD (ECKD) disk drives.
.SH SYNOPSIS
-\fBdasdfmt\fR [\-h] [\-t] [\-v] [\-y] [\-p] [\-Q] [\-P] [\-m \fIstep\fR]
+\fBdasdfmt\fR [\-h] [\-t] [\-v] [\-y] [\-p] [\-Q] [\-P] [\-Y] [\-m \fIstep\fR]
.br
[\-r \fIcylinder\fR] [\-b \fIblksize\fR] [\-l \fIvolser\fR] [\-d \fIlayout\fR]
.br
@@ -112,6 +112,11 @@ The value will be at least as big as the
.br
.TP
+\fB-Y\fR or \fB--yast_mode\fR
+YaST mode; suppress most output.
+.br
+
+.TP
\fB\-M\fR \fImode\fR or \fB\-\-mode\fR=\fImode\fR
Specify the \fImode\fR to be used to format the device. Valid modes are:
.RS
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.c
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.c
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.c
@@ -84,6 +84,7 @@ static struct dasdfmt_globals {
int ese;
int no_discard;
int procnum;
+ int yast_mode;
} g = {
.dasd_info = { 0 },
};
@@ -213,7 +214,9 @@ static void draw_progress(int cyl, unsig
}
if (g.print_hashmarks && (cyl / g.hashstep - hashcount) != 0) {
- printf("%d|", g.procnum);
+ if (g.yast_mode)
+ printf("%d|", g.procnum);
+ else printf("#");
fflush(stdout);
hashcount++;
}
@@ -287,7 +290,7 @@ static void evaluate_format_error(format
unsigned int kl = 0;
int blksize = cdata->expect.blksize;
- if (g.print_progressbar || g.print_hashmarks)
+ if ((g.print_progressbar || g.print_hashmarks) && !g.yast_mode)
printf("\n");
/*
@@ -675,8 +678,9 @@ static void check_hashmarks(void)
g.hashstep = 10;
}
- printf("Printing hashmark every %d cylinders.\n",
- g.hashstep);
+ if (!g.yast_mode)
+ printf("Printing hashmark every %d cylinders.\n",
+ g.hashstep);
}
}
@@ -1357,17 +1361,19 @@ static void do_format_dasd(volume_label_
break;
}
- printf("Finished formatting the %s device.\n", g.dev_path);
+ if (!g.yast_mode)
+ printf("Finished formatting the %s device.\n", g.dev_path);
if (!(g.writenolabel || mode == EXPAND))
dasdfmt_write_labels(vlabel, cylinders, heads);
- printf("Rereading the partition table for %s... ", g.dev_path);
+ if (!g.yast_mode)
+ printf("Rereading the partition table for %s... ", g.dev_path);
err = dasd_reread_partition_table(g.dev_node, 5);
if (err != 0) {
ERRMSG("%s: error during rereading the partition "
"table: %s.\n", prog_name, strerror(err));
- } else {
+ } else if (!g.yast_mode) {
printf("ok\n");
}
}
@@ -1443,6 +1449,7 @@ void process_dasd(volume_label_t *orig_v
error("%s", str);
set_geo(&cylinders, &heads);
+
set_label(&vlabel, &format_params, cylinders);
if (g.check)
@@ -1452,6 +1459,29 @@ void process_dasd(volume_label_t *orig_v
}
+static void yast_print_cylinfo(const char *dev_filename)
+{
+ unsigned int cylinders = -1u;
+ int fd;
+ dasd_information2_t dasd_info;
+ struct dasd_eckd_characteristics *characteristics;
+
+ fd = open(dev_filename, O_RDONLY);
+ if ((fd != -1) && ( ! ioctl(fd, BIODASDINFO2, &dasd_info))) {
+
+ characteristics = (struct dasd_eckd_characteristics *) &dasd_info.characteristics;
+ if (characteristics->no_cyl == LV_COMPAT_CYL && characteristics->long_no_cyl)
+ cylinders = characteristics->long_no_cyl;
+ else
+ cylinders = characteristics->no_cyl;
+ }
+
+ if (fd != -1)
+ close(fd);
+ printf("%u\n", cylinders);
+ fflush(stdout);
+}
+
int main(int argc, char *argv[])
{
volume_label_t vlabel;
@@ -1588,6 +1618,10 @@ int main(int argc, char *argv[])
case OPT_NODISCARD:
g.no_discard = 1;
break;
+ case 'Y':
+ /* YaST mode */
+ g.yast_mode = 1;
+ break;
case 'P':
max_parallel = atoi(optarg);
break;
@@ -1623,6 +1657,21 @@ int main(int argc, char *argv[])
reqsize = DEFAULT_REQUESTSIZE;
}
+/* If -Y (YaST mode) was specified by the caller, then we need to suppress
+ * most of all the other output that might be generated. But, we _do_ want
+ * hashmarks printed so that YaST can track what's going on. If it wasn't
+ * specified on the command line, set it to a default of 10 cylinders.
+ */
+ if (g.yast_mode) {
+ g.verbosity = 0;
+ g.print_progressbar = 0;
+ g.print_percentage = 0;
+ if (! g.print_hashmarks) {
+ g.print_hashmarks = 1;
+ hashstep_str = "10";
+ }
+ }
+
if (g.print_hashmarks)
PARSE_PARAM_INTO(g.hashstep, hashstep_str, 10, "hashstep");
@@ -1642,6 +1691,12 @@ int main(int argc, char *argv[])
if (numdev > 1 && g.labelspec)
error("Specifying a volser to be written doesn't make sense when formatting multiple DASD volumes.");
+ if (g.yast_mode) {
+ for (numproc = 0; numproc < numdev; numproc++)
+ yast_print_cylinfo(g.dev_path_array[numproc]);
+
+ }
+
for (numproc = 0; numproc < numdev; numproc++) {
chpid = fork();
if (chpid == -1 )

View File

@@ -1,66 +0,0 @@
From 8f05578d90df49dce6e13ee850fdc8bab84916ba Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 6 Oct 2017 12:23:32 +0200
Subject: [PATCH] dasdfmt: Implement '-f' for backwards compability
YaST is calling dasdfmt with '-f device', which used to be the old
calling convention. So to not keel over when used with an older
version of YaST we should accept this option, too.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
dasdfmt/dasdfmt.8 | 5 ++++-
dasdfmt/dasdfmt.c | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.8
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.8
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.8
@@ -11,7 +11,7 @@ dasdfmt \- formatting of DASD (ECKD) dis
.br
[\-r \fIcylinder\fR] [\-b \fIblksize\fR] [\-l \fIvolser\fR] [\-d \fIlayout\fR]
.br
- [\-L] [\-V] [\-F] [\-k] [\-C] [\-M \fImode\fR] \fIdevice\fR [\fIdevice\fR]
+ [\-L] [\-V] [\-F] [\-k] [\-C] [\-M \fImode\fR] [-f \fIdevice\fR] [\fIdevice\fR]
.SH DESCRIPTION
\fBdasdfmt\fR formats one or several DASD (ECKD) disk drive(s) to prepare them
@@ -39,6 +39,9 @@ out, what it \fBwould\fR do.
.TP
\fB\-v\fR
Increases verbosity.
+.TP
+\fB-f\fR \fIdevice\fR or \fB--device\fR=\fIdevice\fR
+Specify device to format. For backwards compability only.
.TP
\fB\-y\fR
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.c
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.c
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.c
@@ -113,6 +113,10 @@ static void error(const char *format, ..
.option = { "max_parallel", required_argument, NULL, 'P' },
.desc = "Format devices in parallel",
.flags = UTIL_OPT_FLAG_NOLONG,
+ {
+ .option = { "device", required_argument, NULL, 'f' },
+ .desc = "Specify device to format",
+ },
},
*/
static void calc_time(time_t time, int *d, int *h, int *m, int *s)
@@ -1540,6 +1544,12 @@ int main(int argc, char *argv[])
}
g.layout_specified = 1;
break;
+ case 'f':
+ get_device_name(optind-1, argc, argv);
+ strncpy(g.dev_path_array[numdev], g.dev_path, strlen(g.dev_path));
+ strncpy(g.dev_node_array[numdev], g.dev_node, strlen(g.dev_node));
+ numdev++;
+ break;
case 'y':
g.withoutprompt = 1;
break;

View File

@@ -1,58 +0,0 @@
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(-)
Index: s390-tools-2.40.0/dasdfmt/dasdfmt.c
===================================================================
--- s390-tools-2.40.0.orig/dasdfmt/dasdfmt.c
+++ s390-tools-2.40.0/dasdfmt/dasdfmt.c
@@ -512,7 +512,7 @@ static void check_layout(unsigned int in
*/
static void check_disk(void)
{
- int err;
+ int err, index = 0 ;
bool ro;
err = dasd_is_ro(g.dev_node, &ro);
@@ -522,6 +522,23 @@ static void check_disk(void)
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);
}

View File

@@ -1,28 +0,0 @@
From: Jiri Bohac <jbohac@suse.cz>
References: bsc#1219471
Subject: include 59-zfcp-compat.rules in kdump initrd
kdump uses a random one of the by-path symlinks to refer to the target
partition.
With 59-zfcp-compat.rules added to the SUSE package, symlinks in the form
/dev/disk/by-path/ccw-*.*.*-zfcp-*:*-part* are created. If kdump uses this symlink when generating
the kdump initrd it will fail on boot beacause the udev rule is missing in the kdump initrd
and the symlink not created in the kdump environment.
Fix this by including 59-zfcp-compat.rules in the kdump initrd.
---
zdev/dracut/95zdev-kdump/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
--- a/zdev/dracut/95zdev-kdump/module-setup.sh
+++ b/zdev/dracut/95zdev-kdump/module-setup.sh
@@ -78,6 +78,7 @@
inst_multiple /lib/s390-tools/zdev-from-dasd_mod.dasd
inst_rules "59-dasd.rules"
+ inst_rules "59-zfcp-compat.rules"
# Obtain kdump target device configuration

View File

@@ -1,112 +0,0 @@
From 001c5aa5d40ffa7a40d64416c43c67004de29b8f Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Thu, 28 Mar 2024 13:32:46 +0100
Subject: [PATCH] parse ipl device for activation
ported from dracut modules
---
zdev/dracut/95zdev/parse-dasd.sh | 20 +++++++++++--
zdev/dracut/95zdev/parse-zfcp.sh | 56 +++++++++++++++++++++++++--------------
2 files changed, 54 insertions(+), 22 deletions(-)
--- a/zdev/dracut/95zdev/parse-dasd.sh
+++ b/zdev/dracut/95zdev/parse-dasd.sh
@@ -10,6 +10,8 @@
# parameters are evaluated and used to configure dasd devices.
#
+zdev_dasd_base_args="--no-settle --yes --no-root-update --force"
+
# shellcheck source=/dev/null
type zdev_parse_dasd_list > /dev/null 2>&1 || . /lib/s390-tools/zdev-from-dasd_mod.dasd
@@ -27,9 +29,21 @@
zdev_parse_rd_dasd() {
local _zdev_dasd _zdev_dasd_list
- for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do
- _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd"
- done
+ # autodetect active bootdev from zipl device
+ if ! getargbool 0 'rd.dasd' \
+ && [[ -f /sys/firmware/ipl/ipl_type ]] \
+ && [[ $(< /sys/firmware/ipl/ipl_type) == "ccw" ]]; then
+ read -r _ccw < /sys/firmware/ipl/device
+
+ if lszdev --offline "$_ccw" &>/dev/null; then
+ chzdev --offline --existing --enable --active $zdev_dasd_base_args \
+ dasd "$_ccw"
+ fi
+ else
+ for _zdev_dasd in $(getargs rd.dasd -d 'rd_DASD='); do
+ _zdev_dasd_list="${_zdev_dasd_list:+${_zdev_dasd_list},}$_zdev_dasd"
+ done
+ fi
echo "$_zdev_dasd_list"
}
--- a/zdev/dracut/95zdev/parse-zfcp.sh
+++ b/zdev/dracut/95zdev/parse-zfcp.sh
@@ -12,25 +12,43 @@
zdev_zfcp_base_args="--no-settle --yes --no-root-update --force"
-for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
- (
- IFS_SAVED="$IFS"
- IFS="," # did not work in front of built-in set command below
- # shellcheck disable=SC2086
- set -- $zdev_zfcp_arg
- IFS=":" args="$*"
- IFS="$IFS_SAVED"
- echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo
- if [ "$#" -eq 1 ]; then
- # shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-host "$args" 2>&1 | zdev_vinfo
- else
+zdev_vinfo() {
+ local _zdev_vinfo_line
+ while read -r _zdev_vinfo_line || [ -n "$_zdev_vinfo_line" ]; do
+ # Prefix "<30>" represents facility LOG_DAEMON 3 and loglevel INFO 6:
+ # (facility << 3) | level.
+ echo "<30>dracut: $_zdev_vinfo_line" > /dev/kmsg
+ done
+}
+
+# autodetect active bootdev from zipl device
+if ! getargbool 0 'rd.zfcp' \
+ && [[ -f /sys/firmware/ipl/ipl_type ]] \
+ && [[ $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then
+ chzdev --offline --existing --enable --active $zdev_zfcp_base_args \
+ zfcp-host 2>&1 | zdev_vinfo
+else
+ for zdev_zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
+ (
+ IFS_SAVED="$IFS"
+ IFS="," # did not work in front of built-in set command below
# shellcheck disable=SC2086
- chzdev --enable --persistent $zdev_zfcp_base_args \
- zfcp-lun "$args" 2>&1 | zdev_vinfo
- fi
- )
-done
+ set -- $zdev_zfcp_arg
+ IFS=":" args="$*"
+ IFS="$IFS_SAVED"
+ echo "rd.zfcp ${zdev_zfcp_arg} :" | zdev_vinfo
+ if [ "$#" -eq 1 ]; then
+ # shellcheck disable=SC2086
+ chzdev --enable --persistent $zdev_zfcp_base_args \
+ zfcp-host "$args" 2>&1 | zdev_vinfo
+ else
+ # shellcheck disable=SC2086
+ chzdev --enable --persistent $zdev_zfcp_base_args \
+ zfcp-lun "$args" 2>&1 | zdev_vinfo
+ fi
+ )
+ done
+fi
+
unset zdev_zfcp_arg
unset zdev_zfcp_base_args

View File

@@ -1,3 +1,42 @@
-------------------------------------------------------------------
Fri Feb 13 08:09:45 UTC 2026 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
- Updated a logic error in (jsc#PED-14586):
* s390-tools-combined.patch
- Updated the code for IBM z17 machine type 9176:
* read_values.c
* cputype
* Renamed cputype.1 to cputype.8 and amended
* Amended read_values.8
- "Improved" the read_values.c:
* Added functionalities for '-a' and '-L attributes'
- Re-vendor-ed vendor.tar.zst
-------------------------------------------------------------------
Mon Feb 9 08:44:33 UTC 2026 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
- Reworked and combined all s390-tools patches (jsc#PED-14586)
- Applied new combined patches
* s390-tools-dasdfmt-reworked.patch
* s390-tools-combined.patch
- Removed obsolete patches
* s390-tools-sles15sp3-Allow-multiple-device-arguments.patch
* s390-tools-sles15sp3-Format-devices-in-parallel.patch
* s390-tools-sles15sp3-Format-devices-in-parallel-1.patch
* s390-tools-sles15sp3-Implement-Y-yast_mode.patch
* s390-tools-sles15sp3-Implement-f-for-backwards-compability.patch
* s390-tools-sles15sp3-dasdfmt-retry-BIODASDINFO-if-device-is-busy.patch
* s390-tools-sles12-create-filesystem-links.patch
* s390-tools-sles12-fdasd-skip-partition-check-and-BLKRRPART-ioctl.patch
* s390-tools-sles12-zipl_boot_msg.patch
* s390-tools-sles15-sysconfig-compatible-dumpconf.patch
* s390-tools-sles15sp1-11-zdev-Do-not-call-zipl-on-initrd-update.patch
* s390-tools-sles15sp6-kdump-initrd-59-zfcp-compat-rules.patch
* s390-tools-slfo-01-parse-ipl-device-for-activation.patch
* s390-tools-sles12-update-by_id-links-on-change-and-add-action.patch.opensuse
* s390-tools-sles12-update-by_id-links-on-change-and-add-action.patch.suse
- Re-vendor-ed vendor.tar.zst
-------------------------------------------------------------------
Tue Jan 13 09:06:04 UTC 2026 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>

View File

@@ -75,7 +75,7 @@ Source23: README.SUSE.opensuse
Source23: README.SUSE.suse
%endif
Source24: cputype
Source25: cputype.1
Source25: cputype.8
Source26: cio_ignore.service
Source27: setup_cio_ignore.sh
Source28: 59-prng.rules
@@ -135,26 +135,10 @@ Source200: vendor.tar.zst
# IBM patches
###
# SUSE patches
Patch900: s390-tools-sles12-zipl_boot_msg.patch
Patch901: s390-tools-sles15-sysconfig-compatible-dumpconf.patch
Patch902: s390-tools-sles12-create-filesystem-links.patch
%if 0%{?suse_version} >= 1550
Patch903: s390-tools-sles12-update-by_id-links-on-change-and-add-action.patch.opensuse
%else
Patch903: s390-tools-sles12-update-by_id-links-on-change-and-add-action.patch.suse
%endif
Patch904: s390-tools-sles15sp3-Allow-multiple-device-arguments.patch
Patch905: s390-tools-sles15sp3-Format-devices-in-parallel.patch
Patch906: s390-tools-sles15sp3-Format-devices-in-parallel-1.patch
Patch907: s390-tools-sles15sp3-Implement-Y-yast_mode.patch
Patch908: s390-tools-sles15sp3-Implement-f-for-backwards-compability.patch
Patch909: s390-tools-sles15sp3-dasdfmt-retry-BIODASDINFO-if-device-is-busy.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-ALP-zdev-live.patch
Patch913: s390-tools-sles15sp6-kdump-initrd-59-zfcp-compat-rules.patch
Patch900: s390-tools-combined.patch
Patch901: s390-tools-dasdfmt-reworked.patch
###
Patch990: s390-tools-slfo-01-parse-ipl-device-for-activation.patch
Patch910: s390-tools-ALP-zdev-live.patch
###
BuildRequires: curl-devel

BIN
vendor.tar.zst LFS

Binary file not shown.