btrfs-progs: Fix wrong return value when executing 'fi show' on umounted device.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 14 Jan 2015 06:50:40 +0000 (14:50 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 14 Jan 2015 14:15:06 +0000 (15:15 +0100)
commite015a83e6d300a3ee972c6ba295e860efd6aa0be
tree4ca2b8468009cfc9db4c17e7802612d79d6641e1
parent54498f9a14ea34f2c9a1ce82d412fca7a05b05fc
btrfs-progs: Fix wrong return value when executing 'fi show' on umounted device.

When executing 'btrfs fi show' on unmounted device, even no problem
happens, the return value is still 1 not 0.

The problem lies in search_umounted_fs_uuids(), where when it finds the
given uuid, it should return 1, but later uuid copy overwrites the return
value, causing it always return 0 under that case.

Fix it by pass found as pointer, and return value only indicates
whether anything wrong happens, whether found or not is stored in the
new parameter.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-filesystem.c