devlink: Fix param set handling for string type

In case devlink param type is string, it needs to copy the string value
it got from the input to devlink_param_value.

Fixes: e3b7ca18ad ("devlink: Add param set command")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Moshe Shemesh
2018-10-10 16:09:25 +03:00
committed by David S. Miller
parent 4cf34c0cf6
commit f355cfcdb2
2 changed files with 9 additions and 4 deletions

View File

@@ -311,7 +311,7 @@ union devlink_param_value {
u8 vu8;
u16 vu16;
u32 vu32;
const char *vstr;
char vstr[DEVLINK_PARAM_MAX_STRING_VALUE];
bool vbool;
};