summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2013-10-09 09:11:14 +0000
committerdes <des@FreeBSD.org>2013-10-09 09:11:14 +0000
commit9053fadebecd1b660c007b6d8a78efaa30df9c01 (patch)
tree93cf8b1740ba47f7d59551fba27e9584cf7bce39 /sys/dev/random
parent910e40a469b76eb7a0a7ab826835835a8e753047 (diff)
downloadFreeBSD-src-9053fadebecd1b660c007b6d8a78efaa30df9c01.zip
FreeBSD-src-9053fadebecd1b660c007b6d8a78efaa30df9c01.tar.gz
Add missing include guards and move the existing ones out of the
implementation namespace.
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/hash.h5
-rw-r--r--sys/dev/random/live_entropy_sources.h6
-rw-r--r--sys/dev/random/random_adaptors.h6
-rw-r--r--sys/dev/random/random_harvestq.h6
-rw-r--r--sys/dev/random/randomdev.h5
-rw-r--r--sys/dev/random/randomdev_soft.h5
-rw-r--r--sys/dev/random/rwfile.h5
-rw-r--r--sys/dev/random/yarrow.h5
8 files changed, 34 insertions, 9 deletions
diff --git a/sys/dev/random/hash.h b/sys/dev/random/hash.h
index 62f116d..4e6a4a0 100644
--- a/sys/dev/random/hash.h
+++ b/sys/dev/random/hash.h
@@ -26,6 +26,9 @@
* $FreeBSD$
*/
+#ifndef SYS_DEV_RANDOM_HASH_H_INCLUDED
+#define SYS_DEV_RANDOM_HASH_H_INCLUDED
+
#define KEYSIZE 32 /* (in bytes) == 256 bits */
#define BLOCKSIZE 16 /* (in bytes) == 128 bits */
@@ -43,3 +46,5 @@ void randomdev_hash_iterate(struct randomdev_hash *, void *, size_t);
void randomdev_hash_finish(struct randomdev_hash *, void *);
void randomdev_encrypt_init(struct randomdev_key *, void *);
void randomdev_encrypt(struct randomdev_key *context, void *, void *, unsigned);
+
+#endif
diff --git a/sys/dev/random/live_entropy_sources.h b/sys/dev/random/live_entropy_sources.h
index febb24a..9a23070 100644
--- a/sys/dev/random/live_entropy_sources.h
+++ b/sys/dev/random/live_entropy_sources.h
@@ -27,8 +27,8 @@
* $FreeBSD$
*/
-#ifndef __LIVE_ENTROPY_SOURCES__
-#define __LIVE_ENTROPY_SOURCES__
+#ifndef SYS_DEV_RANDOM_LIVE_ENTROPY_SOURCES_H_INCLUDED
+#define SYS_DEV_RANDOM_LIVE_ENTROPY_SOURCES_H_INCLUDED
/*
* Live entropy source is a source of entropy that can provide
@@ -57,4 +57,4 @@ void live_entropy_sources_feed(int, event_proc_f);
MODULE_VERSION(name, ver); \
MODULE_DEPEND(name, random, 1, 1, 1);
-#endif /* __LIVE_ENTROPY_SOURCES__ */
+#endif /* SYS_DEV_RANDOM_LIVE_ENTROPY_SOURCES_H_INCLUDED */
diff --git a/sys/dev/random/random_adaptors.h b/sys/dev/random/random_adaptors.h
index fb3d6e4..4765694 100644
--- a/sys/dev/random/random_adaptors.h
+++ b/sys/dev/random/random_adaptors.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __RANDOM_ADAPTORS_H__
-#define __RANDOM_ADAPTORS_H__
+#ifndef SYS_DEV_RANDOM_RANDOM_ADAPTORS_H_INCLUDED
+#define SYS_DEV_RANDOM_RANDOM_ADAPTORS_H_INCLUDED
#include <sys/eventhandler.h>
@@ -68,4 +68,4 @@ EVENTHANDLER_DECLARE(random_adaptor_attach, random_adaptor_attach_hook);
SYSCTL_DECL(_kern_random);
#endif /* SYSCTL_DECL */
-#endif /* __RANDOM_ADAPTORS_H__ */
+#endif /* SYS_DEV_RANDOM_RANDOM_ADAPTORS_H_INCLUDED */
diff --git a/sys/dev/random/random_harvestq.h b/sys/dev/random/random_harvestq.h
index f4e9bb1..a2ac3d1 100644
--- a/sys/dev/random/random_harvestq.h
+++ b/sys/dev/random/random_harvestq.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __RANDOM_HARVEST_H__
-#define __RANDOM_HARVEST_H__
+#ifndef SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED
+#define SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED
typedef void (*event_proc_f)(struct harvest *event);
@@ -39,4 +39,4 @@ void random_harvestq_internal(u_int64_t, const void *,
extern int random_kthread_control;
extern struct mtx harvest_mtx;
-#endif /* __RANDOM_HARVEST_H__ */
+#endif /* SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED */
diff --git a/sys/dev/random/randomdev.h b/sys/dev/random/randomdev.h
index a0e002f..5be595f 100644
--- a/sys/dev/random/randomdev.h
+++ b/sys/dev/random/randomdev.h
@@ -26,6 +26,9 @@
* $FreeBSD$
*/
+#ifndef SYS_DEV_RANDOM_RANDOMDEV_H_INCLUDED
+#define SYS_DEV_RANDOM_RANDOMDEV_H_INCLUDED
+
/* This header contains only those definitions that are global
* and non algorithm-specific for the entropy processor
*/
@@ -54,3 +57,5 @@ struct random_hardware_source {
enum esource source;
random_read_func_t *read;
};
+
+#endif
diff --git a/sys/dev/random/randomdev_soft.h b/sys/dev/random/randomdev_soft.h
index 7a2b62e..cbee779 100644
--- a/sys/dev/random/randomdev_soft.h
+++ b/sys/dev/random/randomdev_soft.h
@@ -26,6 +26,9 @@
* $FreeBSD$
*/
+#ifndef SYS_DEV_RANDOM_RANDOMDEV_SOFT_H_INCLUDED
+#define SYS_DEV_RANDOM_RANDOMDEV_SOFT_H_INCLUDED
+
/* This header contains only those definitions that are global
* and harvester-specific for the entropy processor
*/
@@ -79,3 +82,5 @@ random_check_uint_##name(SYSCTL_HANDLER_ARGS) \
return (sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, \
req)); \
}
+
+#endif
diff --git a/sys/dev/random/rwfile.h b/sys/dev/random/rwfile.h
index 39aba04..22ac06d 100644
--- a/sys/dev/random/rwfile.h
+++ b/sys/dev/random/rwfile.h
@@ -26,5 +26,10 @@
* $FreeBSD$
*/
+#ifndef SYS_DEV_RANDOM_RWFILE_H_INCLUDED
+#define SYS_DEV_RANDOM_RWFILE_H_INCLUDED
+
int randomdev_read_file(const char *filename, void *buf, size_t);
int randomdev_write_file(const char *filename, void *buf, size_t);
+
+#endif
diff --git a/sys/dev/random/yarrow.h b/sys/dev/random/yarrow.h
index 0bde5b5..f32313e 100644
--- a/sys/dev/random/yarrow.h
+++ b/sys/dev/random/yarrow.h
@@ -26,7 +26,12 @@
* $FreeBSD$
*/
+#ifndef SYS_DEV_RANDOM_YARROW_H_INCLUDED
+#define SYS_DEV_RANDOM_YARROW_H_INCLUDED
+
void random_yarrow_init_alg(struct sysctl_ctx_list *);
void random_yarrow_deinit_alg(void);
int random_yarrow_read(void *, int);
void random_yarrow_reseed(void);
+
+#endif
OpenPOWER on IntegriCloud