qga: fix guest-get-disks regression
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 20 Apr 2021 12:58:31 +0000 (16:58 +0400)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 20 Apr 2021 15:27:45 +0000 (16:27 +0100)
Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
inadvertently removed the has_dependencies from the partition disk
info, resulting in empty list being returned.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20210420125831.233092-1-marcandre.lureau@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
qga/commands-posix.c

index 4299ebd96f8c6ef27946537aa96f324fdc33b064..75dbaab68ea99c920ac73523f457446e791c952e 100644 (file)
@@ -1376,6 +1376,7 @@ static GuestDiskInfoList *get_disk_partitions(
         partition = g_new0(GuestDiskInfo, 1);
         partition->name = dev_name;
         partition->partition = true;
+        partition->has_dependencies = true;
         /* Add parent disk as dependent for easier tracking of hierarchy */
         QAPI_LIST_PREPEND(partition->dependencies, g_strdup(disk_dev));