Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] deprecated ustat() vs. statfs()
@ 2008-12-31 14:32 Nigel Kukard
  2008-12-31 17:28 ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Nigel Kukard @ 2008-12-31 14:32 UTC (permalink / raw)
  To: buildroot

I dont suppose this is the correct way to switch to statfs()?


--- xfsprogs-2.10.2_vanilla/libxfs/linux.c    2008-12-09
23:33:26.000000000 +0000
+++ xfsprogs-2.10.2_remove-deprecated/libxfs/linux.c    2008-12-31
14:30:45.000000000 +0000
@@ -21,7 +21,7 @@
 #include <mntent.h>
 #include <sys/stat.h>
 #undef ustat
-#include <sys/ustat.h>
+#include <sys/statfs.h>
 #include <sys/mount.h>
 #include <sys/ioctl.h>
 #include <sys/sysinfo.h>
@@ -49,7 +49,7 @@
 int
 platform_check_ismounted(char *name, char *block, struct stat64 *s, int
verbose)
 {
-    struct ustat    ust;
+    struct statfs    ust;
     struct stat64    st;
 
     if (!s) {
@@ -60,7 +60,7 @@
         s = &st;
     }
 
-    if (ustat(s->st_rdev, &ust) >= 0) {
+    if (statfs(s->st_rdev, &ust) >= 0) {
         if (verbose)
             fprintf(stderr,
                 _("%s: %s contains a mounted filesystem\n"),

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-31 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-31 14:32 [Buildroot] deprecated ustat() vs. statfs() Nigel Kukard
2008-12-31 17:28 ` Bernhard Reutner-Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox