diff --git a/zipl/src/install.c b/zipl/src/install.c index 5e1c615d..ff05369d 100644 --- a/zipl/src/install.c +++ b/zipl/src/install.c @@ -552,6 +552,9 @@ ask_for_confirmation(const char* fmt, ...) /* Always assume positive answer in non-interactive mode */ if (!interactive) return 0; + if (dry_run) + /* nothing to confirm */ + return 0; /* Print question */ va_start(args, fmt); vprintf(fmt, args); @@ -1169,8 +1172,7 @@ install_dump(const char *device, struct job_target_data *target, uint64_t mem, disk_free_info(info); return -1; } - mfd.fd = open(tempdev, O_RDWR); - if (mfd.fd == -1) { + if (misc_open_device(tempdev, &mfd, dry_run) == -1) { error_text("Could not open temporary device node '%s'", tempdev); misc_free_temp_dev(tempdev); diff --git a/zipl/src/zipl.c b/zipl/src/zipl.c index 0f2345cd..2e0f1678 100644 --- a/zipl/src/zipl.c +++ b/zipl/src/zipl.c @@ -181,11 +181,6 @@ 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;