- status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir);
- if (status != TRUE)
- return EXIT_FAILURE;
- argc--;
- argv++;
- }
- return EXIT_SUCCESS;
- } else {
- FILE *mountTable;
- struct mntent *mountEntry;
-
- mountTable = setmntent(mtab_file, "r");
- if (mountTable == 0) {
- perror(mtab_file);
- return EXIT_FAILURE;
+
+ if (strcmp(device, "rootfs") == 0) {
+ continue;
+ } else if (strcmp(device, "/dev/root") == 0) {
+ /* Adjusts device to be the real root device,
+ * or leaves device alone if it can't find it */
+ if ((device = find_real_root_device_name(device)) == NULL) {
+ goto SET_ERROR;
+ }
+ }
+
+#ifdef CONFIG_FEATURE_HUMAN_READABLE
+ bb_printf("%-21s%9s ", device,
+ make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
+
+ bb_printf("%9s ",
+ make_human_readable_str( (s.f_blocks - s.f_bfree),
+ s.f_bsize, df_disp_hr));
+
+ bb_printf("%9s %3ld%% %s\n",
+ make_human_readable_str(s.f_bavail, s.f_bsize, df_disp_hr),
+ blocks_percent_used, mount_point);
+#else
+ bb_printf("%-21s%9ld %9ld %9ld %3ld%% %s\n",
+ device,
+ kscale(s.f_blocks, s.f_bsize),
+ kscale(s.f_blocks-s.f_bfree, s.f_bsize),
+ kscale(s.f_bavail, s.f_bsize),
+ blocks_percent_used, mount_point);
+#endif