pstat.c (00191f86e060647e481e9d3baf8aaea3335abba7) pstat.c (18b51f792fb28f3909a1e3a6b44898572b9afdcf)
1/*-
2 * Copyright (c) 1980, 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 2002 Networks Associates Technologies, Inc.
5 * All rights reserved.
6 *
7 * Portions of this software were developed for the FreeBSD Project by
8 * ThinkSec AS and NAI Labs, the Security Research Division of Network

--- 322 unchanged lines hidden (view full) ---

331#endif
332 { 0, '\0'},
333};
334
335static void
336ttyprt(struct xtty *xt)
337{
338 int i, j;
1/*-
2 * Copyright (c) 1980, 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 2002 Networks Associates Technologies, Inc.
5 * All rights reserved.
6 *
7 * Portions of this software were developed for the FreeBSD Project by
8 * ThinkSec AS and NAI Labs, the Security Research Division of Network

--- 322 unchanged lines hidden (view full) ---

331#endif
332 { 0, '\0'},
333};
334
335static void
336ttyprt(struct xtty *xt)
337{
338 int i, j;
339 pid_t pgid;
340 char *name, state[20];
341
342 if (xt->xt_size != sizeof *xt)
343 errx(1, "struct xtty size mismatch");
344 if (usenumflag || xt->xt_dev == 0 ||
345 (name = devname(xt->xt_dev, S_IFCHR)) == NULL)
346 printf(" %2d,%-2d", major(xt->xt_dev), minor(xt->xt_dev));
347 else

--- 4 unchanged lines hidden (view full) ---

352 xt->xt_column);
353 for (i = j = 0; ttystates[i].flag; i++)
354 if (xt->xt_state & ttystates[i].flag)
355 state[j++] = ttystates[i].val;
356 if (j == 0)
357 state[j++] = '-';
358 state[j] = '\0';
359 (void)printf("%-6s %8d", state, xt->xt_sid);
339 char *name, state[20];
340
341 if (xt->xt_size != sizeof *xt)
342 errx(1, "struct xtty size mismatch");
343 if (usenumflag || xt->xt_dev == 0 ||
344 (name = devname(xt->xt_dev, S_IFCHR)) == NULL)
345 printf(" %2d,%-2d", major(xt->xt_dev), minor(xt->xt_dev));
346 else

--- 4 unchanged lines hidden (view full) ---

351 xt->xt_column);
352 for (i = j = 0; ttystates[i].flag; i++)
353 if (xt->xt_state & ttystates[i].flag)
354 state[j++] = ttystates[i].val;
355 if (j == 0)
356 state[j++] = '-';
357 state[j] = '\0';
358 (void)printf("%-6s %8d", state, xt->xt_sid);
360 pgid = 0;
361 (void)printf("%6d ", xt->xt_pgid);
362 switch (xt->xt_line) {
363 case TTYDISC:
364 (void)printf("term\n");
365 break;
366 case NTTYDISC:
367 (void)printf("ntty\n");
368 break;

--- 243 unchanged lines hidden ---
359 (void)printf("%6d ", xt->xt_pgid);
360 switch (xt->xt_line) {
361 case TTYDISC:
362 (void)printf("term\n");
363 break;
364 case NTTYDISC:
365 (void)printf("ntty\n");
366 break;

--- 243 unchanged lines hidden ---