mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 22:23:08 +00:00
fdisk: Make confusing fdisk messages a little less ambiguous
We print an error when we can't read the MBR. Add minimal messages about continuing anyway. PR: 167036 Sponsored by: Netflix
This commit is contained in:
parent
1107834090
commit
2af5769e34
@ -380,7 +380,8 @@ main(int argc, char *argv[])
|
||||
printf("******* Working on device %s *******\n",disk);
|
||||
|
||||
if (I_flag) {
|
||||
read_s0();
|
||||
if (read_s0())
|
||||
warnx("Ignoring bad existing MBR.");
|
||||
reset_boot();
|
||||
partp = &mboot.parts[0];
|
||||
partp->dp_typ = DOSPTYP_386BSD;
|
||||
@ -410,8 +411,10 @@ main(int argc, char *argv[])
|
||||
else
|
||||
print_params();
|
||||
|
||||
if (read_s0())
|
||||
if (read_s0()) {
|
||||
printf("Will replace existing bad MBR\n");
|
||||
init_sector0(dos_sectors);
|
||||
}
|
||||
|
||||
printf("Media sector size is %d\n", secsize);
|
||||
printf("Warning: BIOS sector numbering starts with sector 1\n");
|
||||
|
Loading…
Reference in New Issue
Block a user