summaryrefslogtreecommitdiff
blob: 656d68429b396204ceac07141e7d487072379207 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
diff -Naur evms-2.5.5.orig/plugins/swap/swapfs.c evms-2.5.5/plugins/swap/swapfs.c
--- evms-2.5.5.orig/plugins/swap/swapfs.c	2007-03-06 23:14:01.000000000 +0100
+++ evms-2.5.5/plugins/swap/swapfs.c	2007-03-06 23:14:54.000000000 +0100
@@ -27,7 +27,6 @@
 #include <plugin.h>
 #include <fcntl.h>
 #include <sys/wait.h>
-#include <asm/page.h> /* to get PAGE_SIZE */
 #include <sys/swap.h>
 
 #include "swapfs.h"
@@ -341,7 +340,7 @@
 
 	*max_volume_size = (sector_count_t)-1;	/* No limit. */
 	*max_object_size = (sector_count_t)-1;	/* No limit. */
-	*min_size = (sector_count_t)(PAGE_SIZE * 10);	/* 10 page minimum. */
+	*min_size = (sector_count_t)(getpagesize() * 10);	/* 10 page minimum. */
 
 	LOG_EXTRA("Volume: %s, min: %"PRIu64", max: %"PRIu64"\n",
 		  volume->name, *min_size, *max_volume_size);
diff -Naur evms-2.5.5.orig/plugins/swap/swapfs.h evms-2.5.5/plugins/swap/swapfs.h
--- evms-2.5.5.orig/plugins/swap/swapfs.h	2007-03-06 23:14:01.000000000 +0100
+++ evms-2.5.5/plugins/swap/swapfs.h	2007-03-06 23:14:42.000000000 +0100
@@ -47,8 +47,8 @@
 #define PUT 1
 #define SWAPFS_MAGIC_STRING	"SWAP_SPACE"
 #define SWAPFS_MAGIC_STRING2	"SWAPSPACE2"
-#define SWAPFS_MIN_SIZE		(PAGE_SIZE / EVMS_VSECTOR_SIZE * 10)
-#define SWAP_MAGIC_OFFSET_IN_BYTES	(PAGE_SIZE - 10) /* last 10 bytes of first page */
+#define SWAPFS_MIN_SIZE		(getpagesize() / EVMS_VSECTOR_SIZE * 10)
+#define SWAP_MAGIC_OFFSET_IN_BYTES	(getpagesize() - 10) /* last 10 bytes of first page */
 
 #define EVMS_Task_swapon	EVMS_Task_Plugin_Function + 1
 #define EVMS_Task_swapoff	EVMS_Task_Plugin_Function + 2
diff -Naur evms-2.5.5.orig/plugins/xfs/fsimxfs.h evms-2.5.5/plugins/xfs/fsimxfs.h
--- evms-2.5.5.orig/plugins/xfs/fsimxfs.h	2007-03-06 23:14:01.000000000 +0100
+++ evms-2.5.5/plugins/xfs/fsimxfs.h	2007-03-06 23:16:00.000000000 +0100
@@ -19,7 +19,7 @@
  */
 
 #include <uuid/uuid.h>
-#include <asm/page.h>
+#include <unistd.h> /* for getpagesize() */
 
 extern plugin_record_t xfs_plugin_record;
 extern plugin_record_t * my_plugin_record;
@@ -165,7 +165,7 @@
  * superblock.  This is not the same as the superblock structure, since all of
  * this space is not currently being used.
  */
-#define SIZE_OF_SUPER		PAGE_SIZE
+#define SIZE_OF_SUPER		getpagesize()
 
 /* Fixed byte offset of primary superblock */
 #define XFS_SUPER1_OFF		0x00