[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] util: move read_password method out of qemu
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] util: move read_password method out of qemu-img into osdep/oslib |
Date: |
Tue, 12 May 2015 12:22:29 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 05/12/2015 10:09 AM, Daniel P. Berrange wrote:
> The qemu-img.c file has a read_password() method impl that is
> used to prompt for passwords on the console, with impls for
> POSIX and Windows. This will be needed by qemu-io.c too, so
> move it into the QEMU osdep/oslib files where it can be shared
> without code duplication
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> include/qemu/osdep.h | 2 ++
> qemu-img.c | 93
> +---------------------------------------------------
> util/oslib-posix.c | 66 +++++++++++++++++++++++++++++++++++++
> util/oslib-win32.c | 24 ++++++++++++++
> 4 files changed, 93 insertions(+), 92 deletions(-)
>
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index b3300cc..3247364 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -259,4 +259,6 @@ void qemu_set_tty_echo(int fd, bool echo);
>
> void os_mem_prealloc(int fd, char *area, size_t sz);
>
> +int qemu_read_password(char *buf, int buf_size);
Should we fix it to use size_t buf_size while at it? (or as a followup,
to keep this one limited to code motion)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 5/5] tests: add test case for encrypted qcow2 read/write, (continued)
[Qemu-devel] [PATCH 4/5] qemu-io: prompt for encryption keys when required, Daniel P. Berrange, 2015/05/12
[Qemu-devel] [PATCH 2/5] util: move read_password method out of qemu-img into osdep/oslib, Daniel P. Berrange, 2015/05/12
- Re: [Qemu-devel] [PATCH 2/5] util: move read_password method out of qemu-img into osdep/oslib,
Eric Blake <=
Re: [Qemu-devel] [PATCH 0/5] Misc fixes and testing of qcow[2] encryption, Kevin Wolf, 2015/05/18