X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=chunk-recover.c;h=705bcf52379da4d025f9aeb44a01f859a5cd404b;hb=f5dd778f5299088f89d380ce922a84d77a98b9d6;hp=f1fa750463c352601726e322ec93ac3a70857cf1;hpb=37ddab31fd0c11b960baf14484567d4f7286874b;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/chunk-recover.c b/chunk-recover.c index f1fa750..705bcf5 100644 --- a/chunk-recover.c +++ b/chunk-recover.c @@ -451,24 +451,6 @@ static void print_device_extent_tree(struct device_extent_tree *tree) printf("\n"); } -static void print_device_info(struct btrfs_device *device, char *prefix) -{ - if (prefix) - printf("%s", prefix); - printf("Device: id = %llu, name = %s\n", - device->devid, device->name); -} - -static void print_all_devices(struct list_head *devices) -{ - struct btrfs_device *dev; - - printf("All Devices:\n"); - list_for_each_entry(dev, devices, dev_list) - print_device_info(dev, "\t"); - printf("\n"); -} - static void print_scan_result(struct recover_control *rc) { if (!rc->verbose) @@ -2389,6 +2371,7 @@ int btrfs_recover_chunk_tree(char *path, int verbose, int yes) } trans = btrfs_start_transaction(root, 1); + BUG_ON(IS_ERR(trans)); ret = remove_chunk_extent_item(trans, &rc, root); BUG_ON(ret);