@@ -10,14 +10,12 @@
* See the COPYING file in the top-level directory.
*/
+#include "qemu/rng-random.h"
#include "qemu/rng.h"
#include "qerror.h"
#include "main-loop.h"
-#define TYPE_RNG_RANDOM "rng-random"
-#define RNG_RANDOM(obj) OBJECT_CHECK(RndRandom, (obj), TYPE_RNG_RANDOM)
-
-typedef struct RndRandom
+struct RndRandom
{
RngBackend parent;
@@ -27,7 +25,7 @@ typedef struct RndRandom
EntropyReceiveFunc *receive_func;
void *opaque;
size_t size;
-} RndRandom;
+};
/**
* A simple and incomplete backend to request entropy from /dev/random.
new file mode 100644
@@ -0,0 +1,22 @@
+/*
+ * QEMU Random Number Generator Backend
+ *
+ * Copyright IBM, Corp. 2012
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef QEMU_RNG_RANDOM_H
+#define QEMU_RNG_RANDOM_H
+
+#include "qemu/object.h"
+
+#define TYPE_RNG_RANDOM "rng-random"
+#define RNG_RANDOM(obj) OBJECT_CHECK(RndRandom, (obj), TYPE_RNG_RANDOM)
+
+typedef struct RndRandom RndRandom;
+
+#endif
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- backends/rng-random.c | 8 +++----- include/qemu/rng-random.h | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 include/qemu/rng-random.h