summaryrefslogtreecommitdiff
path: root/package/xfsprogs/patches/patch-libxfs_linux_c
blob: 9d0a95f754bed7c9e84581619649b78d2647a88e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- xfsprogs-3.0.0.orig/libxfs/linux.c	2009-02-04 23:29:25.000000000 +0100
+++ xfsprogs-3.0.0/libxfs/linux.c	2009-03-27 11:43:17.000000000 +0100
@@ -20,8 +20,6 @@
 #include <xfs/libxfs.h>
 #include <mntent.h>
 #include <sys/stat.h>
-#undef ustat
-#include <sys/ustat.h>
 #include <sys/mount.h>
 #include <sys/ioctl.h>
 #include <sys/sysinfo.h>
@@ -49,25 +47,6 @@ static int max_block_alignment;
 int
 platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
 {
-	/* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
-	struct ustat	ust[2];
-	struct stat64	st;
-
-	if (!s) {
-		if (stat64(block, &st) < 0)
-			return 0;
-		if ((st.st_mode & S_IFMT) != S_IFBLK)
-			return 0;
-		s = &st;
-	}
-
-	if (ustat(s->st_rdev, ust) >= 0) {
-		if (verbose)
-			fprintf(stderr,
-				_("%s: %s contains a mounted filesystem\n"),
-				progname, name);
-		return 1;
-	}
 	return 0;
 }