Running ./ldb without any extra arg print usage (#7107)
Summary: as title. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7107 Test Plan: make ldb && ./ldb Reviewed By: pdillinger Differential Revision: D22451399 Pulled By: riversand963 fbshipit-source-id: 797645e06473bb9cf139c533877e5161281515e8
This commit is contained in:
parent
b35a2f9146
commit
842bd2742a
@ -107,7 +107,10 @@ int LDBCommandRunner::RunCommand(
|
|||||||
const LDBOptions& ldb_options,
|
const LDBOptions& ldb_options,
|
||||||
const std::vector<ColumnFamilyDescriptor>* column_families) {
|
const std::vector<ColumnFamilyDescriptor>* column_families) {
|
||||||
if (argc <= 2) {
|
if (argc <= 2) {
|
||||||
if (std::string(argv[1]) == "--version") {
|
if (argc <= 1) {
|
||||||
|
PrintHelp(ldb_options, argv[0], /*to_stderr*/ true);
|
||||||
|
return 1;
|
||||||
|
} else if (std::string(argv[1]) == "--version") {
|
||||||
printf("ldb from RocksDB %d.%d.%d\n", ROCKSDB_MAJOR, ROCKSDB_MINOR,
|
printf("ldb from RocksDB %d.%d.%d\n", ROCKSDB_MAJOR, ROCKSDB_MINOR,
|
||||||
ROCKSDB_PATCH);
|
ROCKSDB_PATCH);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user