// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
+
/*
* Ceph - scalable distributed file system
*
#include "common/ceph_argparse.h"
#include "common/debug.h"
#include "global/global_init.h"
-#include "include/assert.h"
+#include "include/ceph_assert.h"
#include "include/str_list.h"
#include "rgw_token.h"
std::string val;
vector<const char*> args;
argv_to_vec(argc, (const char **)argv, args);
- env_to_vec(args);
+ if (args.empty()) {
+ cerr << argv[0] << ": -h or --help for usage" << std::endl;
+ exit(1);
+ }
+ if (ceph_argparse_need_usage(args)) {
+ usage();
+ exit(0);
+ }
auto cct = global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT,
CODE_ENVIRONMENT_UTILITY, 0);
if ((! do_encode) ||
(type == RGWToken::TOKEN_NONE)) {
- usage();
return -EINVAL;
}