Deleted Added
full compact
tty.c (199998) tty.c (201223)
1/*-
2 * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Portions of this software were developed under sponsorship from Snow
6 * B.V., the Netherlands.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Portions of this software were developed under sponsorship from Snow
6 * B.V., the Netherlands.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/kern/tty.c 199998 2009-12-01 19:14:57Z ed $");
31__FBSDID("$FreeBSD: head/sys/kern/tty.c 201223 2009-12-29 21:51:28Z rnoland $");
32
33#include "opt_compat.h"
34
35#include <sys/param.h>
36#include <sys/conf.h>
37#include <sys/cons.h>
38#include <sys/fcntl.h>
39#include <sys/file.h>

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

598 }
599
600 tty_unlock(tp);
601
602 return (revents);
603}
604
605static int
32
33#include "opt_compat.h"
34
35#include <sys/param.h>
36#include <sys/conf.h>
37#include <sys/cons.h>
38#include <sys/fcntl.h>
39#include <sys/file.h>

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

598 }
599
600 tty_unlock(tp);
601
602 return (revents);
603}
604
605static int
606ttydev_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
606ttydev_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
607 int nprot, vm_memattr_t *memattr)
607{
608 struct tty *tp = dev->si_drv1;
609 int error;
610
611 /* Handle mmap() through the driver. */
612
613 error = ttydev_enter(tp);
614 if (error)
615 return (-1);
608{
609 struct tty *tp = dev->si_drv1;
610 int error;
611
612 /* Handle mmap() through the driver. */
613
614 error = ttydev_enter(tp);
615 if (error)
616 return (-1);
616 error = ttydevsw_mmap(tp, offset, paddr, nprot);
617 error = ttydevsw_mmap(tp, offset, paddr, nprot, memattr);
617 tty_unlock(tp);
618
619 return (error);
620}
621
622/*
623 * kqueue support.
624 */

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

900ttydevsw_defmodem(struct tty *tp, int sigon, int sigoff)
901{
902
903 /* Simulate a carrier to make the TTY layer happy. */
904 return (SER_DCD);
905}
906
907static int
618 tty_unlock(tp);
619
620 return (error);
621}
622
623/*
624 * kqueue support.
625 */

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

901ttydevsw_defmodem(struct tty *tp, int sigon, int sigoff)
902{
903
904 /* Simulate a carrier to make the TTY layer happy. */
905 return (SER_DCD);
906}
907
908static int
908ttydevsw_defmmap(struct tty *tp, vm_offset_t offset, vm_paddr_t *paddr,
909 int nprot)
909ttydevsw_defmmap(struct tty *tp, vm_ooffset_t offset, vm_paddr_t *paddr,
910 int nprot, vm_memattr_t *memattr)
910{
911
912 return (-1);
913}
914
915static void
916ttydevsw_defpktnotify(struct tty *tp, char event)
917{

--- 1240 unchanged lines hidden ---
911{
912
913 return (-1);
914}
915
916static void
917ttydevsw_defpktnotify(struct tty *tp, char event)
918{

--- 1240 unchanged lines hidden ---