[openwrt/openwrt] base-files: use named variables in the wifi script
LEDE Commits
lede-commits at lists.infradead.org
Wed Apr 12 10:50:08 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8fbe7738b9ef4131c8ca069c0f3abde134139da2
commit 8fbe7738b9ef4131c8ca069c0f3abde134139da2
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed Nov 2 08:49:35 2022 +0100
base-files: use named variables in the wifi script
Use the already present but unused $cmd and $dev variables instead of
positional parameters in ubus_wifi_cmd() to improve readability.
Signed-off-by: Andre Heider <a.heider at gmail.com>
---
package/base-files/files/sbin/wifi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 6a9dce7e8a..29585389df 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -17,8 +17,8 @@ ubus_wifi_cmd() {
local dev="$2"
json_init
- [ -n "$2" ] && json_add_string device "$2"
- ubus call network.wireless "$1" "$(json_dump)"
+ [ -n "$dev" ] && json_add_string device "$dev"
+ ubus call network.wireless "$cmd" "$(json_dump)"
}
find_net_config() {(
More information about the lede-commits
mailing list