qga: Support enum names in guest-file-seek
Magic constants are a pain to use, especially when we run the risk that our choice of '1' for QGA_SEEK_CUR might differ from the host or guest's choice of SEEK_CUR. Better is to use an enum value, via a qapi alternate type for back-compatibility. With this, {"command":"guest-file-seek", "arguments":{"handle":1, "offset":0, "whence":"cur"}} becomes a synonym for the older {"command":"guest-file-seek", "arguments":{"handle":1, "offset":0, "whence":1}} Signed-off-by:Eric Blake <eblake@redhat.com> Reviewed-by:
Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by:
Michael Roth <mdroth@linux.vnet.ibm.com>
Showing
- qga/commands-posix.c 6 additions, 13 deletionsqga/commands-posix.c
- qga/commands-win32.c 6 additions, 13 deletionsqga/commands-win32.c
- qga/commands.c 21 additions, 0 deletionsqga/commands.c
- qga/guest-agent-core.h 2 additions, 7 deletionsqga/guest-agent-core.h
- qga/qapi-schema.json 31 additions, 2 deletionsqga/qapi-schema.json
- tests/test-qga.c 4 additions, 5 deletionstests/test-qga.c
Loading
Please register or sign in to comment