summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat/pstat.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-07-21 17:02:29 +0000
committerbde <bde@FreeBSD.org>1995-07-21 17:02:29 +0000
commitd22de13b503b38e5a0c5757d990976d499c750bd (patch)
tree0875f2bbb3187275039b1c276dc6463b08c2bbba /usr.sbin/pstat/pstat.c
parent7eb2bbeebf70c30bde58e58f1000e19b2accfa1e (diff)
downloadFreeBSD-src-d22de13b503b38e5a0c5757d990976d499c750bd.zip
FreeBSD-src-d22de13b503b38e5a0c5757d990976d499c750bd.tar.gz
Support cy driver. All tty drivers require namelist stuff here or they
won't get reported. The pcvt, cx and iitty drivers aren't supported. Report new tty states TS_CONNECTED, TS_SO_OLOWAT, TS_SO_OCOMPLETE, TS_CAR_OFLOW, TS_CTS_OFLOW, TS_DSR_OFLOW and TS_ZOMBIE if they are defined. Report old tty states TS_WOPEN and TS_ASLEEP only if they are defined. Report not so old tty states TS_CAN_BYPASS_L_RINT and TS_SNOOP only if they are defined (instead of if __FreeBSD__ is defined).
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r--usr.sbin/pstat/pstat.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 3693557..5467e55 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -140,6 +140,10 @@ struct nlist nl[] = {
{ "_rc_tty" },
#define NRC (SNPTY+6)
{ "_nrc_tty" },
+#define CY (SNPTY+7)
+ { "_cy_tty" },
+#define NCY (SNPTY+8)
+ { "_ncy_tty" },
#endif
{ "" }
};
@@ -802,6 +806,8 @@ ttymode()
ttytype(tty, "sio", SIO, NSIO);
if (nl[NRC].n_type != 0)
ttytype(tty, "rc", RC, NRC);
+ if (nl[NCY].n_type != 0)
+ ttytype(tty, "cy", CY, NCY);
#endif
if (nl[SNPTY].n_type != 0)
ttytype(tty, "pty", SPTY, SNPTY);
@@ -835,15 +841,37 @@ struct {
int flag;
char val;
} ttystates[] = {
+#ifdef TS_WOPEN
{ TS_WOPEN, 'W'},
+#endif
{ TS_ISOPEN, 'O'},
{ TS_CARR_ON, 'C'},
+#ifdef TS_CONNECTED
+ { TS_CONNECTED, 'c'},
+#endif
{ TS_TIMEOUT, 'T'},
{ TS_FLUSH, 'F'},
{ TS_BUSY, 'B'},
+#ifdef TS_ASLEEP
{ TS_ASLEEP, 'A'},
+#endif
+#ifdef TS_SO_OLOWAT
+ { TS_SO_OLOWAT, 'A'},
+#endif
+#ifdef TS_SO_OCOMPLETE
+ { TS_SO_OCOMPLETE, 'a'},
+#endif
{ TS_XCLUDE, 'X'},
{ TS_TTSTOP, 'S'},
+#ifdef TS_CAR_OFLOW
+ { TS_CAR_OFLOW, 'm'},
+#endif
+#ifdef TS_CTS_OFLOW
+ { TS_CTS_OFLOW, 'o'},
+#endif
+#ifdef TS_DSR_OFLOW
+ { TS_DSR_OFLOW, 'd'},
+#endif
{ TS_TBLOCK, 'K'},
{ TS_ASYNC, 'Y'},
{ TS_BKSL, 'D'},
@@ -851,10 +879,15 @@ struct {
{ TS_LNCH, 'L'},
{ TS_TYPEN, 'P'},
{ TS_CNTTB, 'N'},
-#ifdef __FreeBSD__
- { TS_SNOOP, 's'},
+#ifdef TS_CAN_BYPASS_L_RINT
{ TS_CAN_BYPASS_L_RINT, 'l'},
#endif
+#ifdef TS_SNOOP
+ { TS_SNOOP, 's'},
+#endif
+#ifdef TS_ZOMBIE
+ { TS_ZOMBIE, 'Z'},
+#endif
{ 0, '\0'},
};
OpenPOWER on IntegriCloud