diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-08-10 18:17:49 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-08-10 18:17:49 +0000 |
commit | a2a075d4e32aef8220988e88782dda11751c1bae (patch) | |
tree | 531befb7786f9803adfb4f28b89e05d0f90bec0e /sbin/fdisk | |
parent | ef3078f29e31c0bfad1a0d704c56ba2450935cdd (diff) |
Go back to using Xwrite() during initialization phase to make
sure the same verbiage is emitted as previously. i.e. "Writing
MBR at offset 0". Fixes regress complaints.
Diffstat (limited to 'sbin/fdisk')
-rw-r--r-- | sbin/fdisk/fdisk.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 816f8f49857..fa045d261ad 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdisk.c,v 1.133 2021/08/07 17:48:31 krw Exp $ */ +/* $OpenBSD: fdisk.c,v 1.134 2021/08/10 18:17:48 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -32,6 +32,7 @@ #include "part.h" #include "disk.h" #include "mbr.h" +#include "cmd.h" #include "misc.h" #include "user.h" #include "gpt.h" @@ -168,20 +169,20 @@ main(int argc, char *argv[]) case INIT_GPT: GPT_init(GHANDGP); if (ask_yn("Do you wish to write new GPT?")) - GPT_write(); + Xwrite(NULL, &gmbr); break; case INIT_GPTPARTITIONS: if (GPT_read(ANYGPT)) errx(1, "-A requires a valid GPT"); GPT_init(GPONLY); if (ask_yn("Do you wish to write new GPT?")) - GPT_write(); + Xwrite(NULL, &gmbr); break; case INIT_MBR: mbr.mbr_lba_self = mbr.mbr_lba_firstembr = 0; MBR_init(&mbr); if (ask_yn("Do you wish to write new MBR?")) - MBR_write(&mbr); + Xwrite(NULL, &mbr); break; case INIT_MBRBOOTCODE: if (MBR_read(0, 0, &mbr)) @@ -189,7 +190,7 @@ main(int argc, char *argv[]) memcpy(mbr.mbr_code, default_dmbr.dmbr_boot, sizeof(mbr.mbr_code)); if (ask_yn("Do you wish to write new MBR?")) - MBR_write(&mbr); + Xwrite(NULL, &mbr); break; default: break; |