rng: rename RndRandom to RndRandom
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXQyV6AAoJEOsLTfxlfvZwItsQAL+n1rng8q7KVuMWwuy7yrmP YJwUKobZ40S5blXLFx1ayp5zFnyMn+bULsh1T5CaRTUz2ew2jVwVNavO1C7Pix5i dSz49durlSM/GW71O7c2IHBxyVljZMmmbWfz53iVqTwEz9VVTdF+0YTKi9M2WcIE cB0+7ebH/1qkgl9EieEvMUeDU5snLYPlte8kYMc10Fy/cgIayKNwieqdQ4eGWaWw jTlplBOzcX2cAWx4eYLSXpAL/RyFB6iCBVVE3Tt2xV/Ru7dvZfytZm5iuIcEbD0Q wKwMDWZQ90BQW4ieWwajqE0AoFsGKlF3aPMS3mvsx3saad9mPPr8uxr/KGVVtYDC 4/ieSTOQCNqfGzcD06x5zC47KQUEdcKITrZWFQ5/67DvfyGSeq04bpoJLvQx9GX/ NHFJRAhDAGiQ12B3Q49mgzGETsXfResOFs5b82VM2JV+LiOwgTKn4ALmXv55YO0r 37buSpb3z/d6lk1+i/7IOySNc4pTu/yL7NZhDmGeU+jYVsxFgb+4MXHuIMyc+F0/ aBBbrEr9heWWMUFNOmhs5wAskgp4r9g09VigroBGQvOglJHRfqXGJUMnPbEb86jh BtatJMJRtTShDnP+I6TGM5iNyS48rNgCe0q2VcLBPu4axI06/LJcnBbEbjz2+5Nb kJFTTRoW9GAhIjps8+Fi =9F8M -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/amit-virtio-rng/tags/rng-2.7-1' into staging rng: rename RndRandom to RndRandom # gpg: Signature made Mon 23 May 2016 16:44:58 BST using RSA key ID 657EF670 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit-virtio-rng/tags/rng-2.7-1: rng-random: rename RndRandom to RngRandom Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
b0f6ef8915
|
@ -17,7 +17,7 @@
|
|||
#include "qapi/qmp/qerror.h"
|
||||
#include "qemu/main-loop.h"
|
||||
|
||||
struct RndRandom
|
||||
struct RngRandom
|
||||
{
|
||||
RngBackend parent;
|
||||
|
||||
|
@ -34,7 +34,7 @@ struct RndRandom
|
|||
|
||||
static void entropy_available(void *opaque)
|
||||
{
|
||||
RndRandom *s = RNG_RANDOM(opaque);
|
||||
RngRandom *s = RNG_RANDOM(opaque);
|
||||
|
||||
while (!QSIMPLEQ_EMPTY(&s->parent.requests)) {
|
||||
RngRequest *req = QSIMPLEQ_FIRST(&s->parent.requests);
|
||||
|
@ -57,7 +57,7 @@ static void entropy_available(void *opaque)
|
|||
|
||||
static void rng_random_request_entropy(RngBackend *b, RngRequest *req)
|
||||
{
|
||||
RndRandom *s = RNG_RANDOM(b);
|
||||
RngRandom *s = RNG_RANDOM(b);
|
||||
|
||||
if (QSIMPLEQ_EMPTY(&s->parent.requests)) {
|
||||
/* If there are no pending requests yet, we need to
|
||||
|
@ -68,7 +68,7 @@ static void rng_random_request_entropy(RngBackend *b, RngRequest *req)
|
|||
|
||||
static void rng_random_opened(RngBackend *b, Error **errp)
|
||||
{
|
||||
RndRandom *s = RNG_RANDOM(b);
|
||||
RngRandom *s = RNG_RANDOM(b);
|
||||
|
||||
if (s->filename == NULL) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
|
||||
|
@ -83,7 +83,7 @@ static void rng_random_opened(RngBackend *b, Error **errp)
|
|||
|
||||
static char *rng_random_get_filename(Object *obj, Error **errp)
|
||||
{
|
||||
RndRandom *s = RNG_RANDOM(obj);
|
||||
RngRandom *s = RNG_RANDOM(obj);
|
||||
|
||||
return g_strdup(s->filename);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
|
|||
Error **errp)
|
||||
{
|
||||
RngBackend *b = RNG_BACKEND(obj);
|
||||
RndRandom *s = RNG_RANDOM(obj);
|
||||
RngRandom *s = RNG_RANDOM(obj);
|
||||
|
||||
if (b->opened) {
|
||||
error_setg(errp, QERR_PERMISSION_DENIED);
|
||||
|
@ -105,7 +105,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
|
|||
|
||||
static void rng_random_init(Object *obj)
|
||||
{
|
||||
RndRandom *s = RNG_RANDOM(obj);
|
||||
RngRandom *s = RNG_RANDOM(obj);
|
||||
|
||||
object_property_add_str(obj, "filename",
|
||||
rng_random_get_filename,
|
||||
|
@ -118,7 +118,7 @@ static void rng_random_init(Object *obj)
|
|||
|
||||
static void rng_random_finalize(Object *obj)
|
||||
{
|
||||
RndRandom *s = RNG_RANDOM(obj);
|
||||
RngRandom *s = RNG_RANDOM(obj);
|
||||
|
||||
if (s->fd != -1) {
|
||||
qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
|
||||
|
@ -139,7 +139,7 @@ static void rng_random_class_init(ObjectClass *klass, void *data)
|
|||
static const TypeInfo rng_random_info = {
|
||||
.name = TYPE_RNG_RANDOM,
|
||||
.parent = TYPE_RNG_BACKEND,
|
||||
.instance_size = sizeof(RndRandom),
|
||||
.instance_size = sizeof(RngRandom),
|
||||
.class_init = rng_random_class_init,
|
||||
.instance_init = rng_random_init,
|
||||
.instance_finalize = rng_random_finalize,
|
||||
|
|
|
@ -26,7 +26,7 @@ struct VirtIORNGConf {
|
|||
RngBackend *rng;
|
||||
uint64_t max_bytes;
|
||||
uint32_t period_ms;
|
||||
RndRandom *default_backend;
|
||||
RngRandom *default_backend;
|
||||
};
|
||||
|
||||
typedef struct VirtIORNG {
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_RNG_RANDOM "rng-random"
|
||||
#define RNG_RANDOM(obj) OBJECT_CHECK(RndRandom, (obj), TYPE_RNG_RANDOM)
|
||||
#define RNG_RANDOM(obj) OBJECT_CHECK(RngRandom, (obj), TYPE_RNG_RANDOM)
|
||||
|
||||
typedef struct RndRandom RndRandom;
|
||||
typedef struct RngRandom RngRandom;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue