My bad. Same mail forwarded to the openwrt-devel list.

---------- Forwarded message ----------
From: Yousong Zhou <yszhou4t...@gmail.com>
Date: 12 December 2013 23:05
Subject: Re: [OpenWrt-Devel] [PATCH 3/3] mac80211.sh: fix wds option.
To: Felix Fietkau <n...@openwrt.org>


Hi, Felix

On 12 December 2013 21:31, Felix Fietkau <n...@openwrt.org> wrote:
> On 2013-12-12 13:40, Yousong Zhou wrote:
>> commit a7ef3ef `mac80211: add missing set_default to fix stray "radio0:
>> sh: bad number" messages" effectly disabled wds option.
>>
>> Wds is actually set_default before, it is json_get_var() which would set
>> variables' value to null if they does not appear in the JSON data. This
>> will cause "bad number" error.
>>
>>       Thu Dec  5 16:55:54 2013 daemon.notice netifd: radio0 (17747): sh: bad 
>> number
>>
>> Signed-off-by: Yousong Zhou <yszhou4t...@gmail.com>
> I don't understand how this change would make any difference at all.
> 'set_default wds 0' should be equivalent to: 'wds="${wds:-0}"', which
> should be the same as [ -z "$wds" ] && wds=0.

You are right. My previous patch for 'bad number' was exactly ` [ -z
"$wds" ] && wds=0`  ;)

I just found out the definition of set_default() in netifd's utils.sh.
There are too many shell files and similar functions scattered all
around in the tree I guess.

Thank you for your time.

        yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to