mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-15 11:24:42 +00:00
swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value
SVN-Revision: 27374
This commit is contained in:
parent
f9f3ddebe8
commit
b017df3812
@ -397,6 +397,9 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
|
||||
val.value.ports = ports;
|
||||
break;
|
||||
case SWITCH_TYPE_NOVAL:
|
||||
if (str && !strcmp(str, "0"))
|
||||
return 0;
|
||||
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user