qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/10] monitor: Convert bdrv_info() to QObject


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 08/10] monitor: Convert bdrv_info() to QObject
Date: Sat, 10 Oct 2009 14:18:03 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Luiz Capitulino <address@hidden> writes:

> Each block device information is stored in a QDict and the
> returned QObject is a QList of all devices.
>
> The QDict contains the following:
>
> - "device": device name
> - "type": device type
> - "removable": 1 if the device is removable 0 otherwise
> - "locked": 1 if the device is locked 0 otherwise
> - "backing_file": backing file name if one is used

Isn't this in "interted" rather than here?

If yes, the comment in the code needs fixing, too.

> - "inserted": only present if the device is inserted, it is a QDict

I'd call this "media".

>   containing the following:
>         - "file": device file name
>         - "ro": 1 if read-only 0 otherwise
>         - "drv": driver format name
>         - "encrypted":  1 if encrypted 0 otherwise
>
> The current implemention uses integers as booleans, to make
> things simple those integers are stored in the QDict. Ideally,
> we would have a QBool type and this is probably going to be
> a requirement for the protocol.
>
> But the integers will do the job for now.
>
> This commit should not change user output, the following is an
> example of the returned QList:
>
> [ { "device": "ide0-hd0", "type": "hd", "removable": 0,
>     "file": "/tmp/foobar", "ro": 0, "drv": "qcow2", "encrypted": 0 }
>   { "device": "floppy0", "type": "floppy", "removable": 1,
>   "locked": 0 } ]
[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]