On Fri, Oct 09, 2015 at 09:34:05 -0400, John Ferlan wrote:
> After a successful creation of a directory, if some other call results
> in returning a failure, let's remove the directory we created to
> prevent another round trip or confusion in the caller. In particular, this
> function can be called during a storage backend buildVol, so in order
> to ensure that caller doesn't need to distinguish between failed create
> or some other failure after create, just remove the directory we created.
> 
> Signed-off-by: John Ferlan <[email protected]>
> ---
>  src/util/virfile.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index 51198e2..2cb2469 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c

...

> @@ -2420,6 +2420,7 @@ virDirCreateNoFork(const char *path,
> @@ -2465,6 +2469,7 @@ virDirCreate(const char *path,

Please document the semantics in the function comments for the two
functions.

ACK with docs.

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to