[libvirt] [PATCH 1/3] util: Declare that virFileExists shall honor errno
Eric Blake
eblake at redhat.com
Fri Sep 13 15:36:05 UTC 2013
On 09/13/2013 08:19 AM, Peter Krempa wrote:
> Explicitly state that some parts of the code may require virFileExists
> to set or preserve a correct errno so that future modifications don't
> break.
> ---
> src/util/virfile.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index feac3c9..67adc55 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c
> @@ -1477,6 +1477,12 @@ virFileIsDir(const char *path)
> return (stat(path, &s) == 0) && S_ISDIR(s.st_mode);
> }
>
> +/**
> + * virFileExists: Check for presence of file
> + * @path: Path of file to check
> + *
> + * Returns wether file exists. Preserves errno in case it does not exist.
s/wether/whether/
or even:
s/wether/true if the/
> + */
> bool
> virFileExists(const char *path)
> {
>
ACK once you avoid the typo.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130913/1b112c30/attachment-0001.sig>
More information about the libvir-list
mailing list