diff --git a/zipl/src/bootmap.c b/zipl/src/bootmap.c index f4aec693..7d340156 100644 --- a/zipl/src/bootmap.c +++ b/zipl/src/bootmap.c @@ -1442,30 +1442,18 @@ static int prepare_build_program_table_device(struct job_data *job, if (bis->skip_prepare) /* skip the preparation work */ return 0; + if (dry_run) { + error_text("Option '--dry-run' is not implemented for this type of dump"); + return -1; + } /* Get full path of bootmap file */ - if (!dry_run) { - bis->filename = misc_strdup(job->data.dump.device); - if (!bis->filename) - return -1; - bis->fd = misc_open_exclusive(bis->filename); - if (bis->fd == -1) { - error_text("Could not open file '%s'", bis->filename); - return -1; - } - } else { - bis->filename = misc_make_path(job->target.bootmap_dir, - BOOTMAP_TEMPLATE_FILENAME); - if (!bis->filename) - return -1; - /* Create temporary bootmap file */ - bis->fd = mkstemp(bis->filename); - if (bis->fd == -1) { - error_reason(strerror(errno)); - error_text("Could not create file '%s':", - bis->filename); - return -1; - } - bis->tmp_filename_created = 1; + bis->filename = misc_strdup(job->data.dump.device); + if (!bis->filename) + return -1; + bis->fd = misc_open_exclusive(bis->filename); + if (bis->fd == -1) { + error_text("Could not open file '%s'", bis->filename); + return -1; } /* Retrieve target device information */ if (disk_get_info(bis->filename, &job->target, &bis->info)) diff --git a/zipl/src/zipl.c b/zipl/src/zipl.c index 2e0f1678..0f2345cd 100644 --- a/zipl/src/zipl.c +++ b/zipl/src/zipl.c @@ -181,6 +181,11 @@ main(int argc, char* argv[]) if (!job_dump_is_ngdump(job) && (disk_is_tape(job->data.dump.device) || !disk_type_is_scsi(&ext_type))) { + if (dry_run) { + error_text("Option '--dry-run' is not implemented for this type of dump"); + rc = -1; + break; + } rc = install_dump(job->data.dump.device, &job->target, job->data.dump.mem, job->data.dump.no_compress); break;