[libvirt] [PATCH v2 3/5] storage: conf: Don't set any default <mode> in the XML
Ján Tomko
jtomko at redhat.com
Mon May 11 08:10:08 UTC 2015
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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150511/c17e41f5/attachment-0001.sig>
More information about the libvir-list
mailing list