- change disk image mode name "growable" to the more accurate "growing"

This commit is contained in:
Christophe Bothamy 2003-08-01 01:20:00 +00:00
parent 1f48fc3178
commit 974d3538a1
8 changed files with 39 additions and 40 deletions

View File

@ -173,7 +173,7 @@ ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x368, irq=9
# This defines the type and characteristics of all attached ata devices: # This defines the type and characteristics of all attached ata devices:
# type= type of attached device [disk|cdrom] # type= type of attached device [disk|cdrom]
# mode= only valid for disks [flat|concat|external|dll|sparse|vmware3] # mode= only valid for disks [flat|concat|external|dll|sparse|vmware3]
# mode= only valid for disks [undoable|growable|volatile|z-undoable|z-volatile] # mode= only valid for disks [undoable|growing|volatile|z-undoable|z-volatile]
# path= path of the image # path= path of the image
# cylinders= only valid for disks # cylinders= only valid for disks
# heads= only valid for disks # heads= only valid for disks

View File

@ -187,7 +187,7 @@ Examples:
This defines the type and characteristics of all attached ata devices: This defines the type and characteristics of all attached ata devices:
type= type of attached device [disk|cdrom] type= type of attached device [disk|cdrom]
path= path of the image path= path of the image
mode= image mode [flat|concat|external|dll|sparse|vmware3|undoable|growable|volatile|z-undoable|z-volatile], only valid for disks mode= image mode [flat|concat|external|dll|sparse|vmware3|undoable|growing|volatile|z-undoable|z-volatile], only valid for disks
cylinders= only valid for disks cylinders= only valid for disks
heads= only valid for disks heads= only valid for disks
spt= only valid for disks spt= only valid for disks
@ -216,7 +216,7 @@ The mode option defines how the disk image is handled. Disks can be defined as:
- sparse : stackable, commitable, rollbackable - sparse : stackable, commitable, rollbackable
- vmware3 : vmware3 disk support - vmware3 : vmware3 disk support
- undoable : flat file with commitable redolog - undoable : flat file with commitable redolog
- growable : growing file - growing : growing file
- volatile : flat file with volatile redolog - volatile : flat file with volatile redolog
- z-undoable : gziped flat file with commitable redolog - z-undoable : gziped flat file with commitable redolog
- z-volatile : gziped flat file with volatile redolog - z-volatile : gziped flat file with volatile redolog

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: siminterface.cc,v 1.96 2003-06-07 19:16:53 vruppert Exp $ // $Id: siminterface.cc,v 1.97 2003-08-01 01:20:00 cbothamy Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// See siminterface.h for description of the siminterface concept. // See siminterface.h for description of the siminterface concept.
@ -451,7 +451,7 @@ int n_keyboard_type_names = 3;
char *atadevice_type_names[] = { "disk", "cdrom", NULL }; char *atadevice_type_names[] = { "disk", "cdrom", NULL };
int n_atadevice_type_names = 2; int n_atadevice_type_names = 2;
char *atadevice_mode_names[] = { "flat", "concat", "external", "dll", "sparse", "vmware3", "split", "undoable", "growable", "volatile", "z-undoable", "z-volatile", NULL }; char *atadevice_mode_names[] = { "flat", "concat", "external", "dll", "sparse", "vmware3", "split", "undoable", "growing", "volatile", "z-undoable", "z-volatile", NULL };
int n_atadevice_mode_names = 12; int n_atadevice_mode_names = 12;
char *atadevice_status_names[] = { "ejected", "inserted", NULL }; char *atadevice_status_names[] = { "ejected", "inserted", NULL };
int n_atadevice_status_names = 2; int n_atadevice_status_names = 2;

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: siminterface.h,v 1.101 2003-05-27 18:19:13 vruppert Exp $ // $Id: siminterface.h,v 1.102 2003-08-01 01:20:00 cbothamy Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Before I can describe what this file is for, I have to make the // Before I can describe what this file is for, I have to make the
@ -1133,7 +1133,7 @@ enum {
#define BX_ATA_MODE_VMWARE3 5 #define BX_ATA_MODE_VMWARE3 5
#define BX_ATA_MODE_SPLIT 6 #define BX_ATA_MODE_SPLIT 6
#define BX_ATA_MODE_UNDOABLE 7 #define BX_ATA_MODE_UNDOABLE 7
#define BX_ATA_MODE_GROWABLE 8 #define BX_ATA_MODE_GROWING 8
#define BX_ATA_MODE_VOLATILE 9 #define BX_ATA_MODE_VOLATILE 9
#define BX_ATA_MODE_Z_UNDOABLE 10 #define BX_ATA_MODE_Z_UNDOABLE 10
#define BX_ATA_MODE_Z_VOLATILE 11 #define BX_ATA_MODE_Z_VOLATILE 11

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: harddrv.cc,v 1.105 2003-07-31 19:51:42 vruppert Exp $ // $Id: harddrv.cc,v 1.106 2003-08-01 01:20:00 cbothamy Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2002 MandrakeSoft S.A. // Copyright (C) 2002 MandrakeSoft S.A.
@ -159,7 +159,7 @@ bx_hard_drive_c::init(void)
Bit8u channel; Bit8u channel;
char string[5]; char string[5];
BX_DEBUG(("Init $Id: harddrv.cc,v 1.105 2003-07-31 19:51:42 vruppert Exp $")); BX_DEBUG(("Init $Id: harddrv.cc,v 1.106 2003-08-01 01:20:00 cbothamy Exp $"));
for (channel=0; channel<BX_MAX_ATA_CHANNEL; channel++) { for (channel=0; channel<BX_MAX_ATA_CHANNEL; channel++) {
if (bx_options.ata[channel].Opresent->get() == 1) { if (bx_options.ata[channel].Opresent->get() == 1) {
@ -300,10 +300,10 @@ bx_hard_drive_c::init(void)
channels[channel].drives[device].hard_drive = new undoable_image_t(disk_size); channels[channel].drives[device].hard_drive = new undoable_image_t(disk_size);
break; break;
case BX_ATA_MODE_GROWABLE: case BX_ATA_MODE_GROWING:
BX_INFO(("HD on ata%d-%d: '%s' 'growable' mode ", channel, device, BX_INFO(("HD on ata%d-%d: '%s' 'growing' mode ", channel, device,
bx_options.atadevice[channel][device].Opath->getptr ())); bx_options.atadevice[channel][device].Opath->getptr ()));
channels[channel].drives[device].hard_drive = new growable_image_t(disk_size); channels[channel].drives[device].hard_drive = new growing_image_t(disk_size);
break; break;
case BX_ATA_MODE_VOLATILE: case BX_ATA_MODE_VOLATILE:
@ -4049,6 +4049,7 @@ redolog_t::make_header (const char* type, Bit64u size)
{ {
Bit32u entries, extent_size, bitmap_size; Bit32u entries, extent_size, bitmap_size;
Bit64u maxsize; Bit64u maxsize;
Bit32u flip=0;
// Set standard header values // Set standard header values
strcpy((char*)header.standard.magic, STANDARD_HEADER_MAGIC); strcpy((char*)header.standard.magic, STANDARD_HEADER_MAGIC);
@ -4062,8 +4063,6 @@ redolog_t::make_header (const char* type, Bit64u size)
// Compute #entries and extent size values // Compute #entries and extent size values
do { do {
static Bit32u flip=0;
extent_size = 8 * bitmap_size * 512; extent_size = 8 * bitmap_size * 512;
header.specific.catalog = htod32(entries); header.specific.catalog = htod32(entries);
@ -4406,37 +4405,37 @@ redolog_t::write (const void* buf, size_t count)
} }
/*** growable_image_t function definitions ***/ /*** growing_image_t function definitions ***/
growable_image_t::growable_image_t(Bit64u _size) growing_image_t::growing_image_t(Bit64u _size)
{ {
redolog = new redolog_t(); redolog = new redolog_t();
size = _size; size = _size;
} }
int growable_image_t::open (const char* pathname) int growing_image_t::open (const char* pathname)
{ {
return redolog->open(pathname,REDOLOG_SUBTYPE_GROWABLE,size); return redolog->open(pathname,REDOLOG_SUBTYPE_GROWING,size);
} }
void growable_image_t::close () void growing_image_t::close ()
{ {
redolog->close(); redolog->close();
} }
off_t growable_image_t::lseek (off_t offset, int whence) off_t growing_image_t::lseek (off_t offset, int whence)
{ {
return redolog->lseek(offset, whence); return redolog->lseek(offset, whence);
} }
ssize_t growable_image_t::read (void* buf, size_t count) ssize_t growing_image_t::read (void* buf, size_t count)
{ {
memset(buf, 0, count); memset(buf, 0, count);
redolog->read((char*) buf, count); redolog->read((char*) buf, count);
return count; return count;
} }
ssize_t growable_image_t::write (const void* buf, size_t count) ssize_t growing_image_t::write (const void* buf, size_t count)
{ {
return redolog->write((char*) buf, count); return redolog->write((char*) buf, count);
} }

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: harddrv.h,v 1.20 2003-05-03 16:37:17 cbothamy Exp $ // $Id: harddrv.h,v 1.21 2003-08-01 01:20:00 cbothamy Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2002 MandrakeSoft S.A. // Copyright (C) 2002 MandrakeSoft S.A.
@ -58,7 +58,7 @@
#define REDOLOG_TYPE "Redolog" #define REDOLOG_TYPE "Redolog"
#define REDOLOG_SUBTYPE_UNDOABLE "Undoable" #define REDOLOG_SUBTYPE_UNDOABLE "Undoable"
#define REDOLOG_SUBTYPE_VOLATILE "Volatile" #define REDOLOG_SUBTYPE_VOLATILE "Volatile"
#define REDOLOG_SUBTYPE_GROWABLE "Growable" #define REDOLOG_SUBTYPE_GROWING "Growing"
// #define REDOLOG_SUBTYPE_Z_UNDOABLE "z-Undoable" // #define REDOLOG_SUBTYPE_Z_UNDOABLE "z-Undoable"
// #define REDOLOG_SUBTYPE_Z_VOLATILE "z-Volatile" // #define REDOLOG_SUBTYPE_Z_VOLATILE "z-Volatile"
@ -351,12 +351,12 @@ class redolog_t
Bit32u extent_blocs; Bit32u extent_blocs;
}; };
// GROWABLE MODE // GROWING MODE
class growable_image_t : public device_image_t class growing_image_t : public device_image_t
{ {
public: public:
// Contructor // Contructor
growable_image_t(Bit64u size); growing_image_t(Bit64u size);
// Open a image. Returns non-negative if successful. // Open a image. Returns non-negative if successful.
int open (const char* pathname); int open (const char* pathname);

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: main.cc,v 1.230 2003-07-15 21:02:05 vruppert Exp $ // $Id: main.cc,v 1.231 2003-08-01 01:20:00 cbothamy Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2002 MandrakeSoft S.A. // Copyright (C) 2002 MandrakeSoft S.A.
@ -2842,8 +2842,8 @@ parse_line_formatted(char *context, int num_params, char *params[])
else if (!strcmp(params[i], "mode=undoable")) { else if (!strcmp(params[i], "mode=undoable")) {
bx_options.atadevice[channel][slave].Omode->set (BX_ATA_MODE_UNDOABLE); bx_options.atadevice[channel][slave].Omode->set (BX_ATA_MODE_UNDOABLE);
} }
else if (!strcmp(params[i], "mode=growable")) { else if (!strcmp(params[i], "mode=growing")) {
bx_options.atadevice[channel][slave].Omode->set (BX_ATA_MODE_GROWABLE); bx_options.atadevice[channel][slave].Omode->set (BX_ATA_MODE_GROWING);
} }
else if (!strcmp(params[i], "mode=volatile")) { else if (!strcmp(params[i], "mode=volatile")) {
bx_options.atadevice[channel][slave].Omode->set (BX_ATA_MODE_VOLATILE); bx_options.atadevice[channel][slave].Omode->set (BX_ATA_MODE_VOLATILE);
@ -3786,8 +3786,8 @@ bx_write_atadevice_options (FILE *fp, Bit8u channel, Bit8u drive, bx_atadevice_o
case BX_ATA_MODE_UNDOABLE: case BX_ATA_MODE_UNDOABLE:
fprintf (fp, ", mode=undoable"); fprintf (fp, ", mode=undoable");
break; break;
case BX_ATA_MODE_GROWABLE: case BX_ATA_MODE_GROWING:
fprintf (fp, ", mode=growable"); fprintf (fp, ", mode=growing");
break; break;
case BX_ATA_MODE_VOLATILE: case BX_ATA_MODE_VOLATILE:
fprintf (fp, ", mode=volatile"); fprintf (fp, ", mode=volatile");

View File

@ -1,6 +1,6 @@
/* /*
* misc/bximage.c * misc/bximage.c
* $Id: bximage.c,v 1.18 2003-05-03 16:37:18 cbothamy Exp $ * $Id: bximage.c,v 1.19 2003-08-01 01:20:00 cbothamy Exp $
* *
* Create empty hard disk or floppy disk images for bochs. * Create empty hard disk or floppy disk images for bochs.
* *
@ -26,7 +26,7 @@
#include "../iodev/harddrv.h" #include "../iodev/harddrv.h"
char *EOF_ERR = "ERROR: End of input"; char *EOF_ERR = "ERROR: End of input";
char *rcsid = "$Id: bximage.c,v 1.18 2003-05-03 16:37:18 cbothamy Exp $"; char *rcsid = "$Id: bximage.c,v 1.19 2003-08-01 01:20:00 cbothamy Exp $";
char *divider = "========================================================================"; char *divider = "========================================================================";
/* menu data for choosing floppy/hard disk */ /* menu data for choosing floppy/hard disk */
@ -40,8 +40,8 @@ char *fdsize_choices[] = { "0.36","0.72","1.2","1.44","2.88" };
int fdsize_n_choices = 5; int fdsize_n_choices = 5;
/* menu data for choosing disk mode */ /* menu data for choosing disk mode */
char *hdmode_menu = "\nWhat kind of image should I create?\nPlease type flat, sparse or growable. "; char *hdmode_menu = "\nWhat kind of image should I create?\nPlease type flat, sparse or growing. ";
char *hdmode_choices[] = {"flat", "sparse", "growable" }; char *hdmode_choices[] = {"flat", "sparse", "growing" };
int hdmode_n_choices = 3; int hdmode_n_choices = 3;
void myexit (int code) void myexit (int code)
@ -338,14 +338,14 @@ int make_sparse_image(FILE *fp, Bit64u sec)
return 0; return 0;
} }
/* produce a growable image file */ /* produce a growing image file */
int make_growable_image(FILE *fp, Bit64u sec) int make_growing_image(FILE *fp, Bit64u sec)
{ {
redolog_header_t header; redolog_header_t header;
Bit32u i, not_allocated = htod32(REDOLOG_PAGE_NOT_ALLOCATED); Bit32u i, not_allocated = htod32(REDOLOG_PAGE_NOT_ALLOCATED);
memset(&header, 0, sizeof(header)); memset(&header, 0, sizeof(header));
make_redolog_header(&header, REDOLOG_SUBTYPE_GROWABLE, sec * 512); make_redolog_header(&header, REDOLOG_SUBTYPE_GROWING, sec * 512);
if (fwrite(&header, sizeof(header), 1, fp) != 1) if (fwrite(&header, sizeof(header), 1, fp) != 1)
{ {
@ -445,7 +445,7 @@ int main()
write_function=make_sparse_image; write_function=make_sparse_image;
break; break;
case 2: case 2:
write_function=make_growable_image; write_function=make_growing_image;
break; break;
default: default:
write_function=make_flat_image; write_function=make_flat_image;