From 0c10be57b72901464d4bb9ea7b5383c42b08bcae Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Thu, 9 Jun 2011 18:12:12 -0700 Subject: btrfs-tools: new recipe for tools to operate on btrfs images Added these patches to the recipe to get it to work as desired: Upstream patches from tmp & for-dragonn branches of repository http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs-unstable.git Also included the debian patches. Nitin's patch to make the makefile cross friendly And Xin Zhong's patch to improve mkfs.btrfs (From OE-Core rev: 57a2140dc9673c65fea088fbd024fbd002e6937b) Signed-off-by: Nitin A Kamble Signed-off-by: Richard Purdie --- .../btrfs-tools/btrfs-tools/debian/02-ftbfs.patch | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch (limited to 'meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch') diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch new file mode 100644 index 0000000000..7b47190757 --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/debian/02-ftbfs.patch @@ -0,0 +1,125 @@ +Upstream-Status: Inappropriate [distribution: debian] + +Authors: + Luca Bruno + Alexander Kurtz + Daniel Baumann +Description: + Patch to properly cast and avoiding compiler warnings. Fixes FTBFS on alpha + and ia64 (Closes: #539433, #583768). + +diff -Naurp btrfs-tools.orig/btrfsctl.c btrfs-tools/btrfsctl.c +--- btrfs-tools.orig/btrfsctl.c 2010-06-01 07:22:33.000000000 +0200 ++++ btrfs-tools/btrfsctl.c 2010-06-05 08:44:05.000000000 +0200 +@@ -234,7 +234,7 @@ int main(int ac, char **av) + args.fd = fd; + ret = ioctl(snap_fd, command, &args); + } else if (command == BTRFS_IOC_DEFAULT_SUBVOL) { +- printf("objectid is %llu\n", objectid); ++ printf("objectid is %llu\n", (long long unsigned int) objectid); + ret = ioctl(fd, command, &objectid); + } else + ret = ioctl(fd, command, &args); +diff -Naurp btrfs-tools.orig/btrfs-list.c btrfs-tools/btrfs-list.c +--- btrfs-tools.orig/btrfs-list.c 2010-06-01 07:22:33.000000000 +0200 ++++ btrfs-tools/btrfs-list.c 2010-06-05 08:47:27.000000000 +0200 +@@ -248,8 +248,9 @@ static int resolve_root(struct root_look + break; + } + } +- printf("ID %llu top level %llu path %s\n", ri->root_id, top_id, +- full_path); ++ printf("ID %llu top level %llu path %s\n", ++ (long long unsigned int) ri->root_id, ++ (long long unsigned int) top_id, full_path); + free(full_path); + return 0; + } +diff -Naurp btrfs-tools.orig/btrfs-map-logical.c btrfs-tools/btrfs-map-logical.c +--- btrfs-tools.orig/btrfs-map-logical.c 2010-06-01 07:22:33.000000000 +0200 ++++ btrfs-tools/btrfs-map-logical.c 2010-06-05 08:48:10.000000000 +0200 +@@ -65,8 +65,9 @@ struct extent_buffer *debug_read_block(s + eb->dev_bytenr = multi->stripes[0].physical; + + fprintf(info_file, "mirror %d logical %Lu physical %Lu " +- "device %s\n", mirror_num, bytenr, eb->dev_bytenr, +- device->name); ++ "device %s\n", mirror_num, ++ (long long unsigned int) bytenr, ++ (long long unsigned int) eb->dev_bytenr, device->name); + kfree(multi); + + if (!copy || mirror_num == copy) +diff -Naurp btrfs-tools.orig/convert.c btrfs-tools/convert.c +--- btrfs-tools.orig/convert.c 2010-06-01 07:22:33.000000000 +0200 ++++ btrfs-tools/convert.c 2010-06-05 08:43:29.000000000 +0200 +@@ -2572,7 +2572,7 @@ int do_rollback(const char *devname, int + ext2_root = btrfs_read_fs_root(root->fs_info, &key); + if (!ext2_root || IS_ERR(ext2_root)) { + fprintf(stderr, "unable to open subvol %llu\n", +- key.objectid); ++ (unsigned long long) key.objectid); + goto fail; + } + +diff -Naurp btrfs-tools.orig/debug-tree.c btrfs-tools/debug-tree.c +--- btrfs-tools.orig/debug-tree.c 2010-06-01 07:22:33.000000000 +0200 ++++ btrfs-tools/debug-tree.c 2010-06-05 08:46:17.000000000 +0200 +@@ -162,7 +162,8 @@ int main(int ac, char **av) + root->nodesize, 0); + } + if (!leaf) { +- fprintf(stderr, "failed to read %llu\n", block_only); ++ fprintf(stderr, "failed to read %llu\n", ++ (long long unsigned int) block_only); + return 0; + } + btrfs_print_tree(root, leaf, 0); +diff -Naurp btrfs-tools.orig/disk-io.c btrfs-tools/disk-io.c +--- btrfs-tools.orig/disk-io.c 2010-06-01 07:18:01.000000000 +0200 ++++ btrfs-tools/disk-io.c 2010-06-05 08:43:29.000000000 +0200 +@@ -678,7 +678,8 @@ struct btrfs_root *open_ctree_fd(int fp, + ~BTRFS_FEATURE_INCOMPAT_SUPP; + if (features) { + printk("couldn't open because of unsupported " +- "option features (%Lx).\n", features); ++ "option features (%Lx).\n", ++ (unsigned long long)features); + BUG_ON(1); + } + +@@ -692,7 +693,8 @@ struct btrfs_root *open_ctree_fd(int fp, + ~BTRFS_FEATURE_COMPAT_RO_SUPP; + if (writes && features) { + printk("couldn't open RDWR because of unsupported " +- "option features (%Lx).\n", features); ++ "option features (%Lx).\n", ++ (unsigned long long) features); + BUG_ON(1); + } + +diff -Naurp btrfs-tools.orig/extent-tree.c btrfs-tools/extent-tree.c +--- btrfs-tools.orig/extent-tree.c 2010-06-01 07:18:01.000000000 +0200 ++++ btrfs-tools/extent-tree.c 2010-06-05 08:43:29.000000000 +0200 +@@ -1448,7 +1448,8 @@ int btrfs_lookup_extent_info(struct btrf + goto out; + if (ret != 0) { + btrfs_print_leaf(root, path->nodes[0]); +- printk("failed to find block number %Lu\n", bytenr); ++ printk("failed to find block number %Lu\n", ++ (unsigned long long) bytenr); + BUG(); + } + +diff -Naurp btrfs-tools.orig/print-tree.c btrfs-tools/print-tree.c +--- btrfs-tools.orig/print-tree.c 2010-06-01 07:22:33.000000000 +0200 ++++ btrfs-tools/print-tree.c 2010-06-05 08:43:29.000000000 +0200 +@@ -494,7 +494,7 @@ void btrfs_print_leaf(struct btrfs_root + case BTRFS_DIR_LOG_ITEM_KEY: + dlog = btrfs_item_ptr(l, i, struct btrfs_dir_log_item); + printf("\t\tdir log end %Lu\n", +- btrfs_dir_log_end(l, dlog)); ++ (unsigned long long) btrfs_dir_log_end(l, dlog)); + break; + case BTRFS_ORPHAN_ITEM_KEY: + printf("\t\torphan item\n"); -- cgit v1.2.3-54-g00ecf