[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
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. Signed-off-by: Magnus Reftel Reviewed-by: Eric Blake --- linux-user/elfload.c | 1 - linux-user/main.c| 19 +++

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Eric Blake
On 10/14/2014 03:50 AM, 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. > > Signed-off-by: Magnus Reftel > --- > linux-user/elfload.c | 1 - > l

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
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. Signed-off-by: Magnus Reftel --- linux-user/elfload.c | 1 - linux-user/main.c| 19 +++ 2 files changed

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-14 Thread Magnus Reftel
On Fri, Oct 10, 2014 at 6:20 PM, Eric Blake wrote: > On 10/10/2014 02:16 AM, Magnus Reftel wrote: >> On Thu, Oct 9, 2014 at 11:30 PM, Eric Blake wrote: >>> On 10/09/2014 01:12 PM, Magnus Reftel wrote: +if (parse_uint(arg, &seed, &end, 0) != 0 || *end != 0 || seed > UINT_MAX) { >>>

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-10 Thread Eric Blake
On 10/10/2014 02:16 AM, Magnus Reftel wrote: > On Thu, Oct 9, 2014 at 11:30 PM, Eric Blake wrote: >> On 10/09/2014 01:12 PM, Magnus Reftel wrote: >>> +if (parse_uint(arg, &seed, &end, 0) != 0 || *end != 0 || seed > >>> UINT_MAX) { >> >> Slightly shorter as: >> >> if (parse_uint_full(arg, &see

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-10 Thread Magnus Reftel
On Thu, Oct 9, 2014 at 11:30 PM, Eric Blake wrote: > On 10/09/2014 01:12 PM, Magnus Reftel wrote: >> +if (parse_uint(arg, &seed, &end, 0) != 0 || *end != 0 || seed > >> UINT_MAX) { > > Slightly shorter as: > > if (parse_uint_full(arg, &seed, 0) < 0 || seed > UINT_MAX) { > > but that's not a f

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Eric Blake
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. > > Signed-off-by: Magnus Reftel > --- > linux-user/elfload.c | 1 - > l

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
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. Signed-off-by: Magnus Reftel --- linux-user/elfload.c | 1 - linux-user/main.c| 20 2 files change

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
Hi, Thank you for your patience! I will send a third version. On Thu, Oct 9, 2014 at 5:27 PM, Eric Blake wrote: > On 10/09/2014 02:36 AM, Magnus Reftel wrote: >> +char* end; > Style: we prefer: > char *end; Done. >> +if (end==arg || *end!='\0' || seed > UINT_MAX) { > Style: spaces arou

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Eric Blake
On 10/09/2014 02:36 AM, 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. > > Signed-off-by: Magnus Reftel > --- > > +static void handle_arg_rand

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-09 Thread Magnus Reftel
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. Signed-off-by: Magnus Reftel --- linux-user/elfload.c | 1 - linux-user/main.c| 20 2 files change

Re: [Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-08 Thread Eric Blake
On 10/08/2014 06:13 AM, 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. > > Signed-off-by: Magnus Reftel > --- > linux-user/elfload.c | 1 - > l

[Qemu-devel] [PATCH] linux-user: Let user specify random seed

2014-10-08 Thread Magnus Reftel
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. Signed-off-by: Magnus Reftel --- linux-user/elfload.c | 1 - linux-user/main.c| 21 + 2 files chang