aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-26 10:58:41 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-26 10:58:41 +0000
commit79639d423f779e65f24d0fcc05b14d6c45b4a894 (patch)
tree189d6b3736d7fe3a8069a3e702de298834526007 /block.c
parentARM CPU suspend/halt (Paul Brook) (diff)
downloadqemu-kvm-79639d423f779e65f24d0fcc05b14d6c45b4a894.tar.gz
qemu-kvm-79639d423f779e65f24d0fcc05b14d6c45b4a894.tar.bz2
qemu-kvm-79639d423f779e65f24d0fcc05b14d6c45b4a894.zip
update boot sector when using -kernel (Magnus Damm)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1664 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block.c b/block.c
index 077c27855..efd96e637 100644
--- a/block.c
+++ b/block.c
@@ -444,6 +444,9 @@ int bdrv_write(BlockDriverState *bs, int64_t sector_num,
return -1;
if (bs->read_only)
return -1;
+ if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) {
+ memcpy(bs->boot_sector_data, buf, 512);
+ }
return bs->drv->bdrv_write(bs, sector_num, buf, nb_sectors);
}