[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [RFC][PATCH v5 08/21] virtagent: add agent_viewfile qmp
[Qemu-devel] Re: [RFC][PATCH v5 08/21] virtagent: add agent_viewfile qmp/hmp command
Mon, 06 Dec 2010 17:20:53 -0600
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:126.96.36.199) Gecko/20101027 Thunderbird/3.1.6
On 12/06/2010 04:08 PM, Adam Litke wrote:
On Fri, 2010-12-03 at 12:03 -0600, Michael Roth wrote:
Utilize the getfile RPC to provide a means to view text files in the
guest. Getfile can handle binary files as well but we don't advertise
that here due to the special handling requiring to store it and provide
it back to the user (base64 encoding it for instance). Hence the
otherwise confusing "viewfile" as opposed to "getfile".
What happens to the monitor if you use this to view a binary file?
At the very least we probably get a lot of truncated files from the
binary->string conversion via monitor_printf(). Im not sure how the
qobject/json layer would deal with things.
Retrieving binary files progmatically using the QMP interface is a valid
use case right?
For getfile (the RPC), but not for viewfile (HMP/QMP). It's doable, but
we'd *have to* pass this data to the user as base64-encoded data at the
QMP level. At the HMP level I think we're good either way, since we
could just base64 decode in the print function.
So in the case of QMP we'd be pushing complexity to the user in exchange
for not having a seperate plain-text-only interface.
Either way seems reasonable, but I'd been planning on adding a seperate
`agent_copyfile <remote_path> <local_path>` command for dealing with
binary data, and making viewfile quick and easy for plain text (both for
HMP and QMP).
[Qemu-devel] [RFC][PATCH v5 08/21] virtagent: add agent_viewfile qmp/hmp command, Michael Roth, 2010/12/03
[Qemu-devel] Re: [RFC][PATCH v5 08/21] virtagent: add agent_viewfile qmp/hmp command, Jes Sorensen, 2010/12/07
[Qemu-devel] [RFC][PATCH v5 11/21] virtagent: add va.shutdown RPC, Michael Roth, 2010/12/03
[Qemu-devel] [RFC][PATCH v5 06/21] virtagent: base server definitions, Michael Roth, 2010/12/03
[Qemu-devel] [RFC][PATCH v5 12/21] virtagent: add agent_shutdown qmp/hmp commands, Michael Roth, 2010/12/03
- [Qemu-devel] Re: [RFC][PATCH v5 07/21] virtagent: add va.getfile RPC, (continued)