summaryrefslogtreecommitdiff
blob: 7526247a9ca9c021cd298517a88e26b6d2a3fc85 (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
56
57
58
Index: evms-2.5.5/plugins/swap/swapfs.c
===================================================================
--- evms-2.5.5.orig/plugins/swap/swapfs.c
+++ evms-2.5.5/plugins/swap/swapfs.c
@@ -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 @@ static int swap_get_fs_limits(logical_vo
 
 	*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)(sysconf(_SC_PAGESIZE) * 10);	/* 10 page minimum. */
 
 	LOG_EXTRA("Volume: %s, min: %"PRIu64", max: %"PRIu64"\n",
 		  volume->name, *min_size, *max_volume_size);
Index: evms-2.5.5/plugins/swap/swapfs.h
===================================================================
--- evms-2.5.5.orig/plugins/swap/swapfs.h
+++ evms-2.5.5/plugins/swap/swapfs.h
@@ -47,8 +47,8 @@ extern engine_functions_t *EngFncs;
 #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		(sysconf(_SC_PAGESIZE) / EVMS_VSECTOR_SIZE * 10)
+#define SWAP_MAGIC_OFFSET_IN_BYTES	(sysconf(_SC_PAGESIZE) - 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
Index: evms-2.5.5/plugins/xfs/fsimxfs.h
===================================================================
--- evms-2.5.5.orig/plugins/xfs/fsimxfs.h
+++ evms-2.5.5/plugins/xfs/fsimxfs.h
@@ -19,7 +19,7 @@
  */
 
 #include <uuid/uuid.h>
-#include <asm/page.h>
+#include <unistd.h>
 
 extern plugin_record_t xfs_plugin_record;
 extern plugin_record_t * my_plugin_record;
@@ -165,7 +165,7 @@ typedef struct xfs_volume {
  * 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		sysconf(_SC_PAGESIZE)
 
 /* Fixed byte offset of primary superblock */
 #define XFS_SUPER1_OFF		0x00