pstat.c (897d31be9d7f1a84f605de9fc4f8632f4994df85) pstat.c (7e8409a7a97e9064b922827a6197085fc6b839a5)
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

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

117 /* We will behave like good old swapinfo if thus invoked */
118 opts = strrchr(argv[0], '/');
119 if (opts)
120 opts++;
121 else
122 opts = argv[0];
123 if (!strcmp(opts, "swapinfo")) {
124 swapflag = 1;
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

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

117 /* We will behave like good old swapinfo if thus invoked */
118 opts = strrchr(argv[0], '/');
119 if (opts)
120 opts++;
121 else
122 opts = argv[0];
123 if (!strcmp(opts, "swapinfo")) {
124 swapflag = 1;
125 opts = "hkM:N:";
126 usagestr = "swapinfo [-hk] [-M core [-N system]]";
125 opts = "ghkmM:N:";
126 usagestr = "swapinfo [-ghkm] [-M core [-N system]]";
127 } else {
128 opts = "TM:N:hfknst";
129 usagestr = "pstat [-Tfhknst] [-M core [-N system]]";
130 }
131
132 while ((ch = getopt(argc, argv, opts)) != -1)
133 switch (ch) {
134 case 'f':
135 fileflag = 1;
136 break;
127 } else {
128 opts = "TM:N:hfknst";
129 usagestr = "pstat [-Tfhknst] [-M core [-N system]]";
130 }
131
132 while ((ch = getopt(argc, argv, opts)) != -1)
133 switch (ch) {
134 case 'f':
135 fileflag = 1;
136 break;
137 case 'g':
138 putenv("BLOCKSIZE=1G");
139 break;
137 case 'h':
138 humanflag = 1;
139 break;
140 case 'k':
141 putenv("BLOCKSIZE=1K");
142 break;
140 case 'h':
141 humanflag = 1;
142 break;
143 case 'k':
144 putenv("BLOCKSIZE=1K");
145 break;
146 case 'm':
147 putenv("BLOCKSIZE=1M");
148 break;
143 case 'M':
144 memf = optarg;
145 break;
146 case 'N':
147 nlistf = optarg;
148 break;
149 case 'n':
150 usenumflag = 1;

--- 459 unchanged lines hidden ---
149 case 'M':
150 memf = optarg;
151 break;
152 case 'N':
153 nlistf = optarg;
154 break;
155 case 'n':
156 usenumflag = 1;

--- 459 unchanged lines hidden ---