Compare commits

..

19 Commits

Author SHA1 Message Date
Jan Höppner
dc2ac0c916 New release s390-tools-2.11.0
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 14:13:09 +02:00
Stefan Haberland
367598b187 zipl: set correct secure IPL default value
Set secure IPL to auto as default value to match documented behavior.

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Marc Hartmayer
c01bcfa73a Use TOOLS_SYSCONFDIR for the default zipl.conf path
Use the configurable sysconf path instead of a hard-coded path for the
default zipl location.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Marc Hartmayer
fe457e2082 zipl: don't leak @script_file
...
==9448== 32 bytes in 1 blocks are definitely lost in loss record 1 of 3
==9448==    at 0x4831010: malloc (vg_replace_malloc.c:309)
==9448==    by 0x48E2205: __vasprintf_internal (vasprintf.c:71)
==9448==    by 0x1005061: misc_asprintf (misc.c:48)
==9448==    by 0x10131F3: disk_get_info (disk.c:239)
==9448==    by 0x1013C41: disk_get_info_from_file (disk.c:517)
==9448==    by 0x1011C87: bootmap_create (bootmap.c:1127)
==9448==    by 0x1004C73: main (zipl.c:192)
...

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Philipp Rudo
1d25112589 zipl: Fix error message printed with --dumptofs
The option --dump does not exist. Adjust it to --dumpto.

Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Marc Hartmayer
27a8c4434c zipl: fix freeing of uninitialized pointer
Not in every case ppn_cmd is initialized. Therefore, set it explicitly
to NULL.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Ursula Braun
e6a3b18104 dbginfo.sh: add ethtool output
This patch adds ethtool commands for network interfaces.
Especially the offload settings are important.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Ursula Braun
36292cb166 dbginfo.sh: add lspci and smc output
This patch adds the base lspci command to list pci devices
and the smc_dbg command from the smc-tools package to show
SMC socket related information.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Peter Oberparleiter
49da03e2e7 zdev: Fix broken zfcp-lun udev rule check
zdev incorrectly reports an invalid udev rule for zfcp-lun type rules.
This is caused by a faulty check for an empty udev rule file. This
commit fixes the check to only report invalid rules when there was no
valid configuration directive found in a zfcp-lun type udev rule.

Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reported-by: Steffen Maier <maier@linux.ibm.com>
Reported-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Ingo Franzki
139dff3525 zkey: Make confirmation prompts more user friendly
Show '[y/N]' on all user confirmation prompts to give the user a
hint what to reply. Also indicate that the operation was aborted
on a negative confirmation.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Ingo Franzki
94227b44d5 zkey: Store volume type property all uppercase
The volume type of a secure key is not really case sensitive,
but for better usability store and display it in uppercase always,
regardless in whatever case it was specified.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-09-06 12:44:34 +02:00
Stefan Haberland
a9f4ae2db3 zipl: fix zfcp dump image location
The zfcp dumper fails with the following error:

MLOPDM003I: Machine loader finished, moving data to final storage
	    location.

	    uncompression error
--- System halted

HCPGIR450W CP entered; disabled wait
PSW 00020001 80000000 00000000 DEADBEEF

The zipl command shows overlapping components when installing the dumper
to a zfcp disk:

zipl -d /dev/sda1
Building bootmap directly on partition '/dev/sda1'
Adding dump section
  kernel image......: /lib/s390-tools/zfcpdump/zfcpdump-image
  kernel parmline...: 'root=/dev/ram0 dump_mem=1 possible_cpus=1
  	 	      cgroup_disable=memory '
  component address:
    heap area.......: 0x00002000-0x00005fff
    stack area......: 0x0000f000-0x0000ffff
    internal loader.: 0x0000a000-0x0000dfff
    parameters......: 0x00009000-0x000091ff
    kernel image....: 0x00010000-0x005761ff
				     ^^^^^^
    parmline........: 0x00567000-0x005671ff
			  ^^^^^^
Preparing boot device: sda.
Done.

With the secure IPL patchset the offset of the kernel image has been
removed for the normal IPL case but it has not been removed for the dump
image which leads to the overlap of 0x10000.

Fix by removing the offset for the dump case.

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewd-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Tested-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:27:27 +02:00
Jan Höppner
15b7f9d83f lsdasd: Add support for thin-provisioned volumes
Make lsdasd aware of thinly provisioned (Extent Space Efficient (ESE))
DASD volumes.

The ESE information is added to the discipline output and the extended
output additionally lists information about logical capacity, allocated
space, and the extent size.

Output before:

Bus-ID     Status      Name      Device  Type  BlkSz  Size      Blocks
==============================================================================
0.0.95e0   alias                         ECKD
0.0.7eb4   active      dasda     94:0    ECKD  4096   7043MB    1803060
0.0.7eb7   active      dasdb     94:4    ECKD  4096   7043MB    1803060
0.0.95d0   active      dasdc     94:8    ECKD  4096   42259MB   10818360
0.0.95d1   n/f         dasdd     94:12   ECKD
0.0.95d4   n/f         dasde     94:16   ECKD
0.0.95d5   active      dasdh     94:28   ECKD  4096   831097MB  212761080

Output after:

Bus-ID    Status    Name      Device  Type         BlkSz  Size      Blocks
================================================================================
0.0.95e0  alias                       ECKD
0.0.7eb4  active    dasda     94:0    ECKD         4096   7043MB    1803060
0.0.7eb7  active    dasdb     94:4    ECKD         4096   7043MB    1803060
0.0.95d0  active    dasdc     94:8    ECKD (ESE)   4096   42259MB   10818360
0.0.95d1  n/f       dasdd     94:12   ECKD (ESE)
0.0.95d4  n/f       dasde     94:16   ECKD (ESE)
0.0.95d5  active    dasdh     94:28   ECKD (ESE)   4096   831097MB  212761080

Extended output before:

0.0.95d0/dasdc/94:8
  status:                               active
  type:                                 ECKD
  blksz:                                4096
  size:                                 42259MB
  blocks:                               10818360
  use_diag:                             0
  readonly:                             0
  eer_enabled:                          0
  erplog:                               0
  hpf:                                  1
  uid:                                  IBM.750000000ABT31.9500.d0
  paths_installed:                      38 39 3a 3b
  paths_in_use:                         38 39 3a 3b
  paths_non_preferred:
  paths_invalid_cabling:
  paths_cuir_quiesced:
  paths_invalid_hpf_characteristics:
  paths_error_threshold_exceeded:

Extended output after:

0.0.95d0/dasdc/94:8
  status:                               active
  type:                                 ECKD (ESE)
  blksz:                                4096
  size:                                 42259MB
  blocks:                               10818360
  extent_size:                          1113
  logical_capacity:                     60102
  space_allocated:                      18921
  use_diag:                             0
  readonly:                             0
  eer_enabled:                          0
  erplog:                               0
  hpf:                                  1
  uid:                                  IBM.750000000ABT31.9500.d0
  paths_installed:                      38 39 3a 3b
  paths_in_use:                         38 39 3a 3b
  paths_non_preferred:
  paths_invalid_cabling:
  paths_cuir_quiesced:
  paths_invalid_hpf_characteristics:
  paths_error_threshold_exceeded:

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:27:21 +02:00
Jan Höppner
214580a704 dasdfmt: Add support for thin-provisioned volumes
Make dasdfmt aware of thinly provisioned (Extent Space Efficient (ESE))
DASD volumes.
If an ESE volume is recognised a QUICK format is performed, formatting
only the first two tracks. The mode can always be overwritten by --mode.

Previously allocated space is always released before formatting, if not
specified otherwise. The option --no-discard (-D) is provided to omit
the space release.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:27:16 +02:00
Jan Höppner
96f13ead2b libdasd: Provide function to utilise release space ioctl
The BIODASDRAS (Release Allocated Space) ioctl allows to release
track-wise or full space of an Extent Space Efficient DASD volume.

Provide a library function to utilise this functionality.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:27:09 +02:00
Jan Höppner
8023a72b11 libdasd: Provide function to read ese sysfs attribute
Provide a function to determine whether a DASD is an Extent Space
Efficient (ESE) volume.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:27:03 +02:00
Jan Höppner
abc1875300 libdasd/dasdfmt: Move definitions to libdasd
Move definitions mostly used by IOCTLs to libdasd. Clean up unused and
old definitions while at it as well.

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:26:56 +02:00
Ingo Franzki
7d4c8c2781 zkey: Missing blank in command description
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:25:25 +02:00
Jan Höppner
f0afc6c89a Prepare for next release
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-08-08 15:25:25 +02:00
22 changed files with 326 additions and 100 deletions

View File

@@ -56,6 +56,7 @@ List of all individuals having contributed content to s390-tools
- Kittipon Meesompop
- Klaus-Dieter Wacker
- Lakhvich Dmitriy
- Marc Hartmayer
- Mark Dettinger
- Martin Kammerer
- Martin Peschke

View File

@@ -1,5 +1,21 @@
Release history for s390-tools (MIT version)
--------------------------------------------
* __v2.11.0 (2019-09-06)__
For Linux kernel version: 5.3
Changes of existing tools:
- dasdfmt: Add support for thin-provisioned volumes
- lsdasd: Add support for thin-provisioned volumes
- libdasd: Provide function to utilise release space ioctl
- libdasd: Provide function to read ese sysfs attribute
- dbginfo: Add lspci (PCI devices) and smc_dbg (SMC sockets)
- dbginfo: Gather ethtool related data
Bug Fixes:
- zipl: Fix freeing of uninitialized pointer
- zipl: Set correct secure IPL default value
* __v2.10.0 (2019-07-31)__
For Linux kernel version: 5.2

View File

@@ -5,7 +5,7 @@ COMMON_INCLUDED = true
# The variable "DISTRELEASE" should be overwritten in rpm spec files with:
# "make DISTRELEASE=%{release}" and "make install DISTRELEASE=%{release}"
VERSION = 2
RELEASE = 10
RELEASE = 11
PATCHLEVEL = 0
DISTRELEASE = build-$(shell date +%Y%m%d)
S390_TOOLS_RELEASE = $(VERSION).$(RELEASE).$(PATCHLEVEL)-$(DISTRELEASE)

View File

@@ -122,6 +122,8 @@ Format the first two tracks and write label and partition information. Only use
this option if you are sure that the target DASD already contains a regular
format with the specified blocksize. A blocksize can optionally be specified
using \fB-b\fR (\fB--blocksize\fR).
.br
For thin-provisioned DASD ESE volumes this is the default mode.
.IP expand
Format all unformatted tracks at the end of the target DASD. This mode assumes
that tracks at the beginning of the DASD volume have already been correctly
@@ -136,6 +138,10 @@ using \fB-b\fR (\fB--blocksize\fR).
Perform a complete format check on a DASD volume. A blocksize can be specified
with \fB-b\fR (\fB--blocksize\fR).
.TP
\fB--no-discard\fR
Omit a full space release when formatting a thin-provisioned DASD ESE volume.
.TP
\fB-r\fR \fIcylindercount\fR or \fB--requestsize\fR=\fIcylindercount\fR
Number of cylinders to be processed in one formatting step.

View File

@@ -53,6 +53,7 @@ static const struct util_prg prg = {
/* Defines for options with no short command */
#define OPT_CHECK 128
#define OPT_NOZERO 129
#define OPT_NODISCARD 130
static struct util_opt opt_vec[] = {
UTIL_OPT_SECTION("FORMAT ACTIONS"),
@@ -105,6 +106,11 @@ static struct util_opt opt_vec[] = {
.desc = "Prevent storage server from modifying record 0",
.flags = UTIL_OPT_FLAG_NOSHORT,
},
{
.option = { "no-discard", no_argument, NULL, OPT_NODISCARD },
.desc = "Do not discard space before formatting",
.flags = UTIL_OPT_FLAG_NOSHORT,
},
{
.option = { NULL, no_argument, NULL, 'y' },
.desc = "Start formatting without further user-confirmation",
@@ -921,6 +927,8 @@ static void dasdfmt_print_info(dasdfmt_info_t *info, char *devname,
printf("Drive Geometry: %d Cylinders * %d Heads = %d Tracks\n",
cylinders, heads, (cylinders * heads));
printf("Device Type: %s Provisioned\n",
info->ese ? "Thinly" : "Fully");
printf("\nI am going to format the device ");
printf("%s in the following way:\n", devname);
printf(" Device number of device : 0x%x\n", info->dasd_info.devno);
@@ -939,7 +947,10 @@ static void dasdfmt_print_info(dasdfmt_info_t *info, char *devname,
(p->intensity & DASD_FMT_INT_COMPAT) ? "yes" : "no");
printf(" Blocksize : %d\n", p->blksize);
printf(" Mode : %s\n", mode_str[mode]);
if (info->ese) {
printf(" Full Space Release : %s\n",
(info->no_discard || mode == FULL) ? "no" : "yes");
}
if (info->testmode)
printf("Test mode active, omitting ioctl.\n");
}
@@ -1234,6 +1245,26 @@ static void dasdfmt_format(dasdfmt_info_t *info, unsigned int cylinders,
process_tracks(info, cylinders, heads, format_params);
}
static void dasdfmt_release_space(dasdfmt_info_t *info)
{
format_data_t r = {
.start_unit = 0,
.stop_unit = 0,
.intensity = DASD_FMT_INT_ESE_FULL,
};
int err = 0;
if (!info->ese || info->no_discard)
return;
printf("Releasing space for the entire device...\n");
err = dasd_release_space(dev_filename, &r);
if (err) {
ERRMSG_EXIT(EXIT_FAILURE, "%s: Could not release space (%s)\n",
prog_name, strerror(err));
}
}
static void dasdfmt_prepare_and_format(dasdfmt_info_t *info,
unsigned int cylinders,
unsigned int heads, format_data_t *p)
@@ -1329,6 +1360,8 @@ static void dasdfmt_quick_format(dasdfmt_info_t *info, unsigned int cylinders,
if (info->force) {
printf("Skipping format check due to --force.\n");
} else if (info->ese) {
printf("Skipping format check due to thin-provisioned device.\n");
} else {
check_blocksize(info, p->blksize);
@@ -1438,6 +1471,7 @@ static void do_format_dasd(dasdfmt_info_t *info, char *devname,
dasdfmt_prepare_and_format(info, cylinders, heads, p);
break;
case QUICK:
dasdfmt_release_space(info);
dasdfmt_quick_format(info, cylinders, heads, p);
break;
case EXPAND:
@@ -1461,6 +1495,19 @@ static void do_format_dasd(dasdfmt_info_t *info, char *devname,
}
}
static void eval_format_mode(dasdfmt_info_t *info)
{
if (!info->force && info->mode_specified && info->ese && mode == EXPAND) {
ERRMSG_EXIT(EXIT_FAILURE,
"WARNING: The specified device is thin-provisioned\n"
"Format mode 'expand' is not feasible.\n"
"Use --mode=full or --mode=quick to perform a clean format\n");
}
if (!info->mode_specified)
mode = info->ese ? QUICK : FULL;
}
int main(int argc, char *argv[])
{
dasdfmt_info_t info = {
@@ -1496,8 +1543,6 @@ int main(int argc, char *argv[])
format_params.blksize = DEFAULT_BLOCKSIZE;
format_params.intensity = DASD_FMT_INT_COMPAT;
mode = FULL;
/*************** parse parameters **********************/
while (1) {
@@ -1601,6 +1646,10 @@ int main(int argc, char *argv[])
"invalid. Consult the man page for "
"more information.\n",
prog_name, optarg);
info.mode_specified = 1;
break;
case OPT_NODISCARD:
info.no_discard = 1;
break;
case OPT_CHECK:
info.check = 1;
@@ -1645,6 +1694,9 @@ int main(int argc, char *argv[])
"device information failed (%s).\n",
prog_name, strerror(rc));
info.ese = dasd_sys_ese(dev_filename);
eval_format_mode(&info);
/* Either let the user specify the blksize or get it from the kernel */
if (!info.blksize_specified) {
if (!(mode == FULL ||

View File

@@ -27,10 +27,6 @@
#include <sys/types.h>
#include <unistd.h>
/****************************************************************************
* SECTION: Definition needed for DASD-API (see dasd.h) *
****************************************************************************/
/*
* Represents possible format modes that can be specified when formatting
* a DASD.
@@ -45,57 +41,16 @@ static const char mode_str[3][10] = {
"Full", "Quick", "Expand"
};
/*
* values to be used for format_data_t.intensity
* 0/8: normal format
* 1/9: also write record zero
* 3/11: also write home address
* 4/12: invalidate track
*/
#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
#define DASD_FMT_INT_FMT_NOR0 16 /* remove permission to write record zero */
/*
* values to be used in format_check_t for indicating
* possible format errors
*/
#define DASD_FMT_ERR_TOO_FEW_RECORDS 1
#define DASD_FMT_ERR_TOO_MANY_RECORDS 2
#define DASD_FMT_ERR_BLKSIZE 3
#define DASD_FMT_ERR_RECORD_ID 4
#define DASD_FMT_ERR_KEY_LENGTH 5
/*
* values to be used for dasd_information2_t.format
* 0x00: NOT formatted
* 0x01: Linux disc layout
* 0x02: Common disc layout
*/
#define DASD_FORMAT_NONE 0
#define DASD_FORMAT_LDL 1
#define DASD_FORMAT_CDL 2
/****************************************************************************
* SECTION: DASDFMT internal types *
****************************************************************************/
#define DASD_PARTN_BITS 2
#define PARTN_MASK ((1 << DASD_PARTN_BITS) - 1)
#define EXIT_MISUSE 1
#define EXIT_BUSY 2
#define LABEL_LENGTH 14
#define VLABEL_CHARS 84
#define LINE_LENGTH 80
#define ERR_LENGTH 90
#define DEFAULT_BLOCKSIZE 4096
/* requestsize - number of cylinders in one format step */
#define DEFAULT_REQUESTSIZE 10
#define USABLE_PARTITIONS ((1 << DASD_PARTN_BITS) - 1)
#define ERRMSG(x...) {fflush(stdout);fprintf(stderr,x);}
#define ERRMSG_EXIT(ec,x...) {fflush(stdout);fprintf(stderr,x);exit(ec);}
@@ -137,6 +92,9 @@ typedef struct dasdfmt_info {
int force_host;
int layout_specified;
int check;
int mode_specified;
int ese;
int no_discard;
} dasdfmt_info_t;

View File

@@ -54,6 +54,16 @@ typedef struct dasd_information2_t {
unsigned int reserved7; /* reserved for further use ,... */
} dasd_information2_t;
/*
* values to be used for dasd_information2_t.format
* 0x00: NOT formatted
* 0x01: Linux disc layout
* 0x02: Common disc layout
*/
#define DASD_FORMAT_NONE 0
#define DASD_FORMAT_LDL 1
#define DASD_FORMAT_CDL 2
struct dasd_eckd_characteristics {
unsigned short cu_type;
struct {
@@ -139,6 +149,16 @@ typedef struct format_data_t {
unsigned int intensity;
} format_data_t;
/*
* values to be used for format_data_t.intensity
*/
#define DASD_FMT_INT_FMT_R0 1 /* write record zero */
#define DASD_FMT_INT_FMT_HA 2 /* write home address, also set FMT_R0 ! */
#define DASD_FMT_INT_INVAL 4 /* invalidate tracks */
#define DASD_FMT_INT_COMPAT 8 /* use OS/390 compatible disk layout */
#define DASD_FMT_INT_FMT_NOR0 16 /* remove permission to write record zero */
#define DASD_FMT_INT_ESE_FULL 32 /* release space for entire volume */
/*
* struct format_check_t
* represents all data necessary to evaluate the format of
@@ -157,6 +177,16 @@ typedef struct format_check_t {
unsigned int key_length; /* Key length of first record in error */
} format_check_t;
/*
* values to be used in format_check_t for indicating
* possible format errors
*/
#define DASD_FMT_ERR_TOO_FEW_RECORDS 1
#define DASD_FMT_ERR_TOO_MANY_RECORDS 2
#define DASD_FMT_ERR_BLKSIZE 3
#define DASD_FMT_ERR_RECORD_ID 4
#define DASD_FMT_ERR_KEY_LENGTH 5
#ifndef __linux__
/* definition from hdreg.h */
struct hd_geometry {
@@ -181,6 +211,8 @@ struct hd_geometry {
#define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER, 3, dasd_information2_t)
/* #define BIODASDFORMAT _IOW(IOCTL_LETTER,0,format_data_t) , deprecated */
#define BIODASDFMT _IOW(DASD_IOCTL_LETTER, 1, format_data_t)
/* Release Allocated Space */
#define BIODASDRAS _IOW(DASD_IOCTL_LETTER, 3, format_data_t)
/* Check device format according to format_data_t */
#define BIODASDCHECKFMT _IOWR(DASD_IOCTL_LETTER, 2, format_check_t)
@@ -204,6 +236,7 @@ int dasd_check_format(const char *device, format_check_t *p);
int dasd_format_disk(int fd, format_data_t *p);
int dasd_disk_disable(const char *device, int *fd);
int dasd_disk_enable(int fd);
int dasd_release_space(const char *device, format_data_t *r);
int dasd_get_blocksize(const char *device, unsigned int *blksize);
int dasd_get_blocksize_in_bytes(const char *device, unsigned long long *blksize);
int dasd_get_geo(const char *device, struct hd_geometry *geo);

View File

@@ -15,6 +15,7 @@
#include <stdio.h>
int dasd_sys_raw_track_access(char *);
int dasd_sys_ese(char *);
int dasd_reset_chpid(char *, char *);
int dasd_get_host_access_count(char *device);

View File

@@ -228,6 +228,26 @@ int dasd_check_format(const char *device, format_check_t *p)
return 0;
}
/*
* Release Allocated Space
*
* @param[in] fd device node's file descriptor
* @param[in] r format options
*
* @retval 0 in case of success
* @retval errno in case of failure
*/
int dasd_release_space(const char *device, format_data_t *r)
{
int fd;
fd = dasd_open_device(device, O_RDONLY);
RUN_IOCTL(fd, BIODASDRAS, r);
dasd_close_device(fd);
return 0;
}
/*
* Reread partition table
*

View File

@@ -57,6 +57,43 @@ int dasd_sys_raw_track_access(char *devnode)
return (rc == 1) ? 1 : 0;
}
/**
* Is volume extent space efficient a.k.a. thin-provisioned
*
* The "devnode" parameter can be any valid relative or absolute path to
* a DASD device node, for example:
*
* - /dev/dasda
* - /dev/disk/by-path/ccw-0.0.bf20
*
* @param[in] devnode Device node of interest
*
* @retval 1 Volume is extent space efficient
* @retval 0 Volume is not extent space efficient or
* cannot be determined
*/
int dasd_sys_ese(char *devnode)
{
char busid[DASD_BUS_ID_SIZE];
char *path;
FILE *fp;
int rc;
if (util_sys_get_dev_addr(devnode, busid) != 0)
return 0;
path = util_path_sysfs("bus/ccw/devices/%s/ese", busid);
fp = fopen(path, "r");
if (!fp) {
free(path);
return 0;
}
rc = fgetc(fp) - '0';
fclose(fp);
return (rc == 1) ? 1 : 0;
}
int dasd_get_pm_from_chpid(char *busid, unsigned int chpid, int *mask)
{

View File

@@ -173,6 +173,9 @@ readonly OUTPUT_FILE_LSOF="${WORKPATH}open_files.out"
# File that includes content of OSA OAT
readonly OUTPUT_FILE_OSAOAT="${WORKPATH}osa_oat"
# File that includes content of Ethtool commands
readonly OUTPUT_FILE_ETHTOOL="${WORKPATH}ethtool.out"
# File that includes the output of journalctl
readonly OUTPUT_FILE_JOURNALCTL="${WORKPATH}journalctl.out"
@@ -192,7 +195,7 @@ readonly OUTPUT_FILE_NVME="${WORKPATH}nvme.out"
readonly MOUNT_POINT_DEBUGFS="/sys/kernel/debug"
# The amount of steps running the whole collections
readonly COLLECTION_COUNT=12
readonly COLLECTION_COUNT=13
# The kernel version (e.g. '2' from 2.6.32 or '3' from 3.2.1)
readonly KERNEL_VERSION=$(uname -r 2>/dev/null | cut -d'.' -f1)
@@ -472,6 +475,8 @@ CMDS="uname -a\
:systemctl status docker.service\
:blockdev --report\
:lvdisplay\
:lspci -vv\
:smc_dbg\
"
########################################
@@ -750,6 +755,37 @@ collect_osaoat() {
pr_log_stdout " "
}
########################################
collect_ethtool() {
local network_devices
local network_device
network_devices=$(ls /sys/class/net 2>/dev/null)
if which ethtool >/dev/null 2>&1; then
if test -n "${network_devices}"; then
pr_syslog_stdout "8 of ${COLLECTION_COUNT}: Collecting ethtool output"
for network_device in ${network_devices}; do
call_run_command "ethtool ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -k ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -a ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -c ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -g ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -i ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -l ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -P ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -S ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
call_run_command "ethtool -T ${network_device}" "${OUTPUT_FILE_ETHTOOL}"
done
else
pr_syslog_stdout "8 of ${COLLECTION_COUNT}: Collecting ethtool output skipped - no devices"
fi
else
pr_syslog_stdout "8 of ${COLLECTION_COUNT}: Collecting ethtool output skipped - not available"
fi
pr_log_stdout " "
}
########################################
# OpenVSwitch
collect_ovs() {
@@ -766,7 +802,7 @@ collect_ovs() {
:ovsdb-client dump\
"
if test -n "${br_list}"; then
pr_syslog_stdout "8 of ${COLLECTION_COUNT}: Collecting OpenVSwitch output"
pr_syslog_stdout "9 of ${COLLECTION_COUNT}: Collecting OpenVSwitch output"
IFS=:
for ovscmd in ${ovscmds}; do
IFS=${ifs_orig} call_run_command "${ovscmd}" "${OUTPUT_FILE_OVS}.out"
@@ -785,7 +821,7 @@ collect_ovs() {
IFS="${ifs_orig}"
done
else
pr_syslog_stdout "8 of ${COLLECTION_COUNT}: Collecting OpenVSwitch output skipped"
pr_syslog_stdout "9 of ${COLLECTION_COUNT}: Collecting OpenVSwitch output skipped"
fi
pr_log_stdout " "
@@ -798,12 +834,12 @@ collect_domain_xml() {
domain_list=$(virsh list --all --name)
if test -n "${domain_list}"; then
pr_syslog_stdout "9 of ${COLLECTION_COUNT}: Collecting domain xml files"
pr_syslog_stdout "10 of ${COLLECTION_COUNT}: Collecting domain xml files"
for domain in ${domain_list}; do
call_run_command "virsh dumpxml ${domain}" "${OUTPUT_FILE_XML}_${domain}.xml"
done
else
pr_syslog_stdout "9 of ${COLLECTION_COUNT}: Collecting domain xml files skipped"
pr_syslog_stdout "10 of ${COLLECTION_COUNT}: Collecting domain xml files skipped"
fi
pr_log_stdout " "
@@ -817,23 +853,23 @@ collect_docker() {
# call docker inspect for all containers
item_list=$(docker ps -qa)
if test -n "${item_list}"; then
pr_syslog_stdout "10a of ${COLLECTION_COUNT}: Collecting docker container output"
pr_syslog_stdout "11a of ${COLLECTION_COUNT}: Collecting docker container output"
for item in ${item_list}; do
call_run_command "docker inspect ${item}" "${OUTPUT_FILE_DOCKER}"
done
else
pr_syslog_stdout "10a of ${COLLECTION_COUNT}: Collecting docker container output skipped"
pr_syslog_stdout "11a of ${COLLECTION_COUNT}: Collecting docker container output skipped"
fi
# call docker inspect for all networks
item_list=$(docker network ls -q)
if test -n "${item_list}"; then
pr_syslog_stdout "10b of ${COLLECTION_COUNT}: Collecting docker network output"
pr_syslog_stdout "11b of ${COLLECTION_COUNT}: Collecting docker network output"
for item in ${item_list}; do
call_run_command "docker network inspect ${item}" "${OUTPUT_FILE_DOCKER}"
done
else
pr_syslog_stdout "10b of ${COLLECTION_COUNT}: Collecting docker network output skipped"
pr_syslog_stdout "11b of ${COLLECTION_COUNT}: Collecting docker network output skipped"
fi
pr_log_stdout " "
@@ -843,7 +879,7 @@ collect_docker() {
collect_nvme() {
local NVME
pr_syslog_stdout "11 of ${COLLECTION_COUNT}: Collecting nvme output"
pr_syslog_stdout "12 of ${COLLECTION_COUNT}: Collecting nvme output"
call_run_command "nvme list" "${OUTPUT_FILE_NVME}"
for NVME in /dev/nvme[0-9]*; do
@@ -1150,6 +1186,8 @@ collect_configfiles
collect_osaoat
collect_ethtool
collect_ovs
collect_domain_xml

View File

@@ -52,7 +52,7 @@ Sample invocation:
.br
dbginfo.sh: Debug information script version %S390_TOOLS_VERSION%
.br
Copyright IBM Corp. 2002, 2017
Copyright IBM Corp. 2002, 2019
.PP
Hardware platform = s390x
.br
@@ -60,34 +60,40 @@ Kernel version = <kernel\-version>
.br
Runtime environment = z/VM
.PP
1 of 11: Collecting command output
1 of 13: Collecting command output
.PP
2 of 11: Collecting z/VM command output
2 of 13: Collecting z/VM command output
.PP
3 of 11: Collecting procfs
3 of 13: Collecting procfs
.PP
4 of 11: Collecting sysfs
4 of 13: Collecting sysfs
.PP
5 of 11: Collecting log files
5 of 13: Collecting log files
.PP
6 of 11: Collecting config files
6 of 13: Collecting config files
.PP
7 of 11: Collecting osa oat output skipped \- not available
7 of 13: Collecting osa oat output skipped \- not available
.PP
8 of 11: Collecting OpenVSwitch output
8 of 13: Collecting ethtool output
.PP
9 of 11: Collecting domain xml files
9 of 13: Collecting OpenVSwitch output
.PP
10a of 11: Collecting docker container output
10b of 11: Collecting docker network output
10 of 13: Collecting domain xml files
.PP
11 of 11: Postprocessing
11a of 13: Collecting docker container output
11b of 13: Collecting docker network output
.PP
12 of 13: Collecting nvme output
.PP
13 of 13: Postprocessing
.PP
Finalizing: Creating archive with collected data
.PP
Collected data was saved to:
.br
>> /data\-collection/DBGINFO\-2015\-02\-26\-21\-39\-16\-host\-012345.tgz <<
>> /data\-collection/DBGINFO\-2019\-08\-19\-21\-39\-16\-host\-012345.tgz <<
.br
Review the collected data before sending to your service organization.
.SH HINTS
Run the script with root authority.
.br

View File

@@ -164,6 +164,7 @@ function gatherDeviceData() {
read DEV_UID 2> /dev/null < $DEVPATH/uid || continue
read READONLY 2> /dev/null < $DEVPATH/readonly || continue
read DISCIPLINE 2> /dev/null < $DEVPATH/discipline || continue
read ESE 2> /dev/null < $DEVPATH/ese
# Block device specific information is only available for
# devices that are online and not a PAV alias
@@ -244,7 +245,7 @@ function newoutput()
#-------------------------------------------#
if [[ "$ONLINE" == 0 ]]; then
printf "%s:%s:%-8s offline\n" \
printf "%s:%s:%-8s offline\n" \
"$SORTKEYLEN" "$SORTKEY" \
"$BUSID" ;
return
@@ -252,7 +253,7 @@ function newoutput()
if [[ "$ALIAS" == 1 ]]; then
if [[ "$BASEONLY" == "false" ]]; then
printf "%s:%s:%-8s alias %28s\n" \
printf "%s:%s:%-8s alias %26s\n" \
"$SORTKEYLEN" "$SORTKEY" \
"$BUSID" \
"$DISCIPLINE"
@@ -286,7 +287,11 @@ function newoutput()
ACTIVE="active"
fi
printf "%s:%s:%-8s %-6s%-4s %-8s %-2s:%-2s %-4s %-4s %-8s %s\n" \
if [[ "$ESE" == 1 ]]; then
DISCIPLINE="${DISCIPLINE} (ESE)"
fi
printf "%s:%s:%-8s %-6s%-2s %-8s %-2s:%-2s %-11s %-4s %-8s %s\n" \
"$SORTKEYLEN" "$SORTKEY" \
"$BUSID" \
"$ACTIVE" \
@@ -378,6 +383,10 @@ function extended()
read OPM NPPM CABLEPM CUIRPM HPFPM IFCCPM 2> /dev/null < $DEVPATH/path_masks
read -a C 2> /dev/null < $DEVPATH/../chpids
read PIM PAM POM 2> /dev/null < $DEVPATH/../pimpampom
read ESE 2> /dev/null < $DEVPATH/ese
read EXTSZ 2> /dev/null < $DEVPATH/extent_pool/extent_size
read CAPACITY 2> /dev/null < $DEVPATH/capacity/logical_capacity
read ALLOCATED 2> /dev/null < $DEVPATH/capacity/space_allocated
# convert to hexadecimal values
PIM=0x$PIM
@@ -550,7 +559,11 @@ function extended()
COLON=":"
fi
printf "%s:%s:%s/%s/%s%s%s# status:\t\t\t\t%s# type: \t\t\t\t%s# blksz:\t\t\t\t%s# size: \t\t\t\t%s# blocks:\t\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s# uid: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s#\n" \
if [[ "$ESE" == 1 ]]; then
DISCIPLINE="${DISCIPLINE} (ESE)"
fi
printf "%s:%s:%s/%s/%s%s%s# status:\t\t\t\t%s# type: \t\t\t\t%s# blksz:\t\t\t\t%s# size: \t\t\t\t%s# blocks:\t\t\t\t%s# extent_size:\t\t\t\t%s# logical_capacity:\t\t\t%s# space_allocated:\t\t\t%s# use_diag:\t\t\t\t%s# readonly:\t\t\t\t%s# eer_enabled:\t\t\t\t%s# erplog:\t\t\t\t%s# hpf:\t\t\t\t\t%s# uid: \t\t\t\t%s# paths_installed: \t\t\t%s %s %s %s %s %s %s %s# paths_in_use: \t\t\t%s %s %s %s %s %s %s %s# paths_non_preferred: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_cabling: \t\t%s %s %s %s %s %s %s %s# paths_cuir_quiesced: \t\t\t%s %s %s %s %s %s %s %s# paths_invalid_hpf_characteristics: \t%s %s %s %s %s %s %s %s# paths_error_threshold_exceeded: \t%s %s %s %s %s %s %s %s#\n" \
"$SORTKEYLEN" "$SORTKEY" \
"$BUSID" \
"$BLOCKNAME" \
@@ -562,6 +575,9 @@ function extended()
"$SSIZE" \
"$MBSIZE" \
"$BLOCKCOUNT" \
"$EXTSZ" \
"$CAPACITY" \
"$ALLOCATED" \
"$DIAG" \
"$READONLY" \
"$EER" \
@@ -787,10 +803,10 @@ fi
if [[ "$PRINTUID" == "true" ]] && [[ "$OUTPUT" != "old" ]]; then
printf "Bus-ID Name UID\n"
printf "==============================================================================\n"
printf "================================================================================\n"
elif [[ "$OUTPUT" == "new" ]]; then
printf "Bus-ID Status Name Device Type BlkSz Size Blocks\n"
printf "==============================================================================\n"
printf "Bus-ID Status Name Device Type BlkSz Size Blocks\n"
printf "================================================================================\n"
elif [[ "$OUTPUT" == "extended" ]]; then
PROCESSING=" $PROCESSING | sed 's/#/\n/g' "
fi

View File

@@ -345,6 +345,7 @@ static exit_code_t udev_read_zfcp_lun_rule(const char *filename,
in_fc,
in_scsi,
} state = none;
bool empty_rule = true;
rc = udev_read_file(filename, &file);
if (rc)
@@ -374,16 +375,22 @@ static exit_code_t udev_read_zfcp_lun_rule(const char *filename,
state = in_scsi;
node = zfcp_lun_node_from_entry(entry, node,
list);
if (node)
empty_rule = false;
}
break;
case in_fc:
node = zfcp_lun_node_from_entry(entry, node, list);
if (node)
if (node) {
add_fc_setting_from_entry(entry, node);
empty_rule = false;
}
break;
case in_scsi:
if (node)
if (node) {
add_scsi_setting_from_entry(entry, node);
empty_rule = false;
}
break;
}
}
@@ -393,7 +400,7 @@ static exit_code_t udev_read_zfcp_lun_rule(const char *filename,
out:
udev_free_file(file);
if (!node)
if (empty_rule)
warn_once("Warning: Invalid udev rule: %s\n", filename);
return rc;

View File

@@ -47,7 +47,7 @@
#define DEFAULTBOOT_SECTION "defaultboot"
#define ZIPL_CONF_VAR "ZIPLCONF"
#define ZIPL_DEFAULT_CONF "/etc/zipl.conf"
#define ZIPL_DEFAULT_CONF TOOLS_SYSCONFDIR "/zipl.conf"
#define ZIPL_DEFAULT_BLSDIR "/boot/loader/entries"
#define ZIPL_STAGE3_PATH TOOLS_LIBDIR "/stage3.bin"
#define ZIPL_SIPL_PATH "/sys/firmware/ipl/has_secure"

View File

@@ -198,8 +198,8 @@ disk_get_info(const char* device, struct job_target_data* target,
long devsize;
FILE *fh;
char *script_pre = TOOLS_LIBDIR "/zipl_helper.";
char *script_file;
char *ppn_cmd;
char *script_file = NULL;
char *ppn_cmd = NULL;
char buffer[80];
char value[40];
int majnum, minnum;
@@ -443,10 +443,12 @@ type_determined:
data->fs_block_size = -1;
close(fd);
*info = data;
free(script_file);
return 0;
out_close:
close(fd);
free(ppn_cmd);
free(script_file);
free(data);
return -1;

View File

@@ -114,7 +114,7 @@ get_command_line(int argc, char* argv[], struct command_line* line)
break;
case 'D':
error_reason("dumptofs has been deprecated, use "
"--dump instead");
"--dumpto instead");
rc = -1;
break;
case 'M':
@@ -559,7 +559,7 @@ get_dump_components(struct job_dump_data *dump,
/* Fill in component data */
num = 0;
rc = set_cl_element(&cl[num++], "kernel image", dump->image,
&dump->image_addr, 0, 0x10000,
&dump->image_addr, 0, 0x0,
MAXIMUM_PHYSICAL_BLOCKSIZE);
if (rc)
goto error;
@@ -1880,6 +1880,7 @@ job_get(int argc, char* argv[], struct job_data** data)
job->add_files = cmdline.add_files;
job->data.mvdump.force = cmdline.force;
job->dry_run = cmdline.dry_run;
job->is_secure = SECURE_BOOT_AUTO;
/* Get job data from user input */
if (cmdline.help) {
job->command_line = 1;

View File

@@ -1617,7 +1617,8 @@ static int _keystore_create_info_file(struct keystore *keystore,
rc = -EINVAL;
goto out;
}
rc = properties_set(key_props, PROP_NAME_VOLUME_TYPE, volume_type);
rc = properties_set2(key_props, PROP_NAME_VOLUME_TYPE, volume_type,
true);
if (rc != 0) {
warnx("Invalid characters in volume-type");
goto out;
@@ -1989,8 +1990,8 @@ int keystore_change_key(struct keystore *keystore, const char *name,
goto out;
}
rc = properties_set(key_props, PROP_NAME_VOLUME_TYPE,
volume_type);
rc = properties_set2(key_props, PROP_NAME_VOLUME_TYPE,
volume_type, true);
if (rc != 0) {
warnx("Invalid characters in volume-type");
goto out;
@@ -3071,7 +3072,8 @@ static int _keystore_prompt_for_remove(struct keystore *keystore,
_keystore_msg_for_volumes(msg, key_prop, VOLUME_TYPE_PLAIN);
free(msg);
printf("%s: Remove key '%s'? ", program_invocation_short_name, name);
printf("%s: Remove key '%s' [y/N]? ", program_invocation_short_name,
name);
if (fgets(str, sizeof(str), stdin) == NULL) {
rc = -EIO;
goto out;
@@ -3080,6 +3082,7 @@ static int _keystore_prompt_for_remove(struct keystore *keystore,
str[strlen(str) - 1] = '\0';
pr_verbose(keystore, "Prompt reply: '%s'", str);
if (strcasecmp(str, "y") != 0 && strcasecmp(str, "yes") != 0) {
warnx("Operation aborted");
rc = -ECANCELED;
goto out;
}

View File

@@ -9,6 +9,7 @@
* it under the terms of the MIT license. See LICENSE for details.
*/
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -183,14 +184,16 @@ static struct property *properties_find(struct properties *properties,
* @param[in] properties the properties object
* @param[in] name the name of the property
* @param[in] value the value of the property
* @param[in] uppercase if true the value is set all uppercase
*
* @returns 0 on success,
* -EINVAL if the name or value contains invalid characters
*/
int properties_set(struct properties *properties,
const char *name, const char *value)
int properties_set2(struct properties *properties,
const char *name, const char *value, bool uppercase)
{
struct property *property;
int i;
util_assert(properties != NULL, "Internal error: properties is NULL");
util_assert(name != NULL, "Internal error: name is NULL");
@@ -211,9 +214,30 @@ int properties_set(struct properties *properties,
property->value = util_strdup(value);
util_list_add_tail(&properties->list, property);
}
if (uppercase) {
for (i = 0; property->value[i] != '\0'; i++)
property->value[i] = toupper(property->value[i]);
}
return 0;
}
/**
* Adds or updates a property
*
* @param[in] properties the properties object
* @param[in] name the name of the property
* @param[in] value the value of the property
*
* @returns 0 on success,
* -EINVAL if the name or value contains invalid characters
*/
int properties_set(struct properties *properties,
const char *name, const char *value)
{
return properties_set2(properties, name, value, false);
}
/**
* Gets a property
*

View File

@@ -23,6 +23,9 @@ void properties_free(struct properties *properties);
int properties_set(struct properties *properties,
const char *name, const char *value);
int properties_set2(struct properties *properties,
const char *name, const char *value, bool uppercase);
char *properties_get(struct properties *properties, const char *name);
int properties_remove(struct properties *properties, const char *name);

View File

@@ -1275,7 +1275,7 @@ static int activate_unbound_keyslot(int token, int keyslot, const char *key,
util_print_indented(complete_msg, 0);
util_print_indented("All key slots containing the old volume key are "
"now in unbound state. Do you want to remove "
"these key slots?", 0);
"these key slots [y/N]?", 0);
if (!prompt_for_yes())
return 0;
@@ -1524,7 +1524,7 @@ static int reencipher_prepare(int token)
util_asprintf(&msg, "Staged volume key re-enciphering is "
"already initiated for device '%s'. Do you want to "
"cancel the pending re-enciphering and start a "
"new re-enciphering process?", g.pos_arg);
"new re-enciphering process [y/N]?", g.pos_arg);
util_print_indented(msg, 0);
free(msg);
@@ -1690,7 +1690,7 @@ static int reencipher_complete(int token)
"was completed.\n"
"Do you want to re-encipher the secure key with "
"the CCA master key in the CURRENT master key "
"register?", g.pos_arg);
"register [y/N]?", g.pos_arg);
util_print_indented(msg, 0);
free(msg);
@@ -2014,12 +2014,13 @@ static int command_setkey(void)
util_asprintf(&msg, "The secure key in file '%s' is "
"enciphered with the CCA master key in the OLD "
"master key register. Do you want to set this "
"key as the new volume key anyway?",
"key as the new volume key anyway [y/N]?",
g.master_key_file);
util_print_indented(msg, 0);
free(msg);
if (!prompt_for_yes()) {
warnx("Device '%s' is left unchanged", g.pos_arg);
rc = -EINVAL;
goto out;
}
@@ -2078,12 +2079,13 @@ static int command_setkey(void)
"be correct. You will lose all data on the "
"volume if you set the wrong volume key!\n"
"Are you sure that the key in file '%s' is the "
"correct volume key for volume '%s'?",
"correct volume key for volume '%s' [y/N]?",
g.master_key_file, g.pos_arg);
util_print_indented(msg, 0);
free(msg);
if (!prompt_for_yes()) {
warnx("Device '%s' is left unchanged", g.pos_arg);
rc = -EINVAL;
goto out;
}

View File

@@ -832,7 +832,7 @@ static struct zkey_command zkey_commands[] = {
.need_pkey_device = 1,
.short_desc = "Validate an existing secure AES key",
.long_desc = "Validate an existing secure AES key that is "
"either contained in SECURE-KEY-FILE or is stored"
"either contained in SECURE-KEY-FILE or is stored "
"in the repository and print information about "
"the key",
.has_options = 1,