'-' is a valid character for Lustre fsname. Replace "strchr()"
with "strrchr()" to correctly parse fsname from configuration.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Darby Vicker <darby.vicker-1@nasa.gov>
Change-Id: Ib972288668f1b7bcf1f9188c0e9cc77027e7ceeb
Reviewed-on: https://review.whamcloud.com/30626
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
/* Format of label:
* fsname-<role><index> or <role><index> */
- ptr = strchr(label, '-');
+ ptr = strrchr(label, '-');
if (ptr) {
if (strncmp(si->si_fsname, label, ptr - label) != 0) {
/* This line is NOT for current filesystem .*/