patch-libxfs_linux_c 914 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --- xfsprogs-3.1.1.orig/libxfs/linux.c 2010-01-29 20:46:13.000000000 +0100
  2. +++ xfsprogs-3.1.1/libxfs/linux.c 2010-02-13 23:45:27.000000000 +0100
  3. @@ -20,8 +20,6 @@
  4. #include <xfs/libxfs.h>
  5. #include <mntent.h>
  6. #include <sys/stat.h>
  7. -#undef ustat
  8. -#include <sys/ustat.h>
  9. #include <sys/mount.h>
  10. #include <sys/ioctl.h>
  11. #include <sys/sysinfo.h>
  12. @@ -49,25 +47,6 @@ static int max_block_alignment;
  13. int
  14. platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
  15. {
  16. - /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
  17. - struct ustat ust[2];
  18. - struct stat64 st;
  19. -
  20. - if (!s) {
  21. - if (stat64(block, &st) < 0)
  22. - return 0;
  23. - if ((st.st_mode & S_IFMT) != S_IFBLK)
  24. - return 0;
  25. - s = &st;
  26. - }
  27. -
  28. - if (ustat(s->st_rdev, ust) >= 0) {
  29. - if (verbose)
  30. - fprintf(stderr,
  31. - _("%s: %s contains a mounted filesystem\n"),
  32. - progname, name);
  33. - return 1;
  34. - }
  35. return 0;
  36. }