summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-10-07 22:03:00 +0200
committerSage Weil <sage@newdream.net>2011-10-07 22:03:00 +0200
commit2f877f82203fd65e73b45a97bc10630f22a51351 (patch)
tree13f23e23b57de4676b8db864743a0986ea2a3f73
parentcrushtool: add --force N (diff)
downloadceph-2f877f82203fd65e73b45a97bc10630f22a51351.tar.xz
ceph-2f877f82203fd65e73b45a97bc10630f22a51351.zip
crushtool: fix --weight arg parsing
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--src/crushtool.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crushtool.cc b/src/crushtool.cc
index ae4ce719d18..0f600eec8ee 100644
--- a/src/crushtool.cc
+++ b/src/crushtool.cc
@@ -949,6 +949,7 @@ int main(int argc, const char **argv)
if (i == args.end())
usage();
float f = atof(*i);
+ i = args.erase(i);
int w = (int)(f * 0x10000);
if (w < 0)
w = 0;