qemu/qga
Tomáš Golembiovský fed3956429 qga: add implementation of guest-get-disks for Linux
The command lists all disks (real and virtual) as well as disk
partitions. For each disk the list of dependent disks is also listed and
/dev path is used as a handle so it can be matched with "name" field of
other returned disk entries. For disk partitions the "dependents" list
is populated with the the parent device for easier tracking of
hierarchy.

Example output:
{
  "return": [
    ...
    {
      "name": "/dev/dm-0",
      "partition": false,
      "dependents": [
        "/dev/sda2"
      ],
      "alias": "luks-7062202e-5b9b-433e-81e8-6628c40da9f7"
    },
    {
      "name": "/dev/sda2",
      "partition": true,
      "dependents": [
        "/dev/sda"
      ]
    },
    {
      "name": "/dev/sda",
      "partition": false,
      "address": {
        "serial": "SAMSUNG_MZ7LN512HCHP-000L1_S1ZKNXAG822493",
        "bus-type": "sata",
        ...
        "dev": "/dev/sda",
        "target": 0
      },
      "dependents": []
    },
    ...
  ]
}

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
*add missing stub for !defined(CONFIG_FSFREEZE)
*remove unused deps_dir variable
Signed-off-by: Michael Roth <michael.roth@amd.com>
2020-11-02 11:32:15 -06:00
..
installer meson: convert qemu-ga 2020-08-21 06:30:12 -04:00
vss-win32 meson: convert dummy Windows qga/qemu-ga target 2020-08-21 06:30:12 -04:00
channel-posix.c util: rename qemu_open() to qemu_open_old() 2020-09-16 10:33:48 +01:00
channel-win32.c qga: Fix a memory leak 2020-03-09 13:36:15 +01:00
channel.h qga: add systemd socket activation support 2017-03-06 00:54:18 -06:00
commands-common.h qga: Extract qmp_guest_file_read() to common commands.c 2020-04-15 09:15:53 -05:00
commands-posix.c qga: add implementation of guest-get-disks for Linux 2020-11-02 11:32:15 -06:00
commands-win32.c qga: add command guest-get-disks 2020-11-02 08:14:36 -06:00
commands.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
guest-agent-command-state.c qga: use local path for local headers 2018-06-01 19:20:38 +03:00
guest-agent-core.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
main.c qmp: Call monitor_set_cur() only in qmp_dispatch() 2020-10-09 07:08:19 +02:00
meson.build meson: fix MSI rule 2020-09-30 19:09:19 +02:00
qapi-schema.json qga: add command guest-get-disks 2020-11-02 08:14:36 -06:00
service-win32.c qga: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
service-win32.h qga-win: changing --retry-path option behavior 2018-10-31 09:04:20 -05:00
vss-win32.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
vss-win32.h qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00