- add check forbiding block devices if --enable-split-hd
This commit is contained in:
parent
58ab9c64e4
commit
9be41f5f55
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: harddrv.cc,v 1.80 2002-10-06 20:19:03 vruppert Exp $
|
// $Id: harddrv.cc,v 1.81 2002-10-17 07:04:45 cbothamy Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||||
@ -162,7 +162,7 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
|||||||
char string[5];
|
char string[5];
|
||||||
|
|
||||||
BX_HD_THIS devices = d;
|
BX_HD_THIS devices = d;
|
||||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.80 2002-10-06 20:19:03 vruppert Exp $"));
|
BX_DEBUG(("Init $Id: harddrv.cc,v 1.81 2002-10-17 07:04:45 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) {
|
||||||
@ -3103,6 +3103,10 @@ int concat_image_t::open (const char* pathname0)
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
BX_PANIC(("fstat() returns error!"));
|
BX_PANIC(("fstat() returns error!"));
|
||||||
}
|
}
|
||||||
|
if (S_ISBLK(stat_buf.st_mode)) {
|
||||||
|
BX_PANIC(("block devices should REALLY NOT be used with --enable-split-hd. "
|
||||||
|
"Please reconfigure with --disable-split-hd"));
|
||||||
|
}
|
||||||
if ((stat_buf.st_size % 512) != 0) {
|
if ((stat_buf.st_size % 512) != 0) {
|
||||||
BX_PANIC(("size of disk image must be multiple of 512 bytes"));
|
BX_PANIC(("size of disk image must be multiple of 512 bytes"));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user