qemu-ga patch queue for hard-freeze

* fixes for schema data-type declarations for guest-get-disks
 -----BEGIN PGP SIGNATURE-----
 
 iQFJBAABCgAzFiEEzqzJ4VU066u4LT+gM1PJzvEItYQFAl+y0HQVHG1pY2hhZWwu
 cm90aEBhbWQuY29tAAoJEDNTyc7xCLWEQREH/1N7D5wotLrGeuK0+bpOj0lw4+LL
 Z2rlnyW+tt6NeWqdFn99RIIsEBn2jdU9na7gkmwt4wcmzWOrMGbDqYS941Vu1RCL
 1NqiEur5SIZrKpkxNOees0KsGfYG2ma3IL+A5WTXIntRHItfek+wyHImkp/kcfeJ
 0LDQKOL3UTL9H9lDzk5qlHeVB7M95neMNeNA15a5jvYBCZAS+H6YJYkijnHwHZ+3
 l7jHbM9MmHrmnTG2HEFxrwORDf1KlQ4pacUwF2/d1d7/U4ppqs2x60oo+qGqaOgn
 j385PJbK9erRXCEltTTnMCNDjWTiI73fs2zl0wPKgzPYiEiEsziOHPHsXZ0=
 =7Zbs
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2020-11-16-tag' into staging

qemu-ga patch queue for hard-freeze

* fixes for schema data-type declarations for guest-get-disks

# gpg: Signature made Mon 16 Nov 2020 19:18:12 GMT
# gpg:                using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584
# gpg:                issuer "michael.roth@amd.com"
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full]
# gpg:                 aka "Michael Roth <mdroth@utexas.edu>" [full]
# gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full]
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2020-11-16-tag:
  qga: update schema for guest-get-disks 'dependents' field

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-11-16 20:15:57 +00:00
commit b17d3b7b77
2 changed files with 10 additions and 8 deletions

View File

@ -1285,6 +1285,7 @@ static void get_disk_deps(const char *disk_dir, GuestDiskInfo *disk)
g_debug("failed to list entries in %s", deps_dir);
return;
}
disk->has_dependencies = true;
while ((dep = g_dir_read_name(dp_deps)) != NULL) {
g_autofree char *dep_dir = NULL;
strList *dep_item = NULL;
@ -1297,8 +1298,8 @@ static void get_disk_deps(const char *disk_dir, GuestDiskInfo *disk)
g_debug(" adding dependent device: %s", dev_name);
dep_item = g_new0(strList, 1);
dep_item->value = dev_name;
dep_item->next = disk->dependents;
disk->dependents = dep_item;
dep_item->next = disk->dependencies;
disk->dependencies = dep_item;
}
}
g_dir_close(dp_deps);
@ -1351,8 +1352,9 @@ static GuestDiskInfoList *get_disk_partitions(
partition->name = dev_name;
partition->partition = true;
/* Add parent disk as dependent for easier tracking of hierarchy */
partition->dependents = g_new0(strList, 1);
partition->dependents->value = g_strdup(disk_dev);
partition->dependencies = g_new0(strList, 1);
partition->dependencies->value = g_strdup(disk_dev);
partition->has_dependencies = true;
item = g_new0(GuestDiskInfoList, 1);
item->value = partition;

View File

@ -870,9 +870,9 @@
#
# @name: device node (Linux) or device UNC (Windows)
# @partition: whether this is a partition or disk
# @dependents: list of dependent devices; e.g. for LVs of the LVM this will
# hold the list of PVs, for LUKS encrypted volume this will
# contain the disk where the volume is placed. (Linux)
# @dependencies: list of device dependencies; e.g. for LVs of the LVM this will
# hold the list of PVs, for LUKS encrypted volume this will
# contain the disk where the volume is placed. (Linux)
# @address: disk address information (only for non-virtual devices)
# @alias: optional alias assigned to the disk, on Linux this is a name assigned
# by device mapper
@ -880,7 +880,7 @@
# Since 5.2
##
{ 'struct': 'GuestDiskInfo',
'data': {'name': 'str', 'partition': 'bool', 'dependents': ['str'],
'data': {'name': 'str', 'partition': 'bool', '*dependencies': ['str'],
'*address': 'GuestDiskAddress', '*alias': 'str'} }
##