patch-libxfs_linux_c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --- xfsprogs-3.1.10.orig/libxfs/linux.c 2012-12-13 22:29:24.000000000 +0100
  2. +++ xfsprogs-3.1.10/libxfs/linux.c 2013-04-04 16:47:19.000000000 +0200
  3. @@ -16,14 +16,12 @@
  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/mount.h>
  13. #include <sys/ioctl.h>
  14. +#include <sys/statvfs.h>
  15. #include <sys/sysinfo.h>
  16. int platform_has_uuid = 1;
  17. @@ -49,8 +47,7 @@ static int max_block_alignment;
  18. int
  19. platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
  20. {
  21. - /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
  22. - struct ustat ust[2];
  23. + struct statvfs info;
  24. struct stat64 st;
  25. if (!s) {
  26. @@ -61,7 +58,7 @@ platform_check_ismounted(char *name, cha
  27. s = &st;
  28. }
  29. - if (ustat(s->st_rdev, ust) >= 0) {
  30. + if (statvfs(name, &info) >= 0) {
  31. if (verbose)
  32. fprintf(stderr,
  33. _("%s: %s contains a mounted filesystem\n"),