Re: [PATCH 06/10] Check return on mkdir for LOCKSPACE_DIR

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

 



On Thu, Jan 03, 2013 at 02:16:18PM -0500, John Ferlan wrote:
> ---
>  tests/virlockspacetest.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/virlockspacetest.c b/tests/virlockspacetest.c
> index 8673700..7678396 100644
> --- a/tests/virlockspacetest.c
> +++ b/tests/virlockspacetest.c
> @@ -293,7 +293,8 @@ static int testLockSpaceResourceLockPath(const void *args ATTRIBUTE_UNUSED)
>  
>      lockspace = virLockSpaceNew(NULL);
>  
> -    mkdir(LOCKSPACE_DIR, 0700);
> +    if (mkdir(LOCKSPACE_DIR, 0700) < 0)
> +        goto cleanup;
>  
>      if (virLockSpaceCreateResource(lockspace, LOCKSPACE_DIR "/foo") < 0)
>          goto cleanup;

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]