From 9be41f5f559badb70e93fdeb699782181eaf1ca2 Mon Sep 17 00:00:00 2001 From: Christophe Bothamy Date: Thu, 17 Oct 2002 07:04:45 +0000 Subject: [PATCH] - add check forbiding block devices if --enable-split-hd --- bochs/iodev/harddrv.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bochs/iodev/harddrv.cc b/bochs/iodev/harddrv.cc index c5b52cb18..2bb419c03 100644 --- a/bochs/iodev/harddrv.cc +++ b/bochs/iodev/harddrv.cc @@ -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. @@ -162,7 +162,7 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos) char string[5]; 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; channelget() == 1) { @@ -3103,6 +3103,10 @@ int concat_image_t::open (const char* pathname0) if (ret) { 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) { BX_PANIC(("size of disk image must be multiple of 512 bytes")); }