Whamcloud - gitweb
LU-9325 obdclass: handle strings correctly in lmd_find_delimiter 58/26558/7
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 1 May 2018 15:42:28 +0000 (11:42 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 17 May 2018 02:30:45 +0000 (02:30 +0000)
commit25aed16fe4d33c3ce09a4135774173e7adba3943
tree8f7db29be468072d3a32c5a32db152e42eafdf47
parent651f2cdd2d8df1d4318f874993ab0706d16ce490
LU-9325 obdclass: handle strings correctly in lmd_find_delimiter

The feedback from the pushing of the lmd_find_delimiter() work
upstream was not to directly parse the string data passed in.

Change the return value to a bool and return true when the
character is found. Currently even though this function is
named lmd_find_delimiter() it return 1 when nothing is found
which is counter intuitive. Use strcspn() to determine the
position where the first delimiter is found. Add a test to
make sure the mount string is valid.

Change-Id: I7ef53f29a6d3284acd01225c115712d3674e8435
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/26558
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/obd_mount.c