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 837746 Details for
Bug 1044023
VMX file parser should support "transient" on disks
[?]
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.
Patches src/vmx/vmx.c, applies cleanly on 1.1.4 and current trunk
transient-patch.txt (text/plain), 2.21 KB, created by
Wout Mertens
on 2013-12-17 16:01:13 UTC
(
hide
)
Description:
Patches src/vmx/vmx.c, applies cleanly on 1.1.4 and current trunk
Filename:
MIME Type:
Creator:
Wout Mertens
Created:
2013-12-17 16:01:13 UTC
Size:
2.21 KB
patch
obsolete
>diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c >index 48487f8..db7fd11 100644 >--- a/src/vmx/vmx.c >+++ b/src/vmx/vmx.c >@@ -1954,6 +1954,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con > * busType = VIR_DOMAIN_DISK_BUS_FDC > * controllerOrBus = [0] > * unit = [0..1] >+ * > */ > > int result = -1; >@@ -1980,6 +1981,9 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con > char writeThrough_name[32] = ""; > bool writeThrough = false; > >+ char *mode_name[32] = ""; >+ char *mode = NULL; >+ > if (def == NULL || *def != NULL) { > virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")); > return -1; >@@ -2093,6 +2097,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con > VMX_BUILD_NAME(fileType); > VMX_BUILD_NAME(fileName); > VMX_BUILD_NAME(writeThrough); >+ VMX_BUILD_NAME(mode); > > /* vmx:present */ > if (virVMXGetConfigBoolean(conf, present_name, &present, false, true) < 0) { >@@ -2121,6 +2126,11 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con > goto cleanup; > } > >+ /* vmx:mode -> def:transient */ >+ if (virVMXGetConfigString(conf, mode_name, &mode, true) < 0) { >+ goto cleanup; >+ } >+ > if (clientDevice) { > /* > * Just ignore devices in client mode, because I have no clue how to >@@ -2172,6 +2182,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con > (*def)->src = ctx->parseFileName(fileName, ctx->opaque); > (*def)->cachemode = writeThrough ? VIR_DOMAIN_DISK_CACHE_WRITETHRU > : VIR_DOMAIN_DISK_CACHE_DEFAULT; >+ (*def)->transient = STRCASEEQ(mode, "independent-nonpersistent") ? true: false; > > if ((*def)->src == NULL) { > goto cleanup; >@@ -3497,7 +3508,11 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def, > return -1; > } > } >- >+ >+ if (def->transient) { >+ virBufferAsprintf(buffer, "%s%d:%d.mode = \"independent-nonpersistent\"\n", >+ busType, controllerOrBus, unit); >+ } > return 0; > } >
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 Raw
Actions:
View
Attachments on
bug 1044023
: 837746 |
837792