From 6eccbe81f1baf11e00d55bdf86827c632de4cc5f Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Tue, 5 Dec 2017 10:39:44 +0200 Subject: btrfs-progs: Factor out common print_device_info This function has been copied twice in chunk-recover and super-recover. Factor it out into utils.c/h and use it. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: David Sterba --- chunk-recover.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'chunk-recover.c') diff --git a/chunk-recover.c b/chunk-recover.c index 4a6d7141..705bcf52 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) -- cgit v1.2.3