aboutsummaryrefslogtreecommitdiff
path: root/term/ptyio.c
Commit message (Collapse)AuthorAgeFilesLines
* 2002-06-25 Roland McGrath <roland@frob.com>Roland McGrath2002-06-261-1/+2
| | | | | | | | | * term.h (struct bottomhalf): New member `fini'. * hurdio.c (hurdio_fini): New function. (hurdio_bottom): Use it. * devio.c (devio_fini): New function. (devio_bottom): Use it. * ptyio.c (ptyio_bottom): Add 0 entry for `fini'.
* 2002-06-25 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-06-251-0/+1
| | | | | | | | | | | | * term.h (struct bottomhalf): New member GWINSZ. * devio.c (devio_bottom): Add new member. * ptyio.c (ptyio_bottom): Likewise. * hurdio.c (hurdio_bottom): Likewise. (hurdio_gwinsz): New function. (tioc_caps): Change type to unsigned int. (TIOC_CAP_GWINSZ): New symbol. * users.c (open_hook): Call GWINSZ of bottom layer after establishing the carrier.
* 2002-06-13 Roland McGrath <roland@frob.com>Roland McGrath2002-06-131-28/+28
| | | | | | | | | | * ptyio.c (pty_io_readable): int -> size_t in argument type. * term.h: Update decl. * users.c (trivfs_S_io_write): int -> size_t in AMT argument type. (trivfs_S_io_readable): Likewise. (trivfs_S_io_read): Likewise. Also u_int -> size_t, off_t -> loff_t. (trivfs_S_io_write): Likewise. (trivfs_S_io_map): Add reply port args.
* 2002-03-05 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-03-051-1/+1
| | | | | | | | | | | | * main.c (main): Use memset instead bzero. Fix error message, and formatting of some comments. * ptyio.c (pty_io_read): Use memcpy instead bcopy. * users.c (S_tioctl_tiocflush): Ignore error by bottom handler's notice_input_flushed. * users.c (set_state): Likewise. If bottom handler's set_bits fails, don't adjust terminal state but return success anyway.
* 2002-02-10 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-02-101-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * term.h: Include `hurd/hurd_types.h'. (struct bottomhalf): Change the return types of the following members from void to error_t: abandon_physical_output, suspend_physical_output, notice_input_flushed, desert_dtr, set_break, clear_break, start_output, set_bits (which now takes an struct termios * as argument), mdmctl and mdmstate (which now takes an int * as argument). Add new members init and type. (bottom): Define as const. (devio_bottom, ptyio_bottom): Declare as const. (drop_output): Change return type from void to error_t. (ptyio_init): Remove prototype. * devio.c (devio_abandon_physical_output): Change return value to error_t, and return 0. (devio_suspend_physical_output): Likewise. (devio_notice_input_flushed): Likewise. (devio_desert_dtr): Likewise. (devio_set_break): Likewise. (devio_clear_break): Likewise. (devio_start_output): Likewise. (devio_set_bits): Likewise. (devio_mdmctl): Likewise. (devio_mdmstate): Likewise. (init_devio): Rename to ... (devio_init): ... this. Do not give constructor attribute. Change return type to error_t, and return an error value, rather than bailing out. Declare as static. (devio_bottom): Add type TERM_ON_MACHDEV and init function devio_init. (devio_set_bits): Accept new argument STATE and use that to work out the terminal state, rather than changing the global termstate. (devio_mdmstate): Accept new argument STATE and use that to return the bits. * ptyio.c: Do not include `hurd/hurd_types.h'. (ptyio_suspend_physical_output): Change return value to error_t, and return 0. Likewise. (ptyio_notice_input_flushed): Likewise. (ptyio_desert_dtr): Likewise. (ptyio_set_bits): Likewise. (ptyio_set_break): Likewise. (ptyio_clear_break): Likewise. (ptyio_mdmctl): Likewise. (ptyio_start_output): Likewise. (ptyio_abandon_physical_output): Likewise. (ptyio_mdmstate): Likewise, and accept new argument STATE. (ptyio_init): Declare as static and change return type to error_t. (ptyio_bottom): Add type TERM_ON_MASTERPTY and init function ptyio_init. (ptyio_set_bits): Accept new argument STATE and use that to work out the terminal state, rather than changing the global termstate. (ptyio_mdmstate): Accept new argument STATE and use that to return the bits. * munge.c (drop_output): Change return value to error_t. Only clear queue if there was no error. * users.c (S_term_get_bottom_type): Just return bottom->type. (set_state): Rework logic to take possible errors into account, and to delay changing the termstate until we know that we won't fail. (S_tioctl_tiocflush): Return errors properly, and clear queue only if notice_input_flushed succeeded. (open_hook): Save error value of set_bits. Save old termflags and restore them if if set_bits failed. Call set_bits with correct arguments. (S_tioctl_tiocmods): Set err to result of mdmctl. (S_tioctl_tiocmset): Likewise. (S_tioctl_tiocmbic): Likewise. (S_tioctl_tiocmbis): Likewise. (S_tioctl_tioccdtr): Likewise. (S_tioctl_tiocsdtr): Likewise. (S_tioctl_tioccbrk): Likewise for clear_break. (S_tioctl_tiocsbrk): Likewise for set_break. (S_tioctl_tiocstart): Likewise for start_output. Save old termflags and restore them if if start_output failed. (S_tioctl_tiocstop): Likewise for stop_output. (S_trivfs_io_write): Abort the operation if start_output fails. Do not call start_output if it just failed, or if there was no data to be written. * main.c (main): Initialize bottom handler (rather than special casing this for ptyio). * users.c (open_hook): Use memcpy instead bcopy and memset instead bzero. (S_tioctl_tiocgeta): Likewise. (set_state): Likewise. (open_hook): Likewise. * munge.c (rescan_inputq): Likewise.
* term/Marcus Brinkmann2002-01-301-1/+1
| | | | | | | | | | | | | 2002-01-30 Marcus Brinkmann <marcus@gnu.org> * users.c (trivfs_S_io_select): Remove IDTAG argument. Also in invocation of pty_io_select. * ptyio.c (pty_io_select): Likewise. pfinet/ 2002-01-30 Marcus Brinkmann <marcus@gnu.org> * tunnel.c (trivfs_S_io_select): Remove IDTAG argument.
* 1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-111-2/+2
| | | | | * ptyio.c (pty_io_read): Use mmap instead of vm_allocate. * users.c (trivfs_S_io_read): Likewise.
* Mon Nov 18 18:16:29 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-181-2/+1
| | | | | | | | | | | | | | | | * users.c (trivfs_modify_stat): Omit pointless assignment. Fri Nov 15 17:37:12 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * users.c (open_hook): New arg syntax. (trivfs_check_open_hook): Likewise. * ptyio.c (pty_open_hook): Likewise. * term.h (pty_open_hook): Likewise. * users.c (S_termctty_open_terminal): New syntax of trivfs_open. * users.c (trivfs_S_file_chown): Rewrite using idvecs. (trivfs_S_file_chmod): Likewise.
* Thu Sep 26 14:24:16 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-10-081-0/+1
| | | | * ptyio.c: Include "tioctl_S.h".
* (pty_open_hook): Re-initialize EXTERNAL_PROCESSING too.Miles Bader1996-10-041-0/+3
|
* (pty_open_hook): Reinitialize pty variables.Miles Bader1996-10-041-1/+9
| | | | | (pty_io_select): Return SELECT_READ if the slave isn't open. (pty_io_read): If the slave isn't open, return EOF.
* (pty_io_read, pty_io_write): Honor O_NONBLOCK.Miles Bader1996-10-041-1/+13
|
* (ptyio_set_bits):Miles Bader1996-10-021-8/+15
| | | | | We need only be in packet mode to send TIOCPKT_NOSTOP & TIOCPKT_DOSTOP, regardless of the value of EXTERNAL_PROCESSING.
* (S_tioctl_tiocsig, S_tioctl_tiocucntl, S_tioctl_tiocpkt):Miles Bader1996-10-021-0/+15
| | | | Hold GLOBAL_LOCK while frobbing (especially around send_signal).
* blat foopMichael I. Bushnell1996-04-251-31/+0
|
* fixupMichael I. Bushnell1996-04-251-2/+2
|
* (pty_open_hook): Don't do increment of nptyperopens here.Michael I. Bushnell1996-04-251-2/+44
| | | | | | | (pty_po_create_hook): Increment nptyperopens here, but only if this is for O_READ or O_WRITE. (pty_po_destroy_hook): Only do decrement if this was for O_READ or O_WRITE.
* (pty_po_create_hook): Don't do anything here.Michael I. Bushnell1996-04-021-3/+1
| | | | (pty_open_hook): Increment nptyperopens here.
* (pty_io_read): Block using hurd_condition_wait instead of condition_wait.Miles Bader1996-03-271-1/+5
|
* (ptyio_init): This can't be a constructor because it frobs INPUTQ, which isMiles Bader1996-02-241-4/+2
| | | | assigned in main.
* (pty_io_select): Add new reply port parameter, and askMichael I. Bushnell1996-01-181-3/+4
| | | | for notification if it dies.
* (ptyopen, nptyperopens, pktnostop, output_stopped): Initialize to 0.Miles Bader1995-12-211-4/+4
|
* (pty_io_read): When copying TIOCPKT_DATA; account for size correctly.Michael I. Bushnell1995-12-141-1/+4
|
* (pty_io_write): Always tell the user everything was written.Michael I. Bushnell1995-12-141-0/+4
|
* Typos.Michael I. Bushnell1995-12-121-3/+3
|
* (ptyio_init): Make this a constructor function.Michael I. Bushnell1995-12-121-0/+1
|
* (pty_po_create_hook, pty_po_destroy_hook): New functions.Michael I. Bushnell1995-12-121-2/+31
| | | | (ptyopen, nptyperopens): New variables.
* (pty_open_hook): New function.Michael I. Bushnell1995-12-121-0/+20
|
* Include <fcntl.h>.Michael I. Bushnell1995-12-051-0/+1
|
* (pty_io_read, pty_io_write): Validate CRED.Michael I. Bushnell1995-12-051-4/+10
|
* (pty_io_select): Add arg CRED.Michael I. Bushnell1995-12-051-1/+4
|
* (pty_io_write): Add CRED arg.Michael I. Bushnell1995-12-051-1/+4
|
* (pty_io_read): Add CRED arg.Michael I. Bushnell1995-12-051-1/+4
|
* unistd.h, not termios.h.Michael I. Bushnell1995-12-051-1/+1
|
* Include <termios.h>.Michael I. Bushnell1995-12-051-0/+1
|
* (ptyio_set_bits): If the stop char state has changed, dinkle the stopMichael I. Bushnell1995-12-051-0/+21
| | | | bits in the control_byte accordingly.
* Initial revisionMichael I. Bushnell1995-12-051-0/+473