patch-libxfs_linux_c 1007 B

1234567891011121314151617181920212223242526272829303132333435
  1. --- xfsprogs-3.1.4.orig/libxfs/linux.c 2010-01-29 20:46:13.000000000 +0100
  2. +++ xfsprogs-3.1.4/libxfs/linux.c 2011-01-22 20:27:29.458658270 +0100
  3. @@ -16,12 +16,10 @@
  4. * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  5. */
  6. -#define ustat __kernel_ustat
  7. #include <xfs/libxfs.h>
  8. #include <mntent.h>
  9. #include <sys/stat.h>
  10. -#undef ustat
  11. -#include <sys/ustat.h>
  12. +#include <sys/statvfs.h>
  13. #include <sys/mount.h>
  14. #include <sys/ioctl.h>
  15. #include <sys/sysinfo.h>
  16. @@ -49,8 +47,7 @@ static int max_block_alignment;
  17. int
  18. platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
  19. {
  20. - /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
  21. - struct ustat ust[2];
  22. + struct statvfs info;
  23. struct stat64 st;
  24. if (!s) {
  25. @@ -61,7 +58,7 @@ platform_check_ismounted(char *name, cha
  26. s = &st;
  27. }
  28. - if (ustat(s->st_rdev, ust) >= 0) {
  29. + if (statvfs(name, &info) >= 0) {
  30. if (verbose)
  31. fprintf(stderr,
  32. _("%s: %s contains a mounted filesystem\n"),