Re: [libvirt] [PATCH] introducing <source> <name> (for logical storage pools)

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

 



Thanks Daniel.  I just merged in your changes.  You seem to be missing a
small incremental change (checking the strdup return value for NULL),
attached.

Dave

On Tue, 2008-09-02 at 16:17 +0200, Daniel Veillard wrote:
> On Fri, Aug 29, 2008 at 03:49:27PM -0400, David Lively wrote:
> > Hi Jim -
> >   I've attached a (very) small incremental patch (i.e., to be applied
> > after the one you've already merged) that addresses a couple things I
> > noticed missing:
> >   (a) documents the new <source> <name> element in formatstorage.html.in
> >   (b) adds --source-name to the (optional) args for virsh pool-define-as
> >   
> >   I've also attached a new version of the full patch containing this
> > change, in case that's easier.
> 
>   Okidoc, I finally added this in CVS, i just had to do a bit of porting
> since the XPath lookup function have an extra argument, but nothing
> hard. I also changed some of the error message to provide more context
> because as Jim pointed out they were a bit too generic.
> 
>   thanks a lot !
> 
> Daniel
> 
diff --git a/src/storage_conf.c b/src/storage_conf.c
index 2f6093b..37a2040 100644
--- a/src/storage_conf.c
+++ b/src/storage_conf.c
@@ -331,6 +331,8 @@ virStoragePoolDefParseDoc(virConnectPtr conn,
         if (ret->source.name == NULL) {
             /* source name defaults to pool name */
             ret->source.name = strdup(ret->name);
+            if (ret->source.name == NULL)
+                virStorageReportError(conn, VIR_ERR_NO_MEMORY, "%s", _("pool name"));
         }
     }
 
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]