提交 7c0b5ec5 编写于 作者: D Dhruba Borthakur

leveldb thrift server uses an incorrect root directory

Summary: The offsets used to speficy hostname and dbdir from the command line were not handled correctly.

Test Plan: none.

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D4683
上级 f16e3936
......@@ -73,10 +73,10 @@ public:
cache_size_ = l;
} else if (sscanf(argv[i], "--cache_numshardbits=%d%c", &n, &junk) == 1) {
cache_numshardbits_ = n;
} else if (strncmp(argv[i], "--hostname=", 10) == 0) {
hostname_ = argv[i] + 10;
} else if (strncmp(argv[i], "--rootdir=", 9) == 0) {
rootdir_ = argv[i] + 9;
} else if (strncmp(argv[i], "--hostname=", 11) == 0) {
hostname_ = argv[i] + 11;
} else if (strncmp(argv[i], "--rootdir=", 10) == 0) {
rootdir_ = argv[i] + 10;
} else {
fprintf(stderr, "Invalid flag '%s'\n", argv[i]);
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册