Whamcloud - gitweb
LU-9859 lnet: simplify cfs_expr_list_parse() 43/50843/6
authorMr NeilBrown <neilb@suse.de>
Wed, 25 Nov 2020 00:04:09 +0000 (11:04 +1100)
committerOleg Drokin <green@whamcloud.com>
Mon, 7 Aug 2023 03:49:18 +0000 (03:49 +0000)
commit22c8093c4e96039567f2d1f741d939c01f1a8cbd
tree135e3955a316b4aed5f3e235f4b11e64a33bee07
parent9c453ba6d9a0152aa75e92b8372d54a758a10b18
LU-9859 lnet: simplify cfs_expr_list_parse()

If we dup the string first, we can use a mutating approach to parsing,
allowing us to use standard tools like strsep, strcmp, kstrtouint,
etc.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I40a1f7bc65bd122d22cd53cf3c645f4a3730f82e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50843
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/libcfs_string.c