← Commit list

d1535216c

James Clarke
James Clarke
2017-10-30
SUCCESS Duration: 143s

Subject

df: Use statvfs instead of non-standard statfs

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/df.c+3 -3
@@ -77,7 +77,7 @@
//usage: "/dev/sda3 17381728 17107080 274648 98% /\n"
#include <mntent.h>
-#include <sys/vfs.h>
+#include <sys/statvfs.h>
#include "libbb.h"
#include "unicode.h"
@@ -98,7 +98,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
unsigned opt;
FILE *mount_table;
struct mntent *mount_entry;
- struct statfs s;
+ struct statvfs s;
enum {
OPT_KILO = (1 << 0),
@@ -211,7 +211,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
mount_point = mount_entry->mnt_dir;
fs_type = mount_entry->mnt_type;
- if (statfs(mount_point, &s) != 0) {
+ if (statvfs(mount_point, &s) != 0) {
bb_simple_perror_msg(mount_point);
goto set_error;
}