From 555edc2c99e72fd005b624cebe8df467ebae4540 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Fri, 12 Aug 1994 10:26:27 +0000 Subject: [PATCH] Took out junk to save the old value of BLOCKSIZE as it is unnecessary. Remove CFLAGS=-g from Makefile. --- usr.sbin/swapinfo/Makefile | 1 - usr.sbin/swapinfo/swapinfo.c | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/usr.sbin/swapinfo/Makefile b/usr.sbin/swapinfo/Makefile index d0a0030536ed..0802582a694e 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 bf1a3131e22f..1e39a68167bc 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++) {