i386_get_ioperm.c (111010) | i386_get_ioperm.c (124296) |
---|---|
1/*- 2 * Copyright (c) 1998 Jonathan Lemon 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Jonathan Lemon 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/lib/libc/i386/sys/i386_get_ioperm.c 111010 2003-02-16 17:29:11Z nectar $"); | 28__FBSDID("$FreeBSD: head/lib/libc/i386/sys/i386_get_ioperm.c 124296 2004-01-09 16:52:09Z nectar $"); |
29 30#include <machine/sysarch.h> 31 | 29 30#include <machine/sysarch.h> 31 |
32extern int sysarch(int op, char *parms); 33 | |
34int 35i386_get_ioperm(unsigned int start, unsigned int *length, int *enable) 36{ 37 struct i386_ioperm_args p; 38 int error; 39 40 p.start = start; 41 p.length = *length; 42 p.enable = *enable; 43 | 32int 33i386_get_ioperm(unsigned int start, unsigned int *length, int *enable) 34{ 35 struct i386_ioperm_args p; 36 int error; 37 38 p.start = start; 39 p.length = *length; 40 p.enable = *enable; 41 |
44 error = sysarch(I386_GET_IOPERM, (char *)&p); | 42 error = sysarch(I386_GET_IOPERM, &p); |
45 46 *length = p.length; 47 *enable = p.enable; 48 49 return (error); 50} | 43 44 *length = p.length; 45 *enable = p.enable; 46 47 return (error); 48} |