[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/1] Properly indent encryption tags



On Fri, Apr 23, 2010 at 08:41:54AM -0600, Eric Blake wrote:
> On 04/22/2010 12:32 PM, David Allan wrote:
> > * Fix for the bug reported at:
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=573908
> > ---
> >  src/conf/storage_encryption_conf.c |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c
> > index ed71688..7f68d67 100644
> > --- a/src/conf/storage_encryption_conf.c
> > +++ b/src/conf/storage_encryption_conf.c
> > @@ -228,7 +228,7 @@ virStorageEncryptionSecretFormat(virBufferPtr buf,
> >      }
> > 
> >      virUUIDFormat(secret->uuid, uuidstr);
> > -    virBufferVSprintf(buf, "      <secret type='%s' uuid='%s'/>\n", type, uuidstr);
> > +    virBufferVSprintf(buf, "        <secret type='%s' uuid='%s'/>\n", type, uuidstr);
> 
> This patch breaks tests/storagevolxml2xmltest, which needs a
> corresponding change to the expected alignment.

Actually I think the problem here is that the encryption XML is used from
two different places - the domain XML and the storage volume XML. The usage
in each of these two XML docs needs a different indentation. There is no
one-size-fits-all solution. We should make the caller pass in a suitable
const char *indent = "    "; string to match their use context.


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]