aboutsummaryrefslogtreecommitdiff
path: root/coreutils/df.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-03-15 08:29:22 +0000
committerEric Andersen <andersen@codepoet.org>2004-03-15 08:29:22 +0000
commitc7bda1ce659294d6e22c06e087f6f265983c7578 (patch)
tree4c6d2217f4d8306c59cf1096f8664e1cfd167213 /coreutils/df.c
parent8854004b41065b3d081af7f3df13a100b0c8bfbe (diff)
downloadbusybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz
busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.bz2
busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.zip
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'coreutils/df.c')
-rw-r--r--coreutils/df.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index 9c0d13f62..9d53f2bc4 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Mini df implementation for busybox 3 * Mini df implementation for busybox
4 * 4 *
5 * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
6 * based on original code by (I think) Bruce Perens <bruce@pixar.com>. 6 * based on original code by (I think) Bruce Perens <bruce@pixar.com>.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -51,7 +51,7 @@ extern int df_main(int argc, char **argv)
51 long blocks_used; 51 long blocks_used;
52 long blocks_percent_used; 52 long blocks_percent_used;
53#ifdef CONFIG_FEATURE_HUMAN_READABLE 53#ifdef CONFIG_FEATURE_HUMAN_READABLE
54 unsigned long df_disp_hr = KILOBYTE; 54 unsigned long df_disp_hr = KILOBYTE;
55#endif 55#endif
56 int status = EXIT_SUCCESS; 56 int status = EXIT_SUCCESS;
57 unsigned long opt; 57 unsigned long opt;
@@ -115,7 +115,7 @@ extern int df_main(int argc, char **argv)
115 bb_perror_msg("%s", mount_point); 115 bb_perror_msg("%s", mount_point);
116 goto SET_ERROR; 116 goto SET_ERROR;
117 } 117 }
118 118
119 if ((s.f_blocks > 0) || !mount_table){ 119 if ((s.f_blocks > 0) || !mount_table){
120 blocks_used = s.f_blocks - s.f_bfree; 120 blocks_used = s.f_blocks - s.f_bfree;
121 blocks_percent_used = 0; 121 blocks_percent_used = 0;
@@ -124,7 +124,7 @@ extern int df_main(int argc, char **argv)
124 + (blocks_used + s.f_bavail)/2 124 + (blocks_used + s.f_bavail)/2
125 ) / (blocks_used + s.f_bavail); 125 ) / (blocks_used + s.f_bavail);
126 } 126 }
127 127
128 if (strcmp(device, "rootfs") == 0) { 128 if (strcmp(device, "rootfs") == 0) {
129 continue; 129 continue;
130 } else if (strcmp(device, "/dev/root") == 0) { 130 } else if (strcmp(device, "/dev/root") == 0) {
@@ -134,15 +134,15 @@ extern int df_main(int argc, char **argv)
134 goto SET_ERROR; 134 goto SET_ERROR;
135 } 135 }
136 } 136 }
137 137
138#ifdef CONFIG_FEATURE_HUMAN_READABLE 138#ifdef CONFIG_FEATURE_HUMAN_READABLE
139 bb_printf("%-21s%9s ", device, 139 bb_printf("%-21s%9s ", device,
140 make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr)); 140 make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
141 141
142 bb_printf("%9s ", 142 bb_printf("%9s ",
143 make_human_readable_str( (s.f_blocks - s.f_bfree), 143 make_human_readable_str( (s.f_blocks - s.f_bfree),
144 s.f_bsize, df_disp_hr)); 144 s.f_bsize, df_disp_hr));
145 145
146 bb_printf("%9s %3ld%% %s\n", 146 bb_printf("%9s %3ld%% %s\n",
147 make_human_readable_str(s.f_bavail, s.f_bsize, df_disp_hr), 147 make_human_readable_str(s.f_bavail, s.f_bsize, df_disp_hr),
148 blocks_percent_used, mount_point); 148 blocks_percent_used, mount_point);