« Previous | Next » 

Revision 513b8c74

ID513b8c74c4c899cd940a79131e76c5568aa11381

Added by Paolo Bonzini about 10 years ago

rng: initialize file descriptor to -1

The file descriptor is never initialized to -1, which makes rng-random
close stdin if an object is created and immediately destroyed. If we
change it to -1, we also need to protect qemu_set_fd_handler from
receiving a bogus file descriptor.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Igor Mammedov <>
Tested-by: Igor Mammedov <>
Signed-off-by: Luiz Capitulino <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences