From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcLHq-0002lB-1C for qemu-devel@nongnu.org; Thu, 09 Oct 2014 17:30:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcLHl-0007CL-Mj for qemu-devel@nongnu.org; Thu, 09 Oct 2014 17:30:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcLHl-0007B3-GV for qemu-devel@nongnu.org; Thu, 09 Oct 2014 17:30:09 -0400 Message-ID: <5436FE5D.7010801@redhat.com> Date: Thu, 09 Oct 2014 15:30:05 -0600 From: Eric Blake MIME-Version: 1.0 References: <1412881938-3757-1-git-send-email-reftel@spotify.com> <1412881938-3757-2-git-send-email-reftel@spotify.com> In-Reply-To: <1412881938-3757-2-git-send-email-reftel@spotify.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RutuxB1WbGPvOIhlnnWddUj3Tk6Vb3DjH" Subject: Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Magnus Reftel , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RutuxB1WbGPvOIhlnnWddUj3Tk6Vb3DjH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/09/2014 01:12 PM, Magnus Reftel wrote: > This patch introduces the -seed command line option and the > QEMU_RAND_SEED environment variable for setting the random seed, which > is used for the AT_RANDOM ELF aux entry. >=20 > Signed-off-by: Magnus Reftel > --- > linux-user/elfload.c | 1 - > linux-user/main.c | 20 ++++++++++++++++++++ > 2 files changed, 20 insertions(+), 1 deletion(-) >=20 > =20 > +static void handle_arg_randseed(const char *arg) > +{ > + unsigned long long seed; > + char *end; > + > + if (parse_uint(arg, &seed, &end, 0) !=3D 0 || *end !=3D 0 || seed = > UINT_MAX) { Slightly shorter as: if (parse_uint_full(arg, &seed, 0) < 0 || seed > UINT_MAX) { but that's not a functional difference. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --RutuxB1WbGPvOIhlnnWddUj3Tk6Vb3DjH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUNv5dAAoJEKeha0olJ0Nq9X4H/3xrE7rXuRWum4dlyhJCGThK WxTc5WbRTwI4ddhN+NrFITTve0eQ13KS+rEDUEPu0JUvDpFrwAN/v1jLRwxpP42O we8ZM9UcQskSTSFPpIi5LfzuCE8tEjwwHCNIl3NASiEw9TPnoCDnMjoj34+7y2jw WEsvNi4Xni/+gfOgpmdEwYMrFM+5WJsQGPC5hvA6E+bVFq3by6eS1N9/KowbpINP M3Yd7pwN5/URcCrOrknIYG4Oi7FIE/+5kBMtIJvknUK6CkFUy70R+8O30bu2kZWR oaSugSpJF5MV61NfoTWSpg1ySTV8NDGemRp5SaqBb/6+4mKZuywMAMZY+krk4Ts= =fmcj -----END PGP SIGNATURE----- --RutuxB1WbGPvOIhlnnWddUj3Tk6Vb3DjH--