summaryrefslogtreecommitdiffstats
path: root/backends/rng-egd.c
Commit message (Collapse)AuthorAgeFilesLines
* qerror: Clean up QERR_ macros to expand into a single stringMarkus Armbruster2015-06-221-4/+4
| | | | | | | | | | | | | | | | | | | | | These macros expand into error class enumeration constant, comma, string. Unclean. Has been that way since commit 13f59ae. The error class is always ERROR_CLASS_GENERIC_ERROR since the previous commit. Clean up as follows: * Prepend every use of a QERR_ macro by ERROR_CLASS_GENERIC_ERROR, and delete it from the QERR_ macro. No change after preprocessing. * Rewrite error_set(ERROR_CLASS_GENERIC_ERROR, ...) into error_setg(...). Again, no change after preprocessing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
* qerror: Eliminate QERR_DEVICE_NOT_FOUNDMarkus Armbruster2015-06-221-1/+2
| | | | | | | | | | | | | | | | | | Error classes other than ERROR_CLASS_GENERIC_ERROR should not be used in new code. Hiding them in QERR_ macros makes new uses hard to spot. Fortunately, there's just one such macro left. Eliminate it with this coccinelle semantic patch: @@ expression EP, E; @@ -error_set(EP, QERR_DEVICE_NOT_FOUND, E) +error_set(EP, ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found", E) Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
* Revert "rng-egd: remove redundant free"Eduardo Habkost2014-09-181-0/+1
| | | | | | | | | This reverts commit 5e490b6a504912225dff0e520e1c6af68295d238. Cc: qemu-stable@nongnu.org Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* rng-egd: offset the point when repeatedly read from the bufferAmos Kong2013-11-211-1/+3
| | | | | | | | | | | The buffer content might be read out more than once, currently we just repeatedly read the first data block, buffer offset is missing. Cc: qemu-stable@nongnu.org Signed-off-by: Amos Kong <akong@redhat.com> Message-id: 1385023371-8198-3-git-send-email-akong@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
* rng-egd: remove redundant freeAmos Kong2013-11-211-1/+0
| | | | | | | | We didn't set default chr_name, the free is redundant. Signed-off-by: Amos Kong <akong@redhat.com> Message-id: 1385023371-8198-2-git-send-email-akong@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
* sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-151-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-char: Call fe_claim / fe_release when not using qdev chr propertiesHans de Goede2013-04-041-0/+6
| | | | | | | | | | | | | | | | | | chardev-frontends need to explictly check, increase and decrement the avail_connections "property" of the chardev when they are not using a qdev-chardev-property for the chardev. This fixes things like: qemu-kvm -chardev stdio,id=foo -device isa-serial,chardev=foo \ -mon chardev=foo Working, where they should fail. Most of the changes here are due to old hardware emulation code which is using serial_hds directly rather then a qdev-chardev-property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364412581-3672-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make all static TypeInfos constAndreas Färber2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* softmmu: move remaining include files to include/ subdirectoriesPaolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: move include files to include/qobject/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* rng-egd: don't use gslist_free_fullAnthony Liguori2012-11-161-5/+14
| | | | | | This function was only introduced in glib 2.28.0. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rng-egd: introduce EGD compliant RNG backendAnthony Liguori2012-11-161-0/+215
This backend talks EGD to a CharDriverState. A typical way to invoke this would be: qemu -chardev socket,host=localhost,port=1024,id=chr0 \ -object rng-egd,chardev=chr0,id=egd0 \ -device virtio-rng-pci,rng=egd0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud