From b808cb66aa7e68bfadfc73f8e5191d284413e3d1 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Mon, 25 Feb 2013 16:54:37 -0600 Subject: btrfs-progs: btrfs_list_get_path_rootid error handling btrfs_list_get_path_rootid() tries to return a negative number on error, but it's a u64 function. Callers which test for a return < 0 will never see an error. Change the function to fill in the rootid via a pointer, and then return a simple int as error. Signed-off-by: Eric Sandeen --- btrfs-list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'btrfs-list.h') diff --git a/btrfs-list.h b/btrfs-list.h index 5d874549..2894451d 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -156,5 +156,5 @@ int btrfs_list_subvols_print(int fd, struct btrfs_list_filter_set *filter_set, int btrfs_list_find_updated_files(int fd, u64 root_id, u64 oldest_gen); int btrfs_list_get_default_subvolume(int fd, u64 *default_id); char *btrfs_list_path_for_root(int fd, u64 root); -u64 btrfs_list_get_path_rootid(int fd); +int btrfs_list_get_path_rootid(int fd, u64 *treeid); int btrfs_get_subvol(int fd, struct root_info *the_ri); -- cgit v1.2.3