[libvirt] [PATCH] Fix missing char dev lock path case in configure

Daniel P. Berrange berrange at redhat.com
Wed Mar 5 15:46:50 UTC 2014


On Wed, Mar 05, 2014 at 07:34:11PM +0400, Roman Bogorodskiy wrote:
> configure check for character devices lock path calls
> AC_DEFINE_UNQUOTED for VIR_CHRDEV_LOCK_FILE_PATH even if
> $with_chrdev_lock_files = "no".
> 
> So the locking code in conf/virchrdev.c:
> 
>  #ifdef VIR_CHRDEV_LOCK_FILE_PATH
> 
> is compiled in even if it shouldn't, because VIR_CHRDEV_LOCK_FILE_PATH
> is defined as "no", so it tries to create lock files with strange
> lock path like 'no/LCK..'.
> 
> Fix that by calling AC_DEFINE_UNQUOTED only if $with_chrdev_lock_files
> is not 'no'.
> ---
>  configure.ac | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index a9339ce..62b74c5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1401,8 +1401,10 @@ if test "$with_chrdev_lock_files" != "no"; then
>      AC_MSG_ERROR([You must specify path for the lock files on this
>  platform])
>    fi
> -  AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
> -                      [path to directory containing UUCP device lock files])
> +  if test "$with_chrdev_lock_files" != "no"; then
> +    AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
> +                       [path to directory containing UUCP device lock files])
> +  fi
>  fi
>  AM_CONDITIONAL([VIR_CHRDEV_LOCK_FILE_PATH], [test "$with_chrdev_lock_files" != "no"])

ACK

Regards,
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 :|




More information about the libvir-list mailing list