[libvirt] [PATCH 02/14] qemuDomainDiskChangeSupported: Deny changing reservations

Peter Krempa pkrempa at redhat.com
Mon Feb 12 17:10:43 UTC 2018


On Mon, Feb 12, 2018 at 17:19:24 +0100, Andrea Bolognani wrote:
> On Mon, 2018-02-12 at 16:40 +0100, Peter Krempa wrote:
> > > @@ -6865,6 +6865,14 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
> > >      CHECK_EQ(src->readonly, "readonly", true);
> > >      CHECK_EQ(src->shared, "shared", true);
> > >  
> > > +    if (!virStoragePRDefIsEqual(disk->src->pr,
> > > +                                orig_disk->src->pr)) {
> > > +        virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
> > > +                       _("cannot modify field '%s' of the disk"),
> > > +                       "reservations");
> > 
> > Is there a particular reason to format 'reservations' separately?
> > 
> > Translations should not translate it, but doing this is generally deemed
> > translation unfriendly.
> 
> Wouldn't that actually be better for translators? Assuming there's
> going to be more than a single field, you can translate the message
> once and it will work for all instances.
> 
> Of course that only works if, like in this case, the variable part
> itself does not need translation.

Um yes, in this case it will actually help due to the surrounding code
using that pattern a lot and also tha the field should not be
translated.

I retract my comment.

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180212/515ecf38/attachment-0001.sig>


More information about the libvir-list mailing list