zipl: add ldipl-dump option

CCW and LD-IPL records cannot be used at the same time for dumps because
CCW dump uses the standalone dumper, while LD-IPL uses ngdump. The first
one writes data to the raw disk without any filesystem, while the second
one uses an ext filesystem. Therefore we need a way to tell zipl which
kind of dumper it should install, as both cannot be installed at the
same time. The device given is the same for both types, so we cannot use
this to decide which type to install. Therefore add a '--ldipl-dump' option
so the user can decide which type of dump to use.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Eduard Shishkin <edward6@linux.ibm.com>
Acked-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Sven Schnelle
2023-01-17 14:13:20 +00:00
committed by Steffen Eiden
parent ee4f503ec0
commit f5aa1d4406
4 changed files with 12 additions and 0 deletions

View File

@@ -128,6 +128,7 @@ struct job_data {
int dry_run;
int command_line;
int is_secure;
int is_ldipl_dump;
};

View File

@@ -281,6 +281,10 @@ or configuration section on the command line at the same time.
.BR "\-D" " or " "\-\-dumptofs"
This option has been removed, use --dumpto instead.
.TP
.BR "\-\-ldipl-dump"
Install a List-directed dump record instead of a CCW-type dump.
.TP
.BR "\-M <DUMPLIST[,SIZE]>" " or " "--mvdump=<DUMPLIST[,SIZE]>"
Install a multi-volume dump record on each device associated with one of the

View File

@@ -63,6 +63,7 @@ static struct option options[] = {
{ "dry-run", no_argument, NULL, '0'},
{ "force", no_argument, NULL, 'f'},
{ "kdump", required_argument, NULL, 'k'},
{ "ldipl-dump", no_argument, NULL, 0xb0},
{ "secure", required_argument, NULL, 'S'},
{ NULL, 0, NULL, 0 }
};
@@ -93,6 +94,7 @@ struct command_line {
int dry_run;
int force;
int is_secure;
int is_ldipl_dump;
enum scan_section_type type;
};
@@ -284,6 +286,9 @@ get_command_line(int argc, char* argv[], struct command_line* line)
case 'f':
cmdline.force = 1;
break;
case 0xb0:
cmdline.is_ldipl_dump = 1;
break;
case 1:
/* Non-option is interpreted as section name */
if (cmdline.section != NULL) {
@@ -1978,6 +1983,7 @@ job_get(int argc, char* argv[], struct job_data** data)
job->data.mvdump.force = cmdline.force;
job->dry_run = cmdline.dry_run;
job->is_secure = SECURE_BOOT_UNDEFINED;
job->is_ldipl_dump = cmdline.is_ldipl_dump;
if (job->verbose)
printf("Looking for components in '%s'\n", util_libdir());

View File

@@ -72,6 +72,7 @@ static const char* usage_text[] = {
" stand-alone dump tool",
"-d, --dumpto DUMPDEV[,SIZE] Install a system dump record on tape device",
" or disk partition DUMPDEV",
" --ldipl-dump Install a List-directed dump",
"-M, --mvdump DEVLIST[,SIZE] Install a multi-volume dump record on each",
" disk partition listed in file DEVLIST",
"-f, --force Disable sanity check while producing a",