summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-12 10:26:27 +0000
committerdg <dg@FreeBSD.org>1994-08-12 10:26:27 +0000
commit1abdc2679aa78f5b05cf28bc4ed9031fc1ef8e0c (patch)
tree8b5b17afb2db3cc507eba3bfc9d1064bc9d1ccc0
parent1e4a2dfbefadd601b37994f9aed9f2bc2c801183 (diff)
downloadFreeBSD-src-1abdc2679aa78f5b05cf28bc4ed9031fc1ef8e0c.zip
FreeBSD-src-1abdc2679aa78f5b05cf28bc4ed9031fc1ef8e0c.tar.gz
Took out junk to save the old value of BLOCKSIZE as it is unnecessary.
Remove CFLAGS=-g from Makefile.
-rw-r--r--usr.sbin/swapinfo/Makefile1
-rw-r--r--usr.sbin/swapinfo/swapinfo.c11
2 files changed, 1 insertions, 11 deletions
diff --git a/usr.sbin/swapinfo/Makefile b/usr.sbin/swapinfo/Makefile
index d0a0030..0802582 100644
--- a/usr.sbin/swapinfo/Makefile
+++ b/usr.sbin/swapinfo/Makefile
@@ -3,7 +3,6 @@
PROG= swapinfo
SRCS= swapinfo.c devname.c # getbsize.c
.PATH: ${.CURDIR}/../../bin/df
-CFLAGS= -g
DPADD= ${LIBMATH} ${LIBUTIL}
LDADD= -lm -lkvm
diff --git a/usr.sbin/swapinfo/swapinfo.c b/usr.sbin/swapinfo/swapinfo.c
index bf1a313..1e39a68 100644
--- a/usr.sbin/swapinfo/swapinfo.c
+++ b/usr.sbin/swapinfo/swapinfo.c
@@ -38,7 +38,6 @@ static struct nlist nl[] = {{"_swapmap"}, /* list of free swap areas */
char *getbsize __P((int *, long *));
void usage __P((void));
-int kflag;
main (argc, argv)
int argc;
@@ -51,18 +50,16 @@ char **argv;
static long blocksize;
static int headerlen;
static char *header;
- char *oldbsize = NULL;
char **save;
kvm_t *kd;
/* We are trying to be simple here: */
save = argv;
- kflag = 0;
while ((ch = getopt(argc, argv, "k")) != EOF)
switch(ch) {
case 'k':
- kflag = 1;
+ putenv("BLOCKSIZE=1k");
break;
case '?':
default:
@@ -175,13 +172,7 @@ char **argv;
swapmap = head.rl_next;
}
- if (kflag) {
- oldbsize = getenv("BLOCKSIZE");
- putenv("BLOCKSIZE=1k");
- }
header = getbsize(&headerlen, &blocksize);
- if (oldbsize)
- putenv(oldbsize);
printf ("%-10s %10s %10s %10s %10s\n",
"Device", header, "Used", "Available", "Capacity");
for (total_avail = total_partitions = i = 0; i < nswdev; i++) {
OpenPOWER on IntegriCloud