summaryrefslogtreecommitdiff
path: root/usr.bin/du/du.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2001-05-02 23:26:54 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2001-05-02 23:26:54 +0000
commit6ba6ceda294e6a8577c7a023c31a886436755380 (patch)
tree13c371791d47741e79f14d8ab69cfc3a8166c764 /usr.bin/du/du.c
parent9416d16e426d5f2f30f1f276fa0b4ffa6e776f9e (diff)
-h overrides BLOCKSIZE; matt@anzen.com
Diffstat (limited to 'usr.bin/du/du.c')
-rw-r--r--usr.bin/du/du.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index f26e7cf365d..9fb19af78f3 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: du.c,v 1.7 2001/02/23 19:14:21 pjanzen Exp $ */
+/* $OpenBSD: du.c,v 1.8 2001/05/02 23:26:53 pjanzen Exp $ */
/* $NetBSD: du.c,v 1.11 1996/10/18 07:20:35 thorpej Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: du.c,v 1.7 2001/02/23 19:14:21 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: du.c,v 1.8 2001/05/02 23:26:53 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -110,7 +110,6 @@ main(argc, argv)
hflag = 1;
break;
case 'k':
- blocksize = 1024;
kflag = 1;
break;
case 's':
@@ -164,7 +163,11 @@ main(argc, argv)
argv[1] = NULL;
}
- if (!kflag || hflag)
+ if (hflag)
+ blocksize = 512;
+ else if (kflag)
+ blocksize = 1024;
+ else
(void)getbsize(&notused, &blocksize);
blocksize /= 512;