All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9
@ 2017-03-31  4:01 Michael Roth
  2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices Michael Roth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Roth @ 2017-03-31  4:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit df9046363220e57d45818312759b954c033c58ab:

  Update version for v2.9.0-rc2 release (2017-03-28 19:11:16 +0100)

are available in the git repository at:

  git://github.com/mdroth/qemu.git tags/qga-pull-2017-03-30-tag

for you to fetch changes up to 4eaf72029446ba693c63429475ce46348f65bf01:

  qga: Make qemu-ga compile statically for Windows (2017-03-30 21:47:25 -0500)

----------------------------------------------------------------
qemu-ga patch queue for 2.9

* fix make check failure of guest-get-fsinfo when nested virtual block
  device partitions are mounted in the test environment
* fix static compilation for mingw builds

----------------------------------------------------------------
Michael Roth (1):
      qga: don't fail if mount doesn't have slave devices

Sameeh Jubran (1):
      qga: Make qemu-ga compile statically for Windows

 configure            | 7 +++++++
 qga/commands-posix.c | 4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices
  2017-03-31  4:01 [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Michael Roth
@ 2017-03-31  4:01 ` Michael Roth
  2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows Michael Roth
  2017-03-31 10:41 ` [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2017-03-31  4:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

In some cases the slave devices of a virtual block device are tracked
by the parent in the corresponding sysfs node. For instance, if we
have a loop-back mount of the form:

  /dev/loop3p1 on /home/mdroth/mnt type ext4 (rw,relatime,data=ordered)

this will be reflected in sysfs as:

  /sys/devices/virtual/block/loop3/
  ...
  /sys/devices/virtual/block/loop3/slaves
  /sys/devices/virtual/block/loop3/loop3p1

The current code however assumes the mounted virtual block device,
loop3p1 in this case, contains the slaves directory, and reports an
error otherwise. This breaks 'make check' in certain environments.

Fix this by simply skipping attempts to generate disk topology
information in these cases. Since this information is documented
in QAPI as optionally-reported, this should be ok from an API
perspective.

In the future, this can possibly be improved upon by collecting
topology information from the parent in these cases.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
---
 qga/commands-posix.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 73d93eb..915df9e 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -999,7 +999,9 @@ static void build_guest_fsinfo_for_virtual_device(char const *syspath,
     dirpath = g_strdup_printf("%s/slaves", syspath);
     dir = opendir(dirpath);
     if (!dir) {
-        error_setg_errno(errp, errno, "opendir(\"%s\")", dirpath);
+        if (errno != ENOENT) {
+            error_setg_errno(errp, errno, "opendir(\"%s\")", dirpath);
+        }
         g_free(dirpath);
         return;
     }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows
  2017-03-31  4:01 [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Michael Roth
  2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices Michael Roth
@ 2017-03-31  4:01 ` Michael Roth
  2017-03-31 10:41 ` [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2017-03-31  4:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Sameeh Jubran

From: Sameeh Jubran <sameeh@daynix.com>

Attempting to compile qemu-ga statically as follows for Windows causes
the following error:

Compilation:
    ./configure --disable-docs --target-list=x86_64-softmmu \
    --cross-prefix=x86_64-w64-mingw32- --static \
    --enable-guest-agent-msi --with-vss-sdk=/path/to/VSSSDK72

    make -j8 qemu-ga

Error:
    path/to/qemu/stubs/error-printf.c:7: undefined reference to `__imp_g_test_config_vars'
    collect2: error: ld returned 1 exit status
    Makefile:444: recipe for target 'qemu-ga.exe' failed
    make: *** [qemu-ga.exe] Error 1

This is caused by a bug in the pkg-config file for glib as it doesn't define
GLIB_STATIC_COMPILATION for pkg-config --static.

Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure b/configure
index d1ce33b..07018e0 100755
--- a/configure
+++ b/configure
@@ -3066,6 +3066,13 @@ if test "$modules" = yes; then
     glib_modules="$glib_modules gmodule-2.0"
 fi
 
+# This workaround is required due to a bug in pkg-config file for glib as it
+# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
+
+if test "$static" = yes -a "$mingw32" = yes; then
+    QEMU_CFLAGS="-DGLIB_STATIC_COMPILATION $QEMU_CFLAGS"
+fi
+
 for i in $glib_modules; do
     if $pkg_config --atleast-version=$glib_req_ver $i; then
         glib_cflags=$($pkg_config --cflags $i)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9
  2017-03-31  4:01 [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Michael Roth
  2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices Michael Roth
  2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows Michael Roth
@ 2017-03-31 10:41 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-03-31 10:41 UTC (permalink / raw)
  To: Michael Roth; +Cc: QEMU Developers

On 31 March 2017 at 05:01, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> The following changes since commit df9046363220e57d45818312759b954c033c58ab:
>
>   Update version for v2.9.0-rc2 release (2017-03-28 19:11:16 +0100)
>
> are available in the git repository at:
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2017-03-30-tag
>
> for you to fetch changes up to 4eaf72029446ba693c63429475ce46348f65bf01:
>
>   qga: Make qemu-ga compile statically for Windows (2017-03-30 21:47:25 -0500)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for 2.9
>
> * fix make check failure of guest-get-fsinfo when nested virtual block
>   device partitions are mounted in the test environment
> * fix static compilation for mingw builds
>
> ----------------------------------------------------------------
> Michael Roth (1):
>       qga: don't fail if mount doesn't have slave devices
>
> Sameeh Jubran (1):
>       qga: Make qemu-ga compile statically for Windows
>
>  configure            | 7 +++++++
>  qga/commands-posix.c | 4 +++-
>  2 files changed, 10 insertions(+), 1 deletion(-)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-31 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31  4:01 [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Michael Roth
2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 1/2] qga: don't fail if mount doesn't have slave devices Michael Roth
2017-03-31  4:01 ` [Qemu-devel] [PULL for-2.9 2/2] qga: Make qemu-ga compile statically for Windows Michael Roth
2017-03-31 10:41 ` [Qemu-devel] [PULL for-2.9 0/2] qemu-ga patch queue for 2.9 Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.