On Tue, May 05, 2015 at 12:44:01PM -0400, Cole Robinson wrote:
The XML parser sets a default <mode> if none is explicitly
passed in.
This is then used at pool/vol creation time, and unconditionally reported
in the XML.
The problem with this approach is that it's impossible for other code
to determine if the user explicitly requested a storage mode. There
are some cases where we want to make this distinction, but we currently
can't.
Handle <mode> parsing like we handle <owner>/<group>: if no value is
passed in, set it to -1, and adjust the internal consumers to handle
it.
--- a/tests/storagevolxml2xmlin/vol-file.xml
+++ b/tests/storagevolxml2xmlin/vol-file.xml
@@ -6,8 +6,8 @@
<target>
<path>/var/lib/libvirt/images/sparse.img</path>
<permissions>
- <mode>0</mode>
- <owner>0744</owner>
+ <mode>00</mode>
00 is ugly.
+ <owner>744</owner>
Why are these changes needed? The patch does not touch the owner
formatting.
Jan
<group>0</group>
<label>virt_image_t</label>
</permissions>