* [PATCH] block: Restore extboot functionality after mismerge
@ 2010-07-05 12:02 Stefan Hajnoczi
2010-07-05 12:40 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2010-07-05 12:02 UTC (permalink / raw)
To: kvm; +Cc: Avi Kivity, Markus Armbruster, Stefan Hajnoczi
Extboot if=virtio,boot=on is broken due to a mismerge of:
commit 666daa68234b5b1758652633cab07d5ca6046a5b
Author: Markus Armbruster <armbru@redhat.com>
Date: Wed Jun 2 18:48:27 2010 +0200
blockdev: Collect block device code in new blockdev.c
in:
commit 55cbee9e738bfe7434081967f884209f1a9c994c
Merge: a854beb 666daa6
Author: Avi Kivity <avi@redhat.com>
Date: Mon Jun 21 17:29:02 2010 +0300
Merge commit '666daa68234b5b1758652633cab07d5ca6046a5b' into
upstream-merge
The extboot_drive global is no longer being initialized in drive_init().
This patch restores the code to initialize extboot_drive.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
blockdev.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 90472a9..965a089 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -141,6 +141,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error)
int on_read_error, on_write_error;
const char *devaddr;
DriveInfo *dinfo;
+ int is_extboot = 0;
int snapshot = 0;
int ret;
@@ -302,6 +303,12 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error)
}
}
+ is_extboot = qemu_opt_get_bool(opts, "boot", 0);
+ if (is_extboot && extboot_drive) {
+ fprintf(stderr, "qemu: two bootable drives specified\n");
+ return NULL;
+ }
+
on_write_error = BLOCK_ERR_STOP_ENOSPC;
if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type != IF_NONE) {
@@ -412,6 +419,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error)
strncpy(dinfo->serial, serial, sizeof(dinfo->serial) - 1);
QTAILQ_INSERT_TAIL(&drives, dinfo, next);
+ if (is_extboot) {
+ extboot_drive = dinfo;
+ }
+
bdrv_set_on_error(dinfo->bdrv, on_read_error, on_write_error);
switch(type) {
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: Restore extboot functionality after mismerge
2010-07-05 12:02 [PATCH] block: Restore extboot functionality after mismerge Stefan Hajnoczi
@ 2010-07-05 12:40 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-07-05 12:40 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: kvm, Markus Armbruster
On 07/05/2010 03:02 PM, Stefan Hajnoczi wrote:
> Extboot if=virtio,boot=on is broken due to a mismerge of:
>
> commit 666daa68234b5b1758652633cab07d5ca6046a5b
> Author: Markus Armbruster<armbru@redhat.com>
> Date: Wed Jun 2 18:48:27 2010 +0200
>
> blockdev: Collect block device code in new blockdev.c
>
> in:
>
> commit 55cbee9e738bfe7434081967f884209f1a9c994c
> Merge: a854beb 666daa6
> Author: Avi Kivity<avi@redhat.com>
> Date: Mon Jun 21 17:29:02 2010 +0300
>
> Merge commit '666daa68234b5b1758652633cab07d5ca6046a5b' into
> upstream-merge
>
> The extboot_drive global is no longer being initialized in drive_init().
> This patch restores the code to initialize extboot_drive.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-05 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05 12:02 [PATCH] block: Restore extboot functionality after mismerge Stefan Hajnoczi
2010-07-05 12:40 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).