tty.c (11e9b8bad115cf9799076d3add8824862b038563) | tty.c (e76d823b81edf1f8bcbdbe1143d2c0030c8bc299) |
---|---|
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 --- 621 unchanged lines hidden (view full) --- 630 kn->kn_flags |= EV_EOF; 631 return (1); 632 } else { 633 kn->kn_data = ttydisc_write_poll(tp); 634 return (kn->kn_data > 0); 635 } 636} 637 | 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 --- 621 unchanged lines hidden (view full) --- 630 kn->kn_flags |= EV_EOF; 631 return (1); 632 } else { 633 kn->kn_data = ttydisc_write_poll(tp); 634 return (kn->kn_data > 0); 635 } 636} 637 |
638static struct filterops tty_kqops_read = 639 { 1, NULL, tty_kqops_read_detach, tty_kqops_read_event }; 640static struct filterops tty_kqops_write = 641 { 1, NULL, tty_kqops_write_detach, tty_kqops_write_event }; | 638static struct filterops tty_kqops_read = { 639 .f_isfd = 1, 640 .f_detach = tty_kqops_read_detach, 641 .f_event = tty_kqops_read_event, 642}; 643static struct filterops tty_kqops_write = { 644 .f_isfd = 1, 645 .f_detach = tty_kqops_write_detach, 646 .f_event = tty_kqops_write_event, 647}; |
642 643static int 644ttydev_kqfilter(struct cdev *dev, struct knote *kn) 645{ 646 struct tty *tp = dev->si_drv1; 647 int error; 648 649 error = ttydev_enter(tp); --- 1449 unchanged lines hidden --- | 648 649static int 650ttydev_kqfilter(struct cdev *dev, struct knote *kn) 651{ 652 struct tty *tp = dev->si_drv1; 653 int error; 654 655 error = ttydev_enter(tp); --- 1449 unchanged lines hidden --- |