Skip to content

Commit 0bef7c0

Browse files
committed
df: Correct BLOCKSIZE with -k
1 parent 02b72b1 commit 0bef7c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/df/df.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ main(int argc, char *argv[])
131131
* be set to 1024. Thus, if this occurs, simply break
132132
* rather than clobbering the old blocksize.
133133
*/
134-
if (kflag)
134+
if (kflag) {
135+
setenv("BLOCKSIZE", "1024", 1);
135136
break;
137+
}
136138
setenv("BLOCKSIZE", "512", 1);
137139
hflag = 0;
138140
break;
@@ -154,7 +156,7 @@ main(int argc, char *argv[])
154156
break;
155157
case 'k':
156158
kflag++;
157-
setenv("BLOCKSIZE", "1024", 1);
159+
setenv("BLOCKSIZE", "1k", 1);
158160
hflag = 0;
159161
break;
160162
case 'l':

0 commit comments

Comments
 (0)