From 91fd8043078064fbe12d77c28d55558c3a437f65 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 19 Feb 2018 08:28:18 -0800 Subject: [PATCH] common: omit short option for id in help for clients Commit 8e3abf3ce337 removed the short option for clients to conflicts. Fixes: http://tracker.ceph.com/issues/23041 Signed-off-by: Patrick Donnelly --- src/common/ceph_argparse.cc | 30 ++++++++++++++++-------------- src/test/cli/radosgw-admin/help.t | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/common/ceph_argparse.cc b/src/common/ceph_argparse.cc index 7a2e8ea9182..a89de95f6e4 100644 --- a/src/common/ceph_argparse.cc +++ b/src/common/ceph_argparse.cc @@ -521,22 +521,24 @@ CephInitParameters ceph_argparse_early_args static void generic_usage(bool is_server) { - cout << "\ - --conf/-c FILE read configuration from the given configuration file\n\ - --id/-i ID set ID portion of my name\n\ - --name/-n TYPE.ID set name\n\ - --cluster NAME set cluster name (default: ceph)\n\ - --setuser USER set uid to user or uid (and gid to user's gid)\n\ - --setgroup GROUP set gid to group or gid\n\ - --version show version and quit\n\ -" << std::endl; + cout << + " --conf/-c FILE read configuration from the given configuration file" << std::endl << + (is_server ? + " --id/-i ID set ID portion of my name" : + " --id ID set ID portion of my name") << std::endl << + " --name/-n TYPE.ID set name" << std::endl << + " --cluster NAME set cluster name (default: ceph)" << std::endl << + " --setuser USER set uid to user or uid (and gid to user's gid)" << std::endl << + " --setgroup GROUP set gid to group or gid" << std::endl << + " --version show version and quit" << std::endl + << std::endl; if (is_server) { - cout << "\ - -d run in foreground, log to stderr.\n\ - -f run in foreground, log to usual location.\n"; - cout << "\ - --debug_ms N set message debug level (e.g. 1)\n"; + cout << + " -d run in foreground, log to stderr" << std::endl << + " -f run in foreground, log to usual location" << std::endl << + std::endl << + " --debug_ms N set message debug level (e.g. 1)" << std::endl; } cout.flush(); diff --git a/src/test/cli/radosgw-admin/help.t b/src/test/cli/radosgw-admin/help.t index 521b02849eb..a7a388e14ea 100644 --- a/src/test/cli/radosgw-admin/help.t +++ b/src/test/cli/radosgw-admin/help.t @@ -287,7 +287,7 @@ --path-prefix path prefix for filtering roles --conf/-c FILE read configuration from the given configuration file - --id/-i ID set ID portion of my name + --id ID set ID portion of my name --name/-n TYPE.ID set name --cluster NAME set cluster name (default: ceph) --setuser USER set uid to user or uid (and gid to user's gid) -- 2.39.5