summaryrefslogtreecommitdiff
path: root/term/ptyio.c
AgeCommit message (Collapse)Author
2002-06-252002-06-25 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* 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-132002-06-13 Roland McGrath <roland@frob.com>Roland McGrath
* 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-052002-03-05 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* 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-102002-02-10 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* 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.
2002-01-30term/Marcus Brinkmann
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-111999-07-09 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* ptyio.c (pty_io_read): Use mmap instead of vm_allocate. * users.c (trivfs_S_io_read): Likewise.
1996-11-18Mon Nov 18 18:16:29 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* 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.
1996-10-08Thu Sep 26 14:24:16 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* ptyio.c: Include "tioctl_S.h".
1996-10-04(pty_open_hook): Re-initialize EXTERNAL_PROCESSING too.Miles Bader
1996-10-04(pty_open_hook): Reinitialize pty variables.Miles Bader
(pty_io_select): Return SELECT_READ if the slave isn't open. (pty_io_read): If the slave isn't open, return EOF.
1996-10-04(pty_io_read, pty_io_write): Honor O_NONBLOCK.Miles Bader
1996-10-02(ptyio_set_bits):Miles Bader
We need only be in packet mode to send TIOCPKT_NOSTOP & TIOCPKT_DOSTOP, regardless of the value of EXTERNAL_PROCESSING.
1996-10-02(S_tioctl_tiocsig, S_tioctl_tiocucntl, S_tioctl_tiocpkt):Miles Bader
Hold GLOBAL_LOCK while frobbing (especially around send_signal).
1996-04-25blat foopMichael I. Bushnell
1996-04-25fixupMichael I. Bushnell
1996-04-25(pty_open_hook): Don't do increment of nptyperopens here.Michael I. Bushnell
(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.
1996-04-02(pty_po_create_hook): Don't do anything here.Michael I. Bushnell
(pty_open_hook): Increment nptyperopens here.
1996-03-27(pty_io_read): Block using hurd_condition_wait instead of condition_wait.Miles Bader
1996-02-24(ptyio_init): This can't be a constructor because it frobs INPUTQ, which isMiles Bader
assigned in main.
1996-01-18(pty_io_select): Add new reply port parameter, and askMichael I. Bushnell
for notification if it dies.
1995-12-21(ptyopen, nptyperopens, pktnostop, output_stopped): Initialize to 0.Miles Bader
1995-12-14(pty_io_read): When copying TIOCPKT_DATA; account for size correctly.Michael I. Bushnell
1995-12-14(pty_io_write): Always tell the user everything was written.Michael I. Bushnell
1995-12-12Typos.Michael I. Bushnell
1995-12-12(ptyio_init): Make this a constructor function.Michael I. Bushnell
1995-12-12(pty_po_create_hook, pty_po_destroy_hook): New functions.Michael I. Bushnell
(ptyopen, nptyperopens): New variables.
1995-12-12(pty_open_hook): New function.Michael I. Bushnell
1995-12-05Include <fcntl.h>.Michael I. Bushnell
1995-12-05(pty_io_read, pty_io_write): Validate CRED.Michael I. Bushnell
1995-12-05(pty_io_select): Add arg CRED.Michael I. Bushnell
1995-12-05(pty_io_write): Add CRED arg.Michael I. Bushnell
1995-12-05(pty_io_read): Add CRED arg.Michael I. Bushnell
1995-12-05unistd.h, not termios.h.Michael I. Bushnell
1995-12-05Include <termios.h>.Michael I. Bushnell
1995-12-05(ptyio_set_bits): If the stop char state has changed, dinkle the stopMichael I. Bushnell
bits in the control_byte accordingly.
1995-12-05Initial revisionMichael I. Bushnell