commit: 7ac6c2585ee0c6cf66ceda27f7572a434e29c1b7
parent bf37254b6d8190d852e5c89eda28c579f810ccd4
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 2 Sep 2024 03:28:25 +0200
cmd/df: move Filesystem+Type printing prior to if-inode
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/cmd/df.c b/cmd/df.c
@@ -314,15 +314,15 @@ main(int argc, char *argv[])
static_escape(mntent->mnt_fsname);
static_escape(mntent->mnt_dir);
+ printf("%-*s ", fs_col_width, mntent->mnt_fsname);
+
+ if(opt_T) printf("%*s ", col_width, mntent->mnt_type);
+
if(opt_i)
{
fsfilcnt_t used = stats.f_files - stats.f_ffree;
fsfilcnt_t percent = (used / stats.f_files) * 100;
- printf("%-*s ", fs_col_width, mntent->mnt_fsname);
-
- if(opt_T) printf("%*s ", col_width, mntent->mnt_type);
-
if(opt_h && !opt_P)
{
struct si_scale total_scl = dtosi(stats.f_files, false);
@@ -367,10 +367,6 @@ main(int argc, char *argv[])
used /= forced_bsize;
}
- printf("%-*s ", fs_col_width, mntent->mnt_fsname);
-
- if(opt_T) printf("%*s ", col_width, mntent->mnt_type);
-
if(opt_h && !opt_P)
{
struct si_scale total_scl = dtosi(total, true);