qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Kostiuk <kkostiuk@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 26/27] meson, configure: move ntddscsi API check to meson
Date: Tue, 8 Feb 2022 13:15:16 +0200	[thread overview]
Message-ID: <CAPMcbCqSeZ0xH89OcB+SoOFXooohFwAKJ2NjnpQwEzT+ntbLpA@mail.gmail.com> (raw)
In-Reply-To: <20220203173359.292068-27-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4560 bytes --]

Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Thu, Feb 3, 2022 at 8:03 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure            | 23 -----------------------
>  meson.build          | 18 +++++++++++++++++-
>  qga/commands-win32.c |  6 +++---
>  qga/meson.build      |  2 +-
>  4 files changed, 21 insertions(+), 28 deletions(-)
>
> diff --git a/configure b/configure
> index f67088044f..f6b9e5a1cd 100755
> --- a/configure
> +++ b/configure
> @@ -2289,26 +2289,6 @@ EOF
>    fi
>  fi
>
> -##########################################
> -# check if mingw environment provides a recent ntddscsi.h
> -guest_agent_ntddscsi="no"
> -if test "$mingw32" = "yes"; then
> -  cat > $TMPC << EOF
> -#include <windows.h>
> -#include <ntddscsi.h>
> -int main(void) {
> -#if !defined(IOCTL_SCSI_GET_ADDRESS)
> -#error Missing required ioctl definitions
> -#endif
> -  SCSI_ADDRESS addr = { .Lun = 0, .TargetId = 0, .PathId = 0 };
> -  return addr.Lun;
> -}
> -EOF
> -  if compile_prog "" "" ; then
> -    guest_agent_ntddscsi=yes
> -  fi
> -fi
> -
>  ##########################################
>  # capstone
>
> @@ -2818,9 +2798,6 @@ if test "$debug_tcg" = "yes" ; then
>  fi
>  if test "$mingw32" = "yes" ; then
>    echo "CONFIG_WIN32=y" >> $config_host_mak
> -  if test "$guest_agent_ntddscsi" = "yes" ; then
> -    echo "CONFIG_QGA_NTDDSCSI=y" >> $config_host_mak
> -  fi
>    echo "QEMU_GA_MSI_MINGW_DLL_PATH=${QEMU_GA_MSI_MINGW_DLL_PATH}" >>
> $config_host_mak
>    echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER}" >> $config_host_mak
>    echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO}" >> $config_host_mak
> diff --git a/meson.build b/meson.build
> index 999d2c8bd1..98e795d21a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1944,6 +1944,22 @@ if targetos == 'windows' and link_language == 'cpp'
>      int main(void) { return VSS_CTX_BACKUP; }''')
>  endif
>
> +have_ntddscsi = false
> +if targetos == 'windows'
> +  have_ntddscsi = cc.compiles('''
> +    #include <windows.h>
> +    #include <ntddscsi.h>
> +    int main(void) {
> +    #if !defined(IOCTL_SCSI_GET_ADDRESS)
> +    #error Missing required ioctl definitions
> +    #endif
> +      SCSI_ADDRESS addr = { .Lun = 0, .TargetId = 0, .PathId = 0 };
> +      return addr.Lun;
> +    }
> +''')
> +endif
> +config_host_data.set('HAVE_NTDDSCSI', have_ntddscsi)
> +
>  ignored = ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target
>      'HAVE_GDB_BIN']
>  arrays = ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
> @@ -3615,7 +3631,7 @@ summary_info += {'libnfs support':    libnfs}
>  if targetos == 'windows'
>    if have_ga
>      summary_info += {'QGA VSS support':   have_qga_vss}
> -    summary_info += {'QGA w32 disk info':
> config_host.has_key('CONFIG_QGA_NTDDSCSI')}
> +    summary_info += {'QGA w32 disk info': have_ntddscsi}
>    endif
>  endif
>  summary_info += {'seccomp support':   seccomp}
> diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> index 484cb1c6bd..4fbbad793f 100644
> --- a/qga/commands-win32.c
> +++ b/qga/commands-win32.c
> @@ -18,7 +18,7 @@
>  #include <ws2tcpip.h>
>  #include <iptypes.h>
>  #include <iphlpapi.h>
> -#ifdef CONFIG_QGA_NTDDSCSI
> +#ifdef HAVE_NTDDSCSI
>  #include <winioctl.h>
>  #include <ntddscsi.h>
>  #endif
> @@ -474,7 +474,7 @@ void qmp_guest_file_flush(int64_t handle, Error **errp)
>      }
>  }
>
> -#ifdef CONFIG_QGA_NTDDSCSI
> +#ifdef HAVE_NTDDSCSI
>
>  static GuestDiskBusType win2qemu[] = {
>      [BusTypeUnknown] = GUEST_DISK_BUS_TYPE_UNKNOWN,
> @@ -1111,7 +1111,7 @@ GuestDiskInfoList *qmp_guest_get_disks(Error **errp)
>      return NULL;
>  }
>
> -#endif /* CONFIG_QGA_NTDDSCSI */
> +#endif /* HAVE_NTDDSCSI */
>
>  static GuestFilesystemInfo *build_guest_fsinfo(char *guid, Error **errp)
>  {
> diff --git a/qga/meson.build b/qga/meson.build
> index 8c177435ac..fe0bfc295f 100644
> --- a/qga/meson.build
> +++ b/qga/meson.build
> @@ -88,7 +88,7 @@ if targetos == 'windows'
>      qga_libs += ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++',
> '-Wl,--enable-stdcall-fixup']
>      subdir('vss-win32')
>    endif
> -  if 'CONFIG_QGA_NTDDSCSI' in config_host
> +  if have_ntddscsi
>      qga_libs += ['-lsetupapi', '-lcfgmgr32']
>    endif
>  endif
> --
> 2.34.1
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 5984 bytes --]

  reply	other threads:[~2022-02-08 12:23 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 17:33 [PATCH 00/27] Next batch of Meson cleanups and conversions Paolo Bonzini
2022-02-03 17:33 ` [PATCH 01/27] meson: use .allowed() method for features Paolo Bonzini
2022-02-04  3:47   ` Richard Henderson
2022-02-03 17:33 ` [PATCH 02/27] meson: use .require() and .disable_auto_if() " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 03/27] configure, meson: move AVX tests to meson Paolo Bonzini
2022-02-04  4:07   ` Richard Henderson
2022-02-03 17:33 ` [PATCH 04/27] configure, meson: move membarrier test " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 05/27] configure, meson: move AF_ALG " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 06/27] configure, meson: move libnuma detection " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 07/27] configure, meson: move TPM check " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 08/27] configure, meson: cleanup qemu-ga libraries Paolo Bonzini
2022-02-03 17:33 ` [PATCH 09/27] configure, meson: move image format options to meson_options.txt Paolo Bonzini
2022-02-03 17:33 ` [PATCH 10/27] configure, meson: move block layer " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 11/27] meson: define qemu_cflags/qemu_ldflags Paolo Bonzini
2022-02-04  5:08   ` Philippe Mathieu-Daudé via
2022-02-03 17:33 ` [PATCH 12/27] configure, meson: move some default-disabled options to meson_options.txt Paolo Bonzini
2022-02-03 17:33 ` [PATCH 13/27] configure, meson: move coroutine " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 14/27] configure, meson: move smbd " Paolo Bonzini
2022-02-03 17:33 ` [PATCH 15/27] configure, meson: move guest-agent, tools to meson Paolo Bonzini
2022-02-03 17:33 ` [PATCH 16/27] meson: refine check for whether to look for virglrenderer Paolo Bonzini
2022-02-03 17:33 ` [PATCH 17/27] configure, meson: move OpenGL check to meson Paolo Bonzini
2022-02-03 17:33 ` [PATCH 18/27] qga/vss-win32: fix midl arguments Paolo Bonzini
2022-02-08 11:13   ` Konstantin Kostiuk
2022-02-08 11:20     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 19/27] meson: drop --with-win-sdk Paolo Bonzini
2022-02-03 17:33 ` [PATCH 20/27] qga/vss-win32: use widl if available Paolo Bonzini
2022-02-08 11:14   ` Konstantin Kostiuk
2022-02-08 11:20     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 21/27] qga/vss: use standard windows headers location Paolo Bonzini
2022-02-04  5:16   ` Philippe Mathieu-Daudé via
2022-02-08 11:21     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 22/27] configure, meson: replace VSS SDK checks and options with --enable-vss-sdk Paolo Bonzini
2022-02-03 18:07   ` Marc-André Lureau
2022-02-03 17:33 ` [PATCH 23/27] meson: do not make qga/vss-win32/meson.build conditional on C++ presence Paolo Bonzini
2022-02-08 11:14   ` Konstantin Kostiuk
2022-02-08 11:20     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 24/27] qga/vss-win32: require widl/midl, remove pre-built TLB file Paolo Bonzini
2022-02-04  5:18   ` Philippe Mathieu-Daudé via
2022-02-08 11:21     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 25/27] meson: require dynamic linking for VSS support Paolo Bonzini
2022-02-04  5:19   ` Philippe Mathieu-Daudé via
2022-02-08 11:23     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 26/27] meson, configure: move ntddscsi API check to meson Paolo Bonzini
2022-02-08 11:15   ` Konstantin Kostiuk [this message]
2022-02-08 11:20     ` Konstantin Kostiuk
2022-02-03 17:33 ` [PATCH 27/27] configure, meson: move CONFIG_IASL to a Meson option Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPMcbCqSeZ0xH89OcB+SoOFXooohFwAKJ2NjnpQwEzT+ntbLpA@mail.gmail.com \
    --to=kkostiuk@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).