[libvirt] [PATCH 2/3] virfiletest: Test virFileInData iff SEEK_HOLE is defined

Peter Krempa pkrempa at redhat.com
Fri May 19 10:34:19 UTC 2017


On Thu, May 18, 2017 at 15:46:45 +0200, Michal Privoznik wrote:
> Yet another place where we need to wrap code in
> HAVE_DECL_SEEK_HOLE block.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  tests/virfiletest.c | 36 +++++++++++++++++++++++-------------
>  1 file changed, 23 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/virfiletest.c b/tests/virfiletest.c
> index a93bee01a..d6a526c13 100644
> --- a/tests/virfiletest.c
> +++ b/tests/virfiletest.c
> @@ -123,7 +123,11 @@ static int
>  makeSparseFile(const off_t offsets[],
>                 const bool startData);
>  
> -#ifdef __linux__
> +static bool
> +holesSupported(void);

This is not necessary.

> +
> +#if HAVE_DECL_SEEK_HOLE
> +
>  /* Create a sparse file. @offsets in KiB. */
>  static int
>  makeSparseFile(const off_t offsets[],

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170519/5177c5e4/attachment-0001.sig>


More information about the libvir-list mailing list