osandov / rpms / btrfs-progs

Forked from rpms/btrfs-progs 2 years ago
Clone
Josef Bacik 0124ba
diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c.patch2 btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c
Josef Bacik 0124ba
--- btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c.patch2	2012-10-04 20:35:31.000000000 -0400
Josef Bacik 0124ba
+++ btrfs-progs-0.20.rc1.20121017git91d9eec/btrfsck.c	2012-10-17 13:45:30.172638798 -0400
Josef Bacik a37e25
@@ -22,7 +22,9 @@
Josef Bacik 4ec8d5
 #include <stdlib.h>
Josef Bacik a37e25
 #include <unistd.h>
Josef Bacik 4ec8d5
 #include <fcntl.h>
Josef Bacik 4ec8d5
+#include <sys/types.h>
Josef Bacik a37e25
 #include <sys/stat.h>
Josef Bacik 4ec8d5
+#include <unistd.h>
Josef Bacik 8bffa8
 #include <getopt.h>
Josef Bacik 4ec8d5
 #include "kerncompat.h"
Josef Bacik 4ec8d5
 #include "ctree.h"
Josef Bacik 0124ba
diff -up btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c.patch2 btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c
Josef Bacik 0124ba
--- btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c.patch2	2012-10-17 13:45:30.167638835 -0400
Josef Bacik 0124ba
+++ btrfs-progs-0.20.rc1.20121017git91d9eec/mkfs.c	2012-10-17 13:46:41.444084426 -0400
Josef Bacik 0124ba
@@ -1228,7 +1228,7 @@ int main(int ac, char **av)
Josef Bacik 4ec8d5
 	u64 alloc_start = 0;
Josef Bacik 8bffa8
 	u64 metadata_profile = 0;
Josef Bacik 8bffa8
 	u64 data_profile = 0;
Josef Bacik 4ec8d5
-	u32 leafsize = getpagesize();
Josef Bacik 4ec8d5
+	u32 leafsize = sysconf(_SC_PAGESIZE);
Josef Bacik 4ec8d5
 	u32 sectorsize = 4096;
Josef Bacik 4ec8d5
 	u32 nodesize = leafsize;
Josef Bacik 4ec8d5
 	u32 stripesize = 4096;
Josef Bacik 0124ba
@@ -1304,7 +1304,7 @@ int main(int ac, char **av)
Josef Bacik 4ec8d5
 				print_usage();
Josef Bacik 4ec8d5
 		}
Josef Bacik 4ec8d5
 	}
Josef Bacik 4ec8d5
-	sectorsize = max(sectorsize, (u32)getpagesize());
Josef Bacik 4ec8d5
+	sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
Josef Bacik 0124ba
 	if (check_leaf_or_node_size(leafsize, sectorsize))
Josef Bacik 4ec8d5
 		exit(1);
Josef Bacik 0124ba
 	if (check_leaf_or_node_size(nodesize, sectorsize))