Oops - last change could lead to crashes - when not asking for a geometry,
use the default one.
This commit is contained in:
parent
0748c0df89
commit
a08b65f1f7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.125 2010/04/19 20:35:23 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.126 2010/04/19 21:12:52 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -510,8 +510,13 @@ nogeom:
|
|||
}
|
||||
}
|
||||
if (biosdisk == NULL) {
|
||||
if (nip != NULL)
|
||||
if (nip != NULL) {
|
||||
set_bios_geom(cyl, head, sec);
|
||||
} else {
|
||||
bcyl = cyl;
|
||||
bhead = head;
|
||||
bsec = sec;
|
||||
}
|
||||
} else {
|
||||
bcyl = biosdisk->bi_cyl;
|
||||
bhead = biosdisk->bi_head;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mbr.c,v 1.84 2010/04/19 19:22:41 martin Exp $ */
|
||||
/* $NetBSD: mbr.c,v 1.85 2010/04/19 21:12:51 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -1299,10 +1299,6 @@ edit_mbr(mbr_info_t *mbri)
|
|||
return(md_mbr_use_wholedisk(mbri));
|
||||
}
|
||||
|
||||
/* Default to MB, and use bios geometry for cylinder size */
|
||||
set_sizemultname_meg();
|
||||
current_cylsize = bhead * bsec;
|
||||
|
||||
mbr_menu = new_menu(NULL, NULL, 16, 0, -1, 15, 70,
|
||||
MC_NOBOX | MC_ALWAYS_SCROLL | MC_NOCLEAR,
|
||||
set_mbr_header, set_mbr_label, NULL,
|
||||
|
@ -1310,6 +1306,10 @@ edit_mbr(mbr_info_t *mbri)
|
|||
if (mbr_menu == -1)
|
||||
return 0;
|
||||
|
||||
/* Default to MB, and use bios geometry for cylinder size */
|
||||
set_sizemultname_meg();
|
||||
current_cylsize = bhead * bsec;
|
||||
|
||||
for (;;) {
|
||||
ptstart = 0;
|
||||
ptsize = 0;
|
||||
|
|
Loading…
Reference in New Issue