| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rnd.h,v 1.1 2011/12/19 21:53:52 apb Exp $ */ | | 1 | /* $NetBSD: rnd.h,v 1.2 2011/12/20 16:38:06 drochner Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1997,2011 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1997,2011 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Michael Graff <explorer@flame.org>. This code uses ideas and | | 8 | * by Michael Graff <explorer@flame.org>. This code uses ideas and |
9 | * algorithms from the Linux driver written by Ted Ts'o. | | 9 | * algorithms from the Linux driver written by Ted Ts'o. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -37,28 +37,26 @@ | | | @@ -37,28 +37,26 @@ |
37 | #include "opt_compat_netbsd.h" | | 37 | #include "opt_compat_netbsd.h" |
38 | #include "opt_compat_netbsd32.h" | | 38 | #include "opt_compat_netbsd32.h" |
39 | #endif | | 39 | #endif |
40 | | | 40 | |
41 | #include <sys/types.h> | | 41 | #include <sys/types.h> |
42 | #include <sys/ioctl.h> | | 42 | #include <sys/ioctl.h> |
43 | | | 43 | |
44 | #ifdef COMPAT_NETBSD32 | | 44 | #ifdef COMPAT_NETBSD32 |
45 | #include <compat/netbsd32/netbsd32.h> | | 45 | #include <compat/netbsd32/netbsd32.h> |
46 | #endif /* COMPAT_NETBSD32 */ | | 46 | #endif /* COMPAT_NETBSD32 */ |
47 | | | 47 | |
48 | #include <sys/rnd.h> | | 48 | #include <sys/rnd.h> |
49 | | | 49 | |
50 | #ifdef COMPAT_50 | | | |
51 | | | | |
52 | /* | | 50 | /* |
53 | * NetBSD-5 used "void *state" in the rndsource_t struct. rndsource_t | | 51 | * NetBSD-5 used "void *state" in the rndsource_t struct. rndsource_t |
54 | * was used in rnstat_t and rnstat_name_t, which were used by | | 52 | * was used in rnstat_t and rnstat_name_t, which were used by |
55 | * the NetBSD-5 RNDGETSRCNUM and RNDGETSRCNAME ioctls. | | 53 | * the NetBSD-5 RNDGETSRCNUM and RNDGETSRCNAME ioctls. |
56 | * | | 54 | * |
57 | */ | | 55 | */ |
58 | | | 56 | |
59 | /* Sanitized random source view for userspace. */ | | 57 | /* Sanitized random source view for userspace. */ |
60 | typedef struct { | | 58 | typedef struct { |
61 | char name[16]; /* device name */ | | 59 | char name[16]; /* device name */ |
62 | uint32_t unused_time; /* was: last time recorded */ | | 60 | uint32_t unused_time; /* was: last time recorded */ |
63 | uint32_t unused_delta; /* was: last delta value */ | | 61 | uint32_t unused_delta; /* was: last delta value */ |
64 | uint32_t unused_delta2; /* was: last delta2 value */ | | 62 | uint32_t unused_delta2; /* was: last delta2 value */ |
| @@ -139,16 +137,14 @@ typedef struct { | | | @@ -139,16 +137,14 @@ typedef struct { |
139 | */ | | 137 | */ |
140 | #ifdef _KERNEL | | 138 | #ifdef _KERNEL |
141 | int compat_50_rnd_ioctl(struct file *, u_long, void *); | | 139 | int compat_50_rnd_ioctl(struct file *, u_long, void *); |
142 | #endif | | 140 | #endif |
143 | | | 141 | |
144 | #define RNDGETSRCNUM50 _IOWR('R', 102, rndstat50_t) | | 142 | #define RNDGETSRCNUM50 _IOWR('R', 102, rndstat50_t) |
145 | #define RNDGETSRCNAME50 _IOWR('R', 103, rndstat_name50_t) | | 143 | #define RNDGETSRCNAME50 _IOWR('R', 103, rndstat_name50_t) |
146 | | | 144 | |
147 | #ifdef COMPAT_NETBSD32 | | 145 | #ifdef COMPAT_NETBSD32 |
148 | #define RNDGETSRCNUM50_32 _IOWR('R', 102, rndstat50_32_t) | | 146 | #define RNDGETSRCNUM50_32 _IOWR('R', 102, rndstat50_32_t) |
149 | #define RNDGETSRCNAME50_32 _IOWR('R', 103, rndstat_name50_32_t) | | 147 | #define RNDGETSRCNAME50_32 _IOWR('R', 103, rndstat_name50_32_t) |
150 | #endif /* COMPAT_NETBSD32 */ | | 148 | #endif /* COMPAT_NETBSD32 */ |
151 | | | 149 | |
152 | #endif /* COMPAT_50 */ | | | |
153 | | | | |
154 | #endif /* !_COMPAT_SYS_RND_H_ */ | | 150 | #endif /* !_COMPAT_SYS_RND_H_ */ |