Commit Graph

4 Commits (1ebfc031cb0b2fa4eef464003377d9860410f424)

Author SHA1 Message Date
David Sterba 309719fb97 btrfs-progs: help: add helper for unrecognized option error message
Currently any unrecognized option does not print very usable message and
only dumps the whole help. Other common utilities (eg. from the
util-linux suite) print a short message and point to help. And we're
going to do the same.

Example:

  $ btrfs device add --unknown device path
  btrfs device add: unrecognized option '--unknown'
  Try 'btrfs device add --help' for more information

Signed-off-by: David Sterba <dsterba@suse.com>
2019-03-05 12:57:55 +01:00
Gu Jinxiang 50417091a0 btrfs-progs: Remove unused parameter
Parameter usagestr is not used, remove it.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:55 +02:00
David Sterba 628307f5c4 btrfs-progs: updated and add missing function attributes to the definition
Reported by sparse. Make the prototype match the definition and put the
attributes before the function.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-09-25 15:18:32 +02:00
David Sterba 1c880f34f1 btrfs-progs: move help defines to own header
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:45 +01:00