From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsEpB-0000JJ-Kb for qemu-devel@nongnu.org; Tue, 12 May 2015 14:22:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsEpA-0005WN-L3 for qemu-devel@nongnu.org; Tue, 12 May 2015 14:22:37 -0400 Message-ID: <555244E5.2050201@redhat.com> Date: Tue, 12 May 2015 12:22:29 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431446962-9860-1-git-send-email-berrange@redhat.com> <1431446962-9860-3-git-send-email-berrange@redhat.com> In-Reply-To: <1431446962-9860-3-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VNjj115HLEP5QEMlK8hvf7L8xNLSxluee" Subject: Re: [Qemu-devel] [PATCH 2/5] util: move read_password method out of qemu-img into osdep/oslib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VNjj115HLEP5QEMlK8hvf7L8xNLSxluee Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >=20 > Signed-off-by: Daniel P. Berrange > --- > 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(-) >=20 > 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); > =20 > void os_mem_prealloc(int fd, char *area, size_t sz); > =20 > +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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VNjj115HLEP5QEMlK8hvf7L8xNLSxluee Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVUkTlAAoJEKeha0olJ0Nqy2YH/3qLgU5GA80WuSb4QdPSkzeB f6nWpl9z+rPUhf5nudVQuehgjRpuZPctaW8SC4Sqa/QWxbn9jgFqFzCrE03ZkBWs 04QfN8F7opKaKgfj7+VvDl08XUsVOZWHNTy8ZsFGyXtDW7whOuStf4udSgzQ7NMv DGT9rhhN5MqBtlvOxum9tZx/lLoTj8SshdDYyCJEvRIWELL5+mf28hT8TtluYoAD kGIgJriUjqpcvz66weApvAoByaGwtNfwhQEC/cZ4KOfcQzGItNWx1fiHwljnxPaQ ctNeuRsGn4JOPcSJsuzp1D29CTjnJiwomY/hmr7aDHr6IP3DqFCPpa6GYkunkco= =T/Y+ -----END PGP SIGNATURE----- --VNjj115HLEP5QEMlK8hvf7L8xNLSxluee--