s390-tools/s390-tools-sles15sp3-Implement-f-for-backwards-compability.patch
Nikolay Gueorguiev 8d7553371c Accepting request 1133714 from home:ngueorguiev:branches:Base:System
- Updated the .spec file to use gcc13 (bsc#1217838) 
- Amended read_values for '-S' option (bsc#1217923)
- Upgrade s390-tools to version 2.30
    (jsc#PED-5783, jsc#PED-6785, jsc#PED-7136, jsc#PED-6539, jsc#PED-4604, 
     jsc#PED-6649, jsc#PED-7138 )
- Amended the SUSE patches for version 2.30
- Revendored vendor.tar.gz
- Provide s390-tools on x86_64 to enable Secure Execution in the Cloud
    (jsc#PED-578, jsc#PED-7136, and jsc#PED-7138)
  * Selected tools from the s390-tools package need to be made available on x86_64.

OBS-URL: https://build.opensuse.org/request/show/1133714
OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=185
2023-12-17 06:32:28 +00:00

68 lines
2.3 KiB
Diff

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 | 6 +++++-
dasdfmt/dasdfmt.c | 8 ++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
Index: s390-tools-2.30.0/dasdfmt/dasdfmt.8
===================================================================
--- s390-tools-2.30.0.orig/dasdfmt/dasdfmt.8
+++ s390-tools-2.30.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 to prepare it
@@ -42,6 +42,10 @@ out, what it \fBwould\fR do.
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.
Index: s390-tools-2.30.0/dasdfmt/dasdfmt.c
===================================================================
--- s390-tools-2.30.0.orig/dasdfmt/dasdfmt.c
+++ s390-tools-2.30.0/dasdfmt/dasdfmt.c
@@ -113,6 +113,10 @@ static struct util_opt opt_vec[] = {
.desc = "Format devices in parallel",
.flags = UTIL_OPT_FLAG_NOLONG,
},
+ {
+ .option = { "device", required_argument, NULL, 'f' },
+ .desc = "Specify device to format",
+ },
UTIL_OPT_SECTION("FORMAT OPTIONS"),
{
.option = { "blocksize", required_argument, NULL, 'b' },
@@ -1662,6 +1666,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;