qemu/qga
Michael Roth 8251a72f8b qga: don't fail if mount doesn't have slave devices
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>
2017-03-30 14:12:57 -05:00
..
installer qga: Workaround for console redirection from non-interactive qemu-ga service 2016-04-07 11:43:54 -05:00
vss-win32 rules.mak: quiet-command: Split command name and args to print 2016-10-06 12:11:51 +01:00
channel-posix.c qga: add systemd socket activation support 2017-03-06 00:54:18 -06:00
channel-win32.c qga: add systemd socket activation support 2017-03-06 00:54:18 -06:00
channel.h qga: add systemd socket activation support 2017-03-06 00:54:18 -06:00
commands-posix.c qga: don't fail if mount doesn't have slave devices 2017-03-30 14:12:57 -05:00
commands-win32.c qga: minimal support for fstrim for Windows guests 2016-10-31 19:09:21 -05:00
commands.c qapi: Support multiple command registries per program 2017-03-05 09:12:25 +01:00
guest-agent-command-state.c qga: free remaining leaking state 2016-09-08 17:57:32 +04:00
guest-agent-core.h qapi: Support multiple command registries per program 2017-03-05 09:12:25 +01:00
main.c qemu-ga: obey LISTEN_PID when using systemd socket activation 2017-03-19 11:12:12 +01:00
Makefile.objs
qapi-schema.json qapi: The #optional tag is redundant, drop 2017-03-16 07:13:02 +01:00
service-win32.c qga: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
service-win32.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
vss-win32.c qga: fix w32 breakage due to missing osdep.h includes 2016-02-25 10:54:32 -06:00
vss-win32.h all: Clean up includes 2016-02-23 12:43:05 +00:00