Whamcloud - gitweb
LU-12854 nodemap: allow boolean value for audit_mode 50/36450/2
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 14 Oct 2019 12:50:58 +0000 (14:50 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 May 2020 08:24:30 +0000 (08:24 +0000)
Allow "true/false" or "on/off" for audit_mode property
on nodemap entries.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ibc6123dc64a88a80f474908d82e00269daacac69
Reviewed-on: https://review.whamcloud.com/36450
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
lustre/mgs/mgs_llog.c

index 1e37173..b6fb67f 100644 (file)
@@ -5432,7 +5432,7 @@ int mgs_nodemap_cmd(const struct lu_env *env, struct mgs_device *mgs,
                rc = nodemap_set_deny_unknown(nodemap_name, bool_switch);
                break;
        case LCFG_NODEMAP_AUDIT_MODE:
-               rc = kstrtoul(param, 10, (unsigned long *)&bool_switch);
+               rc = kstrtobool(param, &bool_switch);
                if (rc == 0)
                        rc = nodemap_set_audit_mode(nodemap_name, bool_switch);
                break;