- fixed upper limit of hard disk size. the limit is cylinders<65536.
This commit is contained in:
parent
a6dd514493
commit
ee4897e645
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* misc/bximage.c
|
||||
* $Id: bximage.c,v 1.1 2001-06-01 04:20:26 bdenney Exp $
|
||||
* $Id: bximage.c,v 1.2 2001-06-01 04:24:12 bdenney Exp $
|
||||
*
|
||||
* Create empty hard disk or floppy disk images for bochs.
|
||||
*
|
||||
@ -12,7 +12,7 @@
|
||||
#include "config.h"
|
||||
|
||||
char *EOF_ERR = "ERROR: End of input";
|
||||
char *rcsid = "$Revision: 1.1 $, modified $Date: 2001-06-01 04:20:26 $";
|
||||
char *rcsid = "$Revision: 1.2 $, modified $Date: 2001-06-01 04:24:12 $";
|
||||
char *divider = "========================================================================";
|
||||
|
||||
/* menu data for choosing floppy/hard disk */
|
||||
@ -242,9 +242,10 @@ int main()
|
||||
fatal (EOF_ERR);
|
||||
if (hd) {
|
||||
int hdsize, cyl, heads=16, spt=63;
|
||||
if (ask_int ("\nEnter the hard disk size in megabytes, between 1 and 65535\n[10] ", 1, 65535, 10, &hdsize) < 0)
|
||||
if (ask_int ("\nEnter the hard disk size in megabytes, between 1 and 32255\n[10] ", 1, 32255, 10, &hdsize) < 0)
|
||||
fatal (EOF_ERR);
|
||||
cyl = hdsize*1024*1024/16/63/512;
|
||||
assert (cyl < 65536);
|
||||
sectors = cyl*heads*spt;
|
||||
printf ("\nI will create a hard disk image with\n");
|
||||
printf (" cyl=%d\n", cyl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user