mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-09 05:11:56 +02:00
swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27374 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2f9bb1e3e1
commit
050e164d86
@ -397,6 +397,9 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
|
|||||||
val.value.ports = ports;
|
val.value.ports = ports;
|
||||||
break;
|
break;
|
||||||
case SWITCH_TYPE_NOVAL:
|
case SWITCH_TYPE_NOVAL:
|
||||||
|
if (str && !strcmp(str, "0"))
|
||||||
|
return 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user