]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: CEPH_ARGS should trim whitespaces
authorLoic Dachary <loic@dachary.org>
Wed, 1 Jan 2014 20:23:18 +0000 (21:23 +0100)
committerLoic Dachary <loic@dachary.org>
Wed, 1 Jan 2014 20:23:18 +0000 (21:23 +0100)
commit07f5399408b080d775786e45a5055cc0772741dc
treeae61a6f12b17ee64f127948746c881529f8ab1c4
parentfe3fd5fb4aa6327256dfaf731914dc4f79b0d44e
common: CEPH_ARGS should trim whitespaces

CEPH_ARGS when parsed by env_to_vec did not trim trailing and leading
whitespaces: they would unexpectedly be parsed as empty arguments and
lead to confusing errors such as :

    CEPH_ARGS=' --id 3' ceph-conf --lookup mon-data
    unable to parse option: ''

The parsing code is replaced with str_vec(). It also resolves the
problem of the hard limit to 1000 characters imposed by the static
buffer that would silently truncate any CEPH_ARGS content.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/common/ceph_argparse.cc