null.c (103745) | null.c (109623) |
---|---|
1/*- 2 * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen 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 & Jeroen C. van Gelderen 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/null/null.c 103745 2002-09-21 17:28:17Z markm $ | 26 * $FreeBSD: head/sys/dev/null/null.c 109623 2003-01-21 08:56:16Z alfred $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/conf.h> 32#include <sys/uio.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> --- 87 unchanged lines hidden (view full) --- 122 123static int 124null_modevent(module_t mod, int type, void *data) 125{ 126 switch(type) { 127 case MOD_LOAD: 128 if (bootverbose) 129 printf("null: <null device, zero device>\n"); | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/conf.h> 32#include <sys/uio.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> --- 87 unchanged lines hidden (view full) --- 122 123static int 124null_modevent(module_t mod, int type, void *data) 125{ 126 switch(type) { 127 case MOD_LOAD: 128 if (bootverbose) 129 printf("null: <null device, zero device>\n"); |
130 zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO); | 130 zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_ZERO); |
131 zero_dev = make_dev(&zero_cdevsw, ZERO_MINOR, UID_ROOT, 132 GID_WHEEL, 0666, "zero"); 133 null_dev = make_dev(&null_cdevsw, NULL_MINOR, UID_ROOT, 134 GID_WHEEL, 0666, "null"); 135 return 0; 136 137 case MOD_UNLOAD: 138 destroy_dev(null_dev); --- 13 unchanged lines hidden --- | 131 zero_dev = make_dev(&zero_cdevsw, ZERO_MINOR, UID_ROOT, 132 GID_WHEEL, 0666, "zero"); 133 null_dev = make_dev(&null_cdevsw, NULL_MINOR, UID_ROOT, 134 GID_WHEEL, 0666, "null"); 135 return 0; 136 137 case MOD_UNLOAD: 138 destroy_dev(null_dev); --- 13 unchanged lines hidden --- |