btrfs-progs: better option/error handling for btrfs-vol
authorEric Sandeen <sandeen@redhat.com>
Mon, 4 Mar 2013 22:40:03 +0000 (16:40 -0600)
committerDavid Sterba <dsterba@suse.cz>
Sun, 10 Mar 2013 15:06:37 +0000 (16:06 +0100)
commit6626354fdf00ce8d61edc69c0d65d283ef99c69c
tree888eb88cb1d70d0baf472cfb61a937df600305b7
parent7b81119b1d3904cf00ec29140e8bc5d86a12902f
btrfs-progs: better option/error handling for btrfs-vol

Today wrong cmdlines give odd results:

# ./btrfs-vol /dev/sdb1
Unable to open device (null)
# ./btrfs-vol -a /dev/sdb1
usage: btrfs-vol [options] mount_point ...

Make it a bit more informative:

# ./btrfs-vol /dev/sdb1
No command specified
usage: btrfs-vol [options] mount_point ...
# ./btrfs-vol -a /dev/sdb1
No mountpoint specified
usage: btrfs-vol [options] mount_point ...

(even though it's deprecated ...)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
btrfs-vol.c