btrfs-progs: btrfstune: fix multiple options error
authorFan Chengniang <fancn.fnst@cn.fujitsu.com>
Fri, 9 Jan 2015 08:11:42 +0000 (16:11 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 14 Jan 2015 15:51:16 +0000 (16:51 +0100)
commit6eafa191c09f141831dcd77e7b9241d41fb35680
treee8577886e922ffb70286b1f5fccb4207c41b545b
parent27ceeed1a7b7fedcbe19180a22df334d9cfadcc2
btrfs-progs: btrfstune: fix multiple options error

when we use multiple options, error return status will be override by the
last option status.

example: btrfstune -S 1 -r /dev/loop0

when -S option fails and -r option succeeds, return value is 0, rather than
1, where 1 is the right return status.

Reported-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Signed-off-by: Fan Chengniang <fancn.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
btrfstune.c