summaryrefslogtreecommitdiff
path: root/term/devio.c
AgeCommit message (Collapse)Author
2002-05-282002-05-28 Roland McGrath <roland@frob.com>Roland McGrath
* devio.c (device_open_reply): int -> size_t (devio_set_bits, devio_mdmctl, devio_mdmstate): Likewise.
2002-02-102002-02-10 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* main.c: Include `argp.h' and `version.h'. (argp_program_version): New global variable. (tty_name, tty_type, tty_arg): Likewise. (parse_opt): New function. (term_argp): New global variable. (main): Call argp_parse, use new global variables to parse the options. Remove TYPE variable. Get the bootstrap port after checking the argument line. * term.h (pterm_name): Remove variable. (tty_arg): Declare variable. * devio.c (initial_open): Use tty_arg instead pterm_name. (devio_assert_dtr): Likewise.
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-042002-01-04 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* devio.c (bogus_speed_to_real_speed): Handle B57600, B115200 if they are defined. Reported by Diego Roversi <diegor@tiscalinet.it>.
2001-10-142001-10-14 Roland McGrath <roland@frob.com>Roland McGrath
* devio.c (real_speed_to_bogus_speed): Handle B57600, B115200 if they are defined. Reported by Diego Roversi <diegor@tiscalinet.it>.
2000-03-172000-03-17 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* devio.c (devio_abandon_physical_output): Use ports_get_send_right. (initial_open): Use ports_get_send_right. (device_open_reply): Use ports_get_send_right.
1999-10-041999-10-04 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* term.h, devio.c, users.c: Revert previous change. Do it this way instead: * users.c (report_carrier_error): New function. (carrier_error): New static global variable. (open_hook): Deal with errors from carrier open. * devio.c (device_open_reply): Move the !RETURNCODE case out of the "initial open" case and use report_carrier_error. * term.h (report_carrier_error): Declare new function.
1999-10-011999-10-01 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* term.h (NO_DEVICE): New macro, bit for termflags. (termflags): Change type to uint_fast32_t. * devio.c (device_open_reply): For D_NO_SUCH_DEVICE error reply, set NO_DEVICE flag in termflags. * users.c (open_hook): If NO_DEVICE flag set, return ENXIO immediately. If we put out an open request, check for that bit as well as NO_CARRIER changing in termflags and diagnose with ENXIO. * Makefile (device_replyServer-CPPFLAGS): New variable, turn off TypeCheck for this stub. This is necessary for error replies to get through to our server-side functions in devio.c.
1999-05-301999-05-24 Mark Kettenis <kettenis@gnu.org>Roland McGrath
* devio.c: Include <assert.h>, <errno.h> and <error.h>. Do not include <stdio.h> and <sys/types.h>. Reorganize the order of inclusion of the header files a bit and document the baud-rate hackery. Include <termios.h> explicitely. (init_devio): Use new local variable ERR instead of ERRNO. Use error instead of perror and exit to report failure. (devio_desert_dtr): Declare BITS as `int' instead of `dev_status_t'.
1999-03-231999-03-22 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* devio.c (initial_open): Fix typos.
1999-03-17Wed Mar 17 16:32:05 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* users.c (S_term_get_peername): Compare BOTTOM against the correct value, and call ports_port_deref with the proper name. Reported by Yamashita TAKAO (az207@epa.go.jp). * devio.c (devio_desert_dtr): Cast &BITS correctly in call to device_set_status. (device_open_reply): Alwas clean open_pending no matter what. Use ERR instead of ERRNO. On fake opens, close the device before deallocating the port. Reported by Mark Kettenis (kettenis@gnu.org). Tue Mar 16 01:04:06 1999 Thomas Bushnell, BSG <tb@mit.edu> * devio.c (open_pending): Make an enum. (devio_desert_dtr): Don't close the device, just set the TM_HUP modem bit, which should cause a hangup to occur. (devio_assert_dtr): Don't always open the device, instead use initial_open the first time, and schedule a fake open the other times. (initial_open): New function, guts from old device_assert_dtr. (device_open_reply): Distinguish replies from initial and fake opens appropriately. (ports_do_mach_notify_send_once): Test and set open_pending using new enum values.
1999-02-18Thu Feb 18 00:57:30 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* devio.c (devio_assert_dtr): Bother to set open_pending. Reported by OKUJI Yoshinori (okuji@kuicr.kyoto-u.ac.jp).
1998-11-16Mon Oct 26 16:47:18 1998 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* devio.c (char_size_mask_xxx): New variable. (devio_set_bits): Don't munge c_cflag here. Instead, set char_size_mask_xxx. (device_read_reply_inband): Mask off high bits from the input to simulate less than 8-bit channels.
1998-10-201998-09-04 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* devio.c: Add #undef's for B19200, B38400, B57600, B115200, in case they are defined in <device/tty_status.h> too.
1996-10-04(devio_set_bits): Only execute guts if CIGNORE isn't set.Miles Bader
1996-08-29*** empty log message ***Thomas Bushnell
1996-06-20(devio_abandon_physical_output): Don't do anything if carrier is off.Michael I. Bushnell
1996-05-09(device_open_reply): Use new ports_create_port.Michael I. Bushnell
1996-04-22(real_speed_to_bogus_speed): EXTB should be 38400, not 24800.Michael I. Bushnell
1996-01-27(devio_assert_dtr): Use ports_create_port instead of ports_allocate_port.Miles Bader
1995-12-01(devio_notice_input_flushed): New function.Michael I. Bushnell
(devio_bottom): Add devio_notice_input_flushed.
1995-12-01(devio_suspend_physical_output): Only if not already stopped.Michael I. Bushnell
1995-12-01(devio_start_output): Restart output if USER_OUTPUT_SUSP flag off andMichael I. Bushnell
output_stopped true. (output_stopped): New variable. (devio_suspend_physical_output): New function. (devio_bottom): Add devio_suspend_physical_output.
1995-12-01(devio_start_output): Honor USER_OUTPUT_SUSP flag.Michael I. Bushnell
1995-11-30New function names.Michael I. Bushnell
1995-11-30(start_output): Add devio_ prefix; declare static.Michael I. Bushnell
(set_break): Likewise. (clear_break): Likewise. (abandon_physical_output): Likewise. (pending_output_size): Likewise. (assert_dtr): Likewise. (desert_dtr): Likewise. (set_bits): Likewise. (mdmctl): Likewise. (mdmstate): Likewise. (devio_bottom): New var.
1995-11-30(ports_do_mach_notify_send_once): foo.Michael I. Bushnell
1995-11-30*** empty log message ***Michael I. Bushnell
1995-11-30(ports_do_mach_notify_send_once): New function.Michael I. Bushnell
1995-11-27Nil.Michael I. Bushnell
1995-08-31Initial revisionMichael I. Bushnell