Skip to content

Commit d663acf

Browse files
committed
Adjust alignment when printing inode columns
This makes 'df -hi' on systems with large partitions easier on the eyes. OK krw@
1 parent f24522b commit d663acf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/df/df.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: df.c,v 1.61 2023/01/01 16:31:20 millert Exp $ */
1+
/* $OpenBSD: df.c,v 1.62 2025/03/12 16:01:31 job Exp $ */
22
/* $NetBSD: df.c,v 1.21.2.1 1995/11/01 00:06:11 jtc Exp $ */
33

44
/*
@@ -328,7 +328,7 @@ prtstat(struct statfs *sfsp, int maxwidth, int headerlen, int blocksize)
328328
if (iflag) {
329329
inodes = sfsp->f_files;
330330
used = inodes - sfsp->f_ffree;
331-
(void)printf(" %7llu %7llu %5d%% ", used, sfsp->f_ffree,
331+
(void)printf(" %8llu %8llu %4d%% ", used, sfsp->f_ffree,
332332
percent(used, inodes));
333333
} else
334334
(void)printf(" ");
@@ -363,7 +363,7 @@ bsdprint(struct statfs *mntbuf, long mntsize, int maxwidth)
363363
maxwidth, maxwidth, "Filesystem", header);
364364
}
365365
if (iflag)
366-
(void)printf(" iused ifree %%iused");
366+
(void)printf(" iused ifree %%iused");
367367
(void)printf(" Mounted on\n");
368368

369369

0 commit comments

Comments
 (0)