diff options
author | David Sterba <dsterba@suse.com> | 2017-01-25 16:35:00 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-03-08 13:00:45 +0100 |
commit | 1c880f34f13e51aae9704449603f74680e442cf6 (patch) | |
tree | 3fcb9fd60f2084ec5157c06b8abdd3e67028e500 /utils.h | |
parent | e235f12de2d2b49145569a07516a52f0f793622d (diff) |
btrfs-progs: move help defines to own header
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 47 |
1 files changed, 0 insertions, 47 deletions
@@ -64,26 +64,6 @@ #define BTRFS_UUID_UNPARSED_SIZE 37 -#define ARGV0_BUF_SIZE PATH_MAX - -#define GETOPT_VAL_SI 256 -#define GETOPT_VAL_IEC 257 -#define GETOPT_VAL_RAW 258 -#define GETOPT_VAL_HUMAN_READABLE 259 -#define GETOPT_VAL_KBYTES 260 -#define GETOPT_VAL_MBYTES 261 -#define GETOPT_VAL_GBYTES 262 -#define GETOPT_VAL_TBYTES 263 - -#define GETOPT_VAL_HELP 270 - -int check_argc_exact(int nargs, int expected); -int check_argc_min(int nargs, int expected); -int check_argc_max(int nargs, int expected); - -void fixup_argv0(char **argv, const char *token); -void set_argv0(char **argv); - /* * Output modes of size */ @@ -286,34 +266,7 @@ static inline u64 div_factor(u64 num, int factor) int btrfs_tree_search2_ioctl_supported(int fd); int btrfs_check_nodesize(u32 nodesize, u32 sectorsize, u64 features); -const char *get_argv0_buf(void); - -#define HELPINFO_UNITS_LONG \ - "--raw raw numbers in bytes", \ - "--human-readable human friendly numbers, base 1024 (default)", \ - "--iec use 1024 as a base (KiB, MiB, GiB, TiB)", \ - "--si use 1000 as a base (kB, MB, GB, TB)", \ - "--kbytes show sizes in KiB, or kB with --si", \ - "--mbytes show sizes in MiB, or MB with --si", \ - "--gbytes show sizes in GiB, or GB with --si", \ - "--tbytes show sizes in TiB, or TB with --si" - -#define HELPINFO_UNITS_SHORT_LONG \ - "-b|--raw raw numbers in bytes", \ - "-h|--human-readable", \ - " human friendly numbers, base 1024 (default)", \ - "-H human friendly numbers, base 1000", \ - "--iec use 1024 as a base (KiB, MiB, GiB, TiB)", \ - "--si use 1000 as a base (kB, MB, GB, TB)", \ - "-k|--kbytes show sizes in KiB, or kB with --si", \ - "-m|--mbytes show sizes in MiB, or MB with --si", \ - "-g|--gbytes show sizes in GiB, or GB with --si", \ - "-t|--tbytes show sizes in TiB, or TB with --si" - unsigned int get_unit_mode_from_arg(int *argc, char *argv[], int df_mode); -void clean_args_no_options(int argc, char *argv[], const char * const *usage); -void clean_args_no_options_relaxed(int argc, char *argv[], - const char * const *usagestr); int string_is_numerical(const char *str); #if DEBUG_VERBOSE_ERROR |