]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
Fix to some of the command line parsing (including rbd)
authorRajesh Nambiar <rajesh.n@msystechnologies.com>
Wed, 8 Apr 2015 06:39:07 +0000 (23:39 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 8 Apr 2015 06:39:07 +0000 (23:39 -0700)
commitb15f6d0231b8f9a3bfe1c1137935fd63ccd8cc17
treebcf960d51b911f1e784cb5baa7af627b962e42d6
parentb0172d870e526753ea957e6781d64d590af6d047
 Fix to some of the command line parsing (including rbd)

Fix#: 2862

Changes to some of the common files for command line parsing

Change to ceph_argparse.cc
-------------------------

Added function ceph_arg_value_type()
  Given an input it will determine
   i) If that input is an option or not
   ii) If input is numeric in nature or not.

  It will set the flag bool_option and bool_numeric appropriately.
  This function is called by ceph_argparse_witharg() to figure out if
  the input parameter to those functions are numeric in nature and not
  an option.  If the input parameter to ceph_argparse_witharg()
  happens to be an option then it implies that user didn't supply
  value to the option.

Changes to strol.cc
-------------------
Changes to strict_strtoll() and strict_strtol()

  Both these functions reponsibility is to convert the string to long or to int.
  I felt it may be not be good for it to display error message within this function,
  rather caller of this function who has better understanding of the function's purpose
  can display the error message.

  Made change in this function to just create a generic error message,Its the
  caller of this function decides what to do with this message.

Signed-off-by: Rajesh Nambiar <rajesh.n@msystechnologies.com>
src/common/ceph_argparse.cc
src/common/strtol.cc