Kevin Wolf wrote:
Am 16.05.2011 20:10, schrieb Supriya Kannery:
Enhance "info block" to display cache setting
Example:
(qemu) info block
ide0-hd0: type=hd removable=0 file=../rhel6-32.qcow2 ro=0 drv=qcow2
encrypted=0
Enhanced to include "cache" setting:
(qemu) info block
ide0-hd0: type=hd removable=0 cache=none file=../rhel6-32.qcow2 ro=0
drv=qcow2 encrypted=0
bs_obj = qobject_from_jsonf("{ 'device': %s, 'type': %s, "
- "'removable': %i, 'locked': %i }",
+ "'removable': %i, 'locked': %i, "
+ "'open_flags': %d }",
bs->device_name, type, bs->removable,
- bs->locked);
+ bs->locked, bs->open_flags);
if (bs->drv) {
QObject *obj;
bs->open_flags is a purely internal thing and its meaning is not
guaranteed to be stable. Exposing it to the user is wrong.
ok. Pls suggest what could a better approach to expose the cache setting.
Kevin