summaryrefslogtreecommitdiff
path: root/term/main.c
AgeCommit message (Collapse)Author
2002-11-212002-11-20 Roland McGrath <roland@redhat.com>Roland McGrath
* main.c (parse_opt : case ARGP_KEY_SUCCESS): After initializing a new bottomhalf, call its assert_dtr hook if TTY_OPEN is set in termflags.
2002-11-202002-11-19 Roland McGrath <roland@frob.com>Roland McGrath
* main.c (parse_opt: case ARGP_KEY_SUCCESS): Set tty_arg along with tty_type from new argument value. Reported by David Walter <dwalter@syr.edu>.
2002-08-182002-08-18 Roland McGrath <roland@frob.com>Roland McGrath
* main.c (main): Open with O_RDWR only for hurdio bottomhalf.
2002-06-262002-06-25 Roland McGrath <roland@frob.com>Roland McGrath
* main.c (trivfs_runtime_argp): New variable. (options): Add --name/-N and --type/-T options. (parse_opt): Collect parsed options in temporary storage and apply them only at final success. For T_HURDIO, allow absent arg. For non-startup parsing call, allow any missing args. (tty_type_names): New const variable. (trivfs_append_args): New function. (main): Open underlying node with O_RDWR. * hurdio.c (wait_for_dtr): If tty_arg is null, use termctl->underlying instead of opening a node by name. (hurdio_desert_dtr): If tty_arg is null, don't deallocate ioport.
2002-05-082002-05-08 Roland McGrath <roland@frob.com>Roland McGrath
* main.c (main): Add a return after `error' call to clue compiler in.
2002-03-262002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>Neal H. Walfield
* main.c: Include <error.h>. (main): Use error, not fprintf and exit or perror and exit. Use ERR, not errno. Use MACH_PORT_NULL explicitly. * users.c: Include <error.h>. (init_users): Use ERR, not errno. Use error, not perror and exit.
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: Declare rdev. * main.c (options): New variable. (parse_opt): Handle case `n' to set rdev number. Also return EINVAL if terminal type is invalid. * users.c (trivfs_modify_stat): Set ST->st_rdev to global rdev.
2002-02-102002-02-10 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* hurdio.c: New file. * Makefile (SRCS): Add hurdio.c. * term.h: Add hurdio_bottom declaration. * main.c: Add T_HURDIO to enum of tty_type. (parse_opt): Add case for hurdio bottom handler. (term_argp): Likewise. (main): 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.
2000-03-172000-03-17 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* main.c (main): Don't use MAKE_SEND in Hurd RPC.
1999-02-191999-02-06 Mark Kettenis <kettenis@gnu.org>Thomas Bushnell
* main.c (main): Initialize status from underlying node. * users.c (check_access_hook): New function. Correctly implement access permission checking. (trivfs_check_access_hook): Initialize with check_access_hook. (trivfs_S_file_check_access): Removed.
1999-01-30Sat Jan 30 00:27:14 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* munge.c (create_queue): Make sure that malloc succeeds. Reported by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
1997-08-20Wed Aug 20 14:07:35 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* main.c (main): New args for ports_manage_port_operations_multithread.
1997-02-20(main):Miles Bader
Initialize TTY_CLASS & PTY_CLASS too instead of doing TTY_CNTL_CLASS & PTY_CNTL_CLASS twice.
1997-02-20(trivfs_protid_portclasses, trivfs_protid_nportclasses,Miles Bader
trivfs_cntl_portclasses, trivfs_cntl_nportclasses): Variables removed. (main): Don't set port class/bucket variables, use trivfs_add_{protid,control}_port_class insteadd.
1997-02-05(main):Miles Bader
Add S_IROOT to TERM_MODE.
1996-08-15*** empty log message ***Thomas Bushnell
1996-07-17(main): term_mode needs S_IFCHR.Michael I. Bushnell
1996-07-17(main): Initialize term_owner, term_group, and term_mode.Michael I. Bushnell
1996-02-24(main): Call ptyio_init if appropriate.Miles Bader
1996-01-27(main): Use trivfs_startup & trivfs_create_port instead of trivfs_handle_port.Miles Bader
1996-01-18(main): Set PEERCNTL to &PTYCTL if we're a slave, not 0.Miles Bader
1995-12-21(main): Put the nodename on ourcntl->hook rather than NODENAME, and also putMiles Bader
our peer's nodname on peercntl->hook.
1995-12-20(main): Never mind.Michael I. Bushnell
1995-12-20(main): Initialize input_path_lock.Michael I. Bushnell
1995-12-12(main): Typo.Michael I. Bushnell
1995-12-12(main): Set BOTTOM.Michael I. Bushnell
1995-12-05(main): Totally rework arg parsing and translator linkage. No longerMichael I. Bushnell
support being started s a shell program. Now support pty's, though no attempt is made to deal nicely with the node collision problem.
1995-11-06(main): Add FLAGS arg to trivfs_startup call.Miles Bader
1995-09-22(main): Call init_users. Don't initialize output_psize. Set NO_OWNERMichael I. Bushnell
in initial termflags.
1995-08-31Initial revisionMichael I. Bushnell