From 52d4d48ae9e76fa5ff514b98f62049b446ef0b66 Mon Sep 17 00:00:00 2001 From: Rajesh T G Date: Wed, 21 Oct 2015 15:12:26 +0530 Subject: [PATCH] LU-7234 mgs: For handling dash in FSNAME For FSNAME 'lustre-1, function mgs_llog_open() in mgs_handler.c has been modified to call strrchr instead of strchr so that 'logname' variable is updated with entire FSNAME including '-'. Seagate-bug-id: MRP-2790 Signed-off-by: Sundarraj Illindra Change-Id: I07b2b874f4cf881d0aa2c07586a113fcce8bebfe Reviewed-on: http://review.whamcloud.com/16901 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/mgs/mgs_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index b6aaca3..c4ce666 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -565,7 +565,7 @@ static int mgs_llog_open(struct tgt_session_info *tsi) logname = req_capsule_client_get(tsi->tsi_pill, &RMF_NAME); if (logname) { - char *ptr = strchr(logname, '-'); + char *ptr = strrchr(logname, '-'); int len = (ptr != NULL) ? (int)(ptr - logname) : 0; if (ptr == NULL || len >= sizeof(mgi->mgi_fsname)) { -- 1.8.3.1