diff options
author | Wei Jiangang <weijg.fnst@cn.fujitsu.com> | 2016-04-15 09:36:08 +0800 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2016-05-23 12:18:43 +0530 |
commit | cde63615343fb241f4044e6471e6e25be78574c8 (patch) | |
tree | fcece68d2d843928ddd9fffb28f18431e3ddb27c /backends | |
parent | 65603e2fc18b48e6e55a3dd693669413141694ec (diff) | |
download | qemu-cde63615343fb241f4044e6471e6e25be78574c8.tar.gz qemu-cde63615343fb241f4044e6471e6e25be78574c8.tar.bz2 qemu-cde63615343fb241f4044e6471e6e25be78574c8.zip |
rng-random: rename RndRandom to RngRandom
Usually, Random Number Generator is abbreviated to RNG/rng.
so replacing RndRandom with RngRandom seems more reasonable
and keep consistent with RngBackend.
Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Reviewed-by: Pankaj Gupta <pagupta@redhat.com>
Message-Id: <1460684168-5403-1-git-send-email-weijg.fnst@cn.fujitsu.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/rng-random.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/backends/rng-random.c b/backends/rng-random.c index 2e44e25190..e2a49b0571 100644 --- a/backends/rng-random.c +++ b/backends/rng-random.c @@ -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, |