From 64be93db95a6a26e430bccfbcbd7d2b0dbd1d561 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 6 Jul 2012 03:02:42 +0000 Subject: [PATCH] scst: Fix sysfs code for parsing parameters when adding or replacing a LUN Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4394 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_sysfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 1d0a2627b..0509703d9 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -1155,12 +1155,11 @@ static int __scst_process_luns_mgmt_store(char *buffer, goto out_unlock; } - e = scst_get_next_lexem(&pp); - while (1) { - char *pp; unsigned long val; - char *param = scst_get_next_token_str(&e); + char *param = scst_get_next_token_str(&pp); + char *pp; + if (param == NULL) break;