Skip to content

Commit

Permalink
Merge pull request openwrt#698 from cshore/pull-request-fix-lib-depends
Browse files Browse the repository at this point in the history
luci-base: utils: Make checklib return a boolean
  • Loading branch information
hnyman committed Apr 8, 2016
2 parents c5c199b + 97f2937 commit cae7d7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/luci-base/luasrc/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -640,18 +640,18 @@ function checklib(fullpathexe, wantedlib)
local fs = require "nixio.fs"
local haveldd = fs.access('/usr/bin/ldd')
if not haveldd then
return -1
return false
end
local libs = exec("/usr/bin/ldd " .. fullpathexe)
if not libs then
return 0
return false
end
for k, v in ipairs(split(libs)) do
if v:find(wantedlib) then
return 1
return true
end
end
return 0
return false
end

--
Expand Down

0 comments on commit cae7d7a

Please sign in to comment.