On 04/02/2013 10:15 AM, Hu Tao wrote:
On Mon, Apr 01, 2013 at 08:00:53PM +0800, Han Cheng wrote:
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2257,6 +2257,9 @@
<code>id</code> attribute that specifies the USB vendor and product id.
The ids can be given in decimal, hexadecimal (starting with 0x) or
octal (starting with 0) form.</dd>
+<dt><code>readonly</code></dt>
+<dd>Specifies that the device is readonly.
+<span class="since">Since 0.13.0</span> for SCSI devices.</dd>
0.13.0 -> 1.0.5
version 1.0.4 is just out.
Thank you for pointing out this.
<dt><code>boot</code></dt>
<dd>Specifies that the device is bootable. The<code>order</code>
attribute determines the order in which devices will be tried during
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f3fca7f..d9d6b9f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3452,8 +3452,8 @@ error:
}
int
-virDomainDiskFindControllerModel(virDomainDefPtr def,
- virDomainDiskDefPtr disk,
+virDomainDeviceFindControllerModel(virDomainDefPtr def,
+ virDomainDeviceInfoPtr info,
int controllerType)
Indentation.
I'm sorry for messing this up.
Osier advised me to use virDomainDeviceFindControllerModel rather than
virDomainInfoFindControllerModel. I've change the definition one but I
forgot to change the referenced places. This also caused the indentation
problem.
I didn't pay enough time for this.
I'm really sorry for this.
I'd like to say that I did some test for major object of this patch series.
{
int model = -1;
@@ -3461,7 +3461,7 @@ virDomainDiskFindControllerModel(virDomainDefPtr def,
for (i = 0; i< def->ncontrollers; i++) {
if (def->controllers[i]->type == controllerType&&
- def->controllers[i]->idx == disk->info.addr.drive.controller)
+ def->controllers[i]->idx == info->addr.drive.controller)
model = def->controllers[i]->model;
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index edddf25..f8e3973 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -439,6 +439,8 @@ struct _virDomainHostdevDef {
} source;
virDomainHostdevOrigStates origstates;
virDomainDeviceInfoPtr info; /* Guest address */
+ /* readonly is only used for scsi hostdev */
+ unsigned int readonly;
bool readonly;
};
/* Two types of disk backends */
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list