[hackers] [ubase] df -hk should disable -h and df -kh should disable -k || sin

From: <git_AT_suckless.org>
Date: Sat, 18 Oct 2014 19:23:30 +0200

commit cea440bd2dbd367dadd4f88d24d73104c781af73
Author: sin <sin_AT_2f30.org>
Date: Sat Oct 18 18:22:55 2014 +0100

    df -hk should disable -h and df -kh should disable -k

diff --git a/df.c b/df.c
index 5eb361c..f14b56b 100644
--- a/df.c
+++ b/df.c
_AT_@ -33,9 +33,11 @@ main(int argc, char *argv[])
                 break;
         case 'h':
                 hflag = 1;
+ kflag = 0;
                 break;
         case 'k':
                 kflag = 1;
+ hflag = 0;
                 blksize = 1024;
                 break;
         case 's':
_AT_@ -45,9 +47,6 @@ main(int argc, char *argv[])
                 usage();
         } ARGEND;
 
- if (kflag && hflag)
- hflag = 0;
-
         if (hflag)
                 printf("Filesystem Size Used "
                        "Avail Capacity Mounted on\n");
Received on Sat Oct 18 2014 - 19:23:30 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 18 2014 - 19:24:14 CEST