choosing MBR partitioning.
-/* $OpenBSD: cmd.c,v 1.99 2021/01/30 18:16:36 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.100 2021/05/02 20:07:14 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
GPT_init();
GPT_print("s", 0);
} else {
+ memset(&gh, 0, sizeof(gh));
MBR_init(mbr);
MBR_print(mbr, "s");
}
warn("error writing GPT");
return (CMD_CONT);
}
- } else if (reinited) {
- /* Make sure GPT doesn't get in the way. */
+ } else {
+ /* Ensure any on-disk GPT headers are zeroed. */
MBR_zapgpt(&dos_mbr, DL_GETDSIZE(&dl) - 1);
}
-/* $OpenBSD: fdisk.c,v 1.103 2018/04/26 15:55:14 guenther Exp $ */
+/* $OpenBSD: fdisk.c,v 1.104 2021/05/02 20:07:14 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
GPT_init();
query = "Do you wish to write new GPT?";
} else {
+ memset(&gh, 0, sizeof(gh));
MBR_init(&initial_mbr);
query = "Do you wish to write new MBR and "
"partition table?";