Deleted Added
full compact
linux_ioctl.c (72543) linux_ioctl.c (78161)
1/*
2 * Copyright (c) 1994-1995 S�ren Schmidt
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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*
2 * Copyright (c) 1994-1995 S�ren Schmidt
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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/compat/linux/linux_ioctl.c 72543 2001-02-16 16:40:43Z jlemon $
28 * $FreeBSD: head/sys/compat/linux/linux_ioctl.c 78161 2001-06-13 10:58:39Z peter $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/proc.h>
35#include <sys/cdio.h>
36#include <sys/consio.h>

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

1511 TAILQ_REMOVE(&handlers, he, list);
1512 FREE(he, M_LINUX);
1513 return (0);
1514 }
1515 }
1516
1517 return (EINVAL);
1518}
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/proc.h>
35#include <sys/cdio.h>
36#include <sys/consio.h>

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

1511 TAILQ_REMOVE(&handlers, he, list);
1512 FREE(he, M_LINUX);
1513 return (0);
1514 }
1515 }
1516
1517 return (EINVAL);
1518}
1519
1520int
1521linux_ioctl_register_handlers(struct linker_set *s)
1522{
1523 int error, i;
1524
1525 if (s == NULL)
1526 return (EINVAL);
1527
1528 for (i = 0; i < s->ls_length; i++) {
1529 error = linux_ioctl_register_handler(s->ls_items[i]);
1530 if (error)
1531 return (error);
1532 }
1533
1534 return (0);
1535}
1536
1537int
1538linux_ioctl_unregister_handlers(struct linker_set *s)
1539{
1540 int error, i;
1541
1542 if (s == NULL)
1543 return (EINVAL);
1544
1545 for (i = 0; i < s->ls_length; i++) {
1546 error = linux_ioctl_unregister_handler(s->ls_items[i]);
1547 if (error)
1548 return (error);
1549 }
1550
1551 return (0);
1552}