Deleted Added
full compact
randomdev.c (62840) randomdev.c (63306)
1/*-
2 * Copyright (c) 2000 Mark R V Murray
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Mark R V Murray
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/random/randomdev.c 62840 2000-07-09 11:49:07Z markm $
26 * $FreeBSD: head/sys/dev/random/randomdev.c 63306 2000-07-17 12:23:04Z markm $
27 */
28
29#include <sys/param.h>
30#include <sys/queue.h>
31#include <sys/systm.h>
32#include <sys/conf.h>
33#include <sys/fcntl.h>
34#include <sys/uio.h>

--- 77 unchanged lines hidden (view full) ---

112 void *random_buf;
113
114 random_buf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
115 while (uio->uio_resid > 0) {
116 c = min(uio->uio_resid, PAGE_SIZE);
117 error = uiomove(random_buf, c, uio);
118 if (error)
119 break;
27 */
28
29#include <sys/param.h>
30#include <sys/queue.h>
31#include <sys/systm.h>
32#include <sys/conf.h>
33#include <sys/fcntl.h>
34#include <sys/uio.h>

--- 77 unchanged lines hidden (view full) ---

112 void *random_buf;
113
114 random_buf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
115 while (uio->uio_resid > 0) {
116 c = min(uio->uio_resid, PAGE_SIZE);
117 error = uiomove(random_buf, c, uio);
118 if (error)
119 break;
120 /* write_random(random_buf, c); */
120 write_random(random_buf, c);
121 }
122 free(random_buf, M_TEMP);
123 return error;
124}
125
126static int
127random_modevent(module_t mod, int type, void *data)
128{

--- 26 unchanged lines hidden ---
121 }
122 free(random_buf, M_TEMP);
123 return error;
124}
125
126static int
127random_modevent(module_t mod, int type, void *data)
128{

--- 26 unchanged lines hidden ---