1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/kern/tty_pty.c 130259 2004-06-09 09:09:54Z phk $"); |
34 35/* 36 * Pseudo-teletype Driver 37 * (Actually two drivers, requiring two entries in 'cdevsw') 38 */ 39#include "opt_compat.h" 40#include "opt_tty.h" 41#include <sys/param.h> --- 72 unchanged lines hidden (view full) --- 114}; 115 116#define PF_PKT 0x08 /* packet mode */ 117#define PF_STOPPED 0x10 /* user told stopped */ 118#define PF_REMOTE 0x20 /* remote and flow controlled input */ 119#define PF_NOSTOP 0x40 120#define PF_UCNTL 0x80 /* user control mode */ 121 |
122#define TSA_PTC_READ(tp) ((void *)&(tp)->t_outq.c_cf) 123#define TSA_PTC_WRITE(tp) ((void *)&(tp)->t_rawq.c_cl) 124#define TSA_PTS_READ(tp) ((void *)&(tp)->t_canq) 125 |
126static char *names = "pqrsPQRS"; 127/* 128 * This function creates and initializes a pts/ptc pair 129 * 130 * pts == /dev/tty[pqrsPQRS][0123456789abcdefghijklmnopqrstuv] 131 * ptc == /dev/pty[pqrsPQRS][0123456789abcdefghijklmnopqrstuv] 132 * 133 * XXX: define and add mapping of upper minor bits to allow more --- 731 unchanged lines hidden --- |