diff options
Diffstat (limited to 'usr.bin/du/du.c')
-rw-r--r-- | usr.bin/du/du.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index 2cae7e8..49b5f9b 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -66,13 +66,12 @@ main(argc, argv) FTS *fts; FTSENT *p; long blocksize; - char *oldbsize = NULL; int ftsoptions, listdirs, listfiles; - int Hflag, Lflag, Pflag, aflag, ch, notused, rval, sflag, kflag; + int Hflag, Lflag, Pflag, aflag, ch, notused, rval, sflag; char **save; save = argv; - Hflag = Lflag = Pflag = aflag = sflag = kflag = 0; + Hflag = Lflag = Pflag = aflag = sflag = 0; ftsoptions = FTS_PHYSICAL; while ((ch = getopt(argc, argv, "HLPaksx")) != EOF) switch (ch) { @@ -92,7 +91,7 @@ main(argc, argv) aflag = 1; break; case 'k': - kflag = 1; + putenv("BLOCKSIZE=1024"); break; case 's': sflag = 1; @@ -143,13 +142,7 @@ main(argc, argv) argv[1] = NULL; } - if (kflag) { - oldbsize = getenv("BLOCKSIZE"); - putenv("BLOCKSIZE=1k"); - } (void)getbsize(¬used, &blocksize); - if (oldbsize) - putenv(oldbsize); blocksize /= 512; if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL) |