Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
94f5bd23
Commit
94f5bd23
authored
4 years ago
by
Jan-Tarek Butt
Browse files
Options
Downloads
Patches
Plain Diff
gluon-core: 200-wireless simplify if conditions
Signed-off-by:
Jan-Tarek Butt
<
tarek@ring0.de
>
parent
04b87dc1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless
+5
-5
5 additions, 5 deletions
package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless
with
5 additions
and
5 deletions
package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless
+
5
−
5
View file @
94f5bd23
...
@@ -82,20 +82,20 @@ local function get_htmode(radio)
...
@@ -82,20 +82,20 @@ local function get_htmode(radio)
end
end
local
function
is_disabled
(
name
)
local
function
is_disabled
(
name
)
if
uci
:
get
(
'wireless'
,
name
)
then
if
not
uci
:
get
(
'wireless'
,
name
)
then
return
uci
:
get_bool
(
'wireless'
,
name
,
'disabled'
)
else
return
nil
return
nil
end
end
return
uci
:
get_bool
(
'wireless'
,
name
,
'disabled'
)
end
end
-- Returns the first argument that is not nil; don't call without any non-nil arguments!
-- Returns the first argument that is not nil; don't call without any non-nil arguments!
local
function
first_non_nil
(
first
,
...
)
local
function
first_non_nil
(
first
,
...
)
if
first
~=
nil
then
if
first
~=
nil
then
return
first
return
first
else
return
first_non_nil
(
...
)
end
end
return
first_non_nil
(
...
)
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment