[Kobo] Support USBMS exports (#6552)

* \o/

* Make sure the (debug) event log doesn't end up in the fd table of our child processes...
Otherwise, it breaks USBMS.

* Close suspicious fds in the Wi-Fi scripts
To prevent any and all issues w/ USBMS down the road...

* Minor USBMS UI tweaks

* Always ask for confirmation to start on USBMS session on plug

* Bump base

https://github.com/koreader/koreader-base/pull/1161
https://github.com/koreader/koreader-base/pull/1162
https://github.com/koreader/koreader-base/pull/1163
https://github.com/koreader/koreader-base/pull/1165
https://github.com/koreader/koreader-base/pull/1167
This commit is contained in:
NiLuJe
2020-08-25 02:00:59 +02:00
committed by GitHub
parent 9abd92044a
commit 6e3a3e8069
9 changed files with 83 additions and 12 deletions

View File

@@ -52,9 +52,15 @@ function Dbg:turnOn()
return check
end
--- @todo close ev.log fd for children
-- create or clear ev log file
self.ev_log = io.open("ev.log", "w")
--- @note: On Linux, use CLOEXEC to avoid polluting the fd table of our child processes.
--- Otherwise, it can be problematic w/ wpa_supplicant & USBMS...
--- Note that this is entirely undocumented, but at least LuaJIT passes the mode as-is to fopen, so, we're good.
if jit.os == "Linux" then
self.ev_log = io.open("ev.log", "we")
else
self.ev_log = io.open("ev.log", "w")
end
end
function Dbg:turnOff()