Deleted Added
full compact
machine.c (170774) machine.c (172207)
1/*
2 * top - a top users display for Unix
3 *
4 * SYNOPSIS: For FreeBSD-2.x and later
5 *
6 * DESCRIPTION:
7 * Originally written for BSD4.4 system by Christos Zoulas.
8 * Ported to FreeBSD 2.x by Steven Wallace && Wolfram Schneider

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

15 *
16 * LIBS: -lkvm
17 *
18 * AUTHOR: Christos Zoulas <christos@ee.cornell.edu>
19 * Steven Wallace <swallace@freebsd.org>
20 * Wolfram Schneider <wosch@FreeBSD.org>
21 * Thomas Moestl <tmoestl@gmx.net>
22 *
1/*
2 * top - a top users display for Unix
3 *
4 * SYNOPSIS: For FreeBSD-2.x and later
5 *
6 * DESCRIPTION:
7 * Originally written for BSD4.4 system by Christos Zoulas.
8 * Ported to FreeBSD 2.x by Steven Wallace && Wolfram Schneider

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

15 *
16 * LIBS: -lkvm
17 *
18 * AUTHOR: Christos Zoulas <christos@ee.cornell.edu>
19 * Steven Wallace <swallace@freebsd.org>
20 * Wolfram Schneider <wosch@FreeBSD.org>
21 * Thomas Moestl <tmoestl@gmx.net>
22 *
23 * $FreeBSD: head/usr.bin/top/machine.c 170774 2007-06-15 12:03:07Z bde $
23 * $FreeBSD: head/usr.bin/top/machine.c 172207 2007-09-17 05:31:39Z jeff $
24 */
25
26#include <sys/param.h>
27#include <sys/errno.h>
28#include <sys/file.h>
29#include <sys/proc.h>
30#include <sys/resource.h>
31#include <sys/rtprio.h>

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

670 char **args;
671
672 /* find and remember the next proc structure */
673 hp = (struct handle *)handle;
674 pp = *(hp->next_proc++);
675 hp->remaining--;
676
677 /* get the process's command name */
24 */
25
26#include <sys/param.h>
27#include <sys/errno.h>
28#include <sys/file.h>
29#include <sys/proc.h>
30#include <sys/resource.h>
31#include <sys/rtprio.h>

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

670 char **args;
671
672 /* find and remember the next proc structure */
673 hp = (struct handle *)handle;
674 pp = *(hp->next_proc++);
675 hp->remaining--;
676
677 /* get the process's command name */
678 if ((pp->ki_sflag & PS_INMEM) == 0) {
678 if ((pp->ki_flag & P_INMEM) == 0) {
679 /*
680 * Print swapped processes as <pname>
681 */
682 size_t len;
683
684 len = strlen(pp->ki_comm);
685 if (len > sizeof(pp->ki_comm) - 3)
686 len = sizeof(pp->ki_comm) - 3;

--- 633 unchanged lines hidden ---
679 /*
680 * Print swapped processes as <pname>
681 */
682 size_t len;
683
684 len = strlen(pp->ki_comm);
685 if (len > sizeof(pp->ki_comm) - 3)
686 len = sizeof(pp->ki_comm) - 3;

--- 633 unchanged lines hidden ---