btrfs-progs: Allow use of get_device_info()
authorGoffredo Baroncelli <kreijack@libero.it>
Thu, 13 Feb 2014 19:19:44 +0000 (20:19 +0100)
committerChris Mason <clm@fb.com>
Fri, 21 Mar 2014 13:23:22 +0000 (06:23 -0700)
Allow the use of get_device_info() for different units.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
utils.c
utils.h

diff --git a/utils.c b/utils.c
index 398678f..cbbe465 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -1641,7 +1641,7 @@ void close_file_or_dir(int fd, DIR *dirstream)
                close(fd);
 }
 
-static int get_device_info(int fd, u64 devid,
+int get_device_info(int fd, u64 devid,
                struct btrfs_ioctl_dev_info_args *di_args)
 {
        int ret;
diff --git a/utils.h b/utils.h
index 888ebe8..3c62066 100644 (file)
--- a/utils.h
+++ b/utils.h
@@ -98,5 +98,7 @@ int lookup_ino_rootid(int fd, u64 *rootid);
 int btrfs_scan_lblkid(int update_kernel);
 int get_btrfs_mount(const char *dev, char *mp, size_t mp_size);
 int find_mount_root(const char *path, char **mount_root);
+int get_device_info(int fd, u64 devid,
+               struct btrfs_ioctl_dev_info_args *di_args);
 
 #endif