diff --git a/src/common/ceph_argparse.cc b/src/common/ceph_argparse.cc index 9c2703ab354b6..b4dbfd70c962e 100644 --- a/src/common/ceph_argparse.cc +++ b/src/common/ceph_argparse.cc @@ -23,7 +23,6 @@ #include "include/str_list.h" #include "msg/msg_types.h" -#include #include #include #include @@ -46,91 +45,6 @@ #undef generic_dout #undef dendl -static bool cmd_is_char(const char *cmd) -{ - return ((cmd[0] == '-') && - cmd[1] && !cmd[2]); -} - -bool ceph_argparse_cmd_equals(const char *cmd, const char *opt, char char_opt, - unsigned int *val_pos) -{ - unsigned int i; - unsigned int len = strlen(opt); - - *val_pos = 0; - - if (!*cmd) - return false; - - if (char_opt && cmd_is_char(cmd)) - return (char_opt == cmd[1]); - - if ((cmd[0] != '-') || (cmd[1] != '-')) - return false; - - for (i=0; i& args) { @@ -182,13 +75,6 @@ void argv_to_vec(int argc, const char **argv, args.push_back(argv[i]); } -void argv_to_deq(int argc, const char **argv, - std::deque& args) -{ - for (int i=1; i& args, int& argc, const char **&argv) { diff --git a/src/common/ceph_argparse.h b/src/common/ceph_argparse.h index 075e2df6d38e5..50168be41251a 100644 --- a/src/common/ceph_argparse.h +++ b/src/common/ceph_argparse.h @@ -31,45 +31,6 @@ #include "common/entity_name.h" #include "msg/msg_types.h" -/////////////////////// Macros /////////////////////// -#define FOR_EACH_ARG(args) \ - __isarg = 1 < args.size(); \ - for (unsigned i=0; i& args); -extern void env_to_deq(std::deque& args); extern void argv_to_vec(int argc, const char **argv, std::vector& args); -extern void argv_to_deq(int argc, const char **argv, - std::deque& args); extern void vec_to_argv(std::vector& args, int& argc, const char **&argv);