Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 305036 Details for
Bug 435062
QEMU driver does not support <bootloader> for use with Xenner guests
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Support bootloader for xenner
xen-bootloader (text/plain), 3.96 KB, created by
Daniel Berrangé
on 2008-05-10 17:26:47 UTC
(
hide
)
Description:
Support bootloader for xenner
Filename:
MIME Type:
Creator:
Daniel Berrangé
Created:
2008-05-10 17:26:47 UTC
Size:
3.96 KB
patch
obsolete
>diff -r 1f0c29e18039 src/qemu_conf.c >--- a/src/qemu_conf.c Sat May 10 13:00:03 2008 -0400 >+++ b/src/qemu_conf.c Sat May 10 13:18:34 2008 -0400 >@@ -1702,21 +1702,36 @@ > xmlXPathFreeObject(obj); > > >- /* Extract OS type info */ >- obj = xmlXPathEval(BAD_CAST "string(/domain/os/type[1])", ctxt); >- if ((obj == NULL) || (obj->type != XPATH_STRING) || >- (obj->stringval == NULL) || (obj->stringval[0] == 0)) { >- qemudReportError(conn, NULL, NULL, VIR_ERR_OS_TYPE, >- "%s", _("no OS type")); >- goto error; >- } >- if (!virCapabilitiesSupportsGuestOSType(driver->caps, (const char*)obj->stringval)) { >- qemudReportError(conn, NULL, NULL, VIR_ERR_OS_TYPE, >- "%s", obj->stringval); >- goto error; >- } >- strcpy(def->os.type, (const char *)obj->stringval); >- xmlXPathFreeObject(obj); >+ /* Extract bootloader */ >+ obj = xmlXPathEval(BAD_CAST "string(/domain/bootloader)", ctxt); >+ if ((obj != NULL) && (obj->type == XPATH_STRING) && >+ (obj->stringval != NULL) && (obj->stringval[0] != 0)) { >+ if (!virCapabilitiesSupportsGuestOSType(driver->caps, "xen")) { >+ qemudReportError(conn, NULL, NULL, VIR_ERR_OS_TYPE, >+ "%s", _("bootloader not supported")); >+ goto error; >+ } >+ strcpy(def->os.type, "xen"); >+ strncpy(def->os.bootloader, (const char*)obj->stringval, sizeof(def->os.bootloader)); >+ NUL_TERMINATE(def->os.bootloader); >+ xmlXPathFreeObject(obj); >+ } else { >+ /* Extract OS type info */ >+ obj = xmlXPathEval(BAD_CAST "string(/domain/os/type[1])", ctxt); >+ if ((obj == NULL) || (obj->type != XPATH_STRING) || >+ (obj->stringval == NULL) || (obj->stringval[0] == 0)) { >+ qemudReportError(conn, NULL, NULL, VIR_ERR_OS_TYPE, >+ "%s", _("no OS type")); >+ goto error; >+ } >+ if (!virCapabilitiesSupportsGuestOSType(driver->caps, (const char*)obj->stringval)) { >+ qemudReportError(conn, NULL, NULL, VIR_ERR_OS_TYPE, >+ "%s", obj->stringval); >+ goto error; >+ } >+ strcpy(def->os.type, (const char *)obj->stringval); >+ xmlXPathFreeObject(obj); >+ } > > > obj = xmlXPathEval(BAD_CAST "string(/domain/os/type[1]/@arch)", ctxt); >@@ -2371,6 +2386,7 @@ > (vm->def->os.kernel[0] ? 2 : 0) + /* kernel */ > (vm->def->os.initrd[0] ? 2 : 0) + /* initrd */ > (vm->def->os.cmdline[0] ? 2 : 0) + /* cmdline */ >+ (vm->def->os.bootloader[0] ? 2 : 0) + /* bootloader */ > (vm->def->graphicsType == QEMUD_GRAPHICS_VNC ? 2 : > (vm->def->graphicsType == QEMUD_GRAPHICS_SDL ? 0 : 1)) + /* graphics */ > (vm->migrateFrom[0] ? 3 : 0); /* migrateFrom */ >@@ -2479,6 +2495,12 @@ > if (!((*argv)[++n] = strdup("-append"))) > goto no_memory; > if (!((*argv)[++n] = strdup(vm->def->os.cmdline))) >+ goto no_memory; >+ } >+ if (vm->def->os.bootloader[0]) { >+ if (!((*argv)[++n] = strdup("-bootloader"))) >+ goto no_memory; >+ if (!((*argv)[++n] = strdup(vm->def->os.bootloader))) > goto no_memory; > } > >@@ -3809,6 +3831,8 @@ > virBufferVSprintf(&buf, " <memory>%lu</memory>\n", def->maxmem); > virBufferVSprintf(&buf, " <currentMemory>%lu</currentMemory>\n", def->memory); > virBufferVSprintf(&buf, " <vcpu>%d</vcpu>\n", def->vcpus); >+ if (def->os.bootloader[0]) >+ virBufferVSprintf(&buf, " <bootloader>%s</bootloader>\n", def->os.bootloader); > virBufferAddLit(&buf, " <os>\n"); > > if (def->virtType == QEMUD_VIRT_QEMU) >diff -r 1f0c29e18039 src/qemu_conf.h >--- a/src/qemu_conf.h Sat May 10 13:00:03 2008 -0400 >+++ b/src/qemu_conf.h Sat May 10 13:18:34 2008 -0400 >@@ -270,6 +270,7 @@ > char initrd[PATH_MAX]; > char cmdline[PATH_MAX]; > char binary[PATH_MAX]; >+ char bootloader[PATH_MAX]; > }; > > /* Guest VM main configuration */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435062
: 305036