update.cpp: use exec find for ofgwrite caller

Origin commit data
------------------
Commit: 9c4fd48781
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-07 (Fri, 07 Jun 2019)
This commit is contained in:
2019-06-07 14:24:32 +02:00
committed by vanhofen
parent 3dcd917943
commit 463d8bb7a8

View File

@@ -741,18 +741,18 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_START_OFGWRITE); ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_START_OFGWRITE);
hide(); hide();
const char ofgwrite_caller[] = "/bin/ofgwrite_caller"; std::string ofgwrite_caller = find_executable("ofgwrite_caller");
dprintf(DEBUG_NORMAL, "[update] calling %s %s %s %s\n", ofgwrite_caller, g_settings.update_dir.c_str(), filename.c_str(), ofgwrite_options.c_str()); dprintf(DEBUG_NORMAL, "[update] calling %s %s %s %s\n", ofgwrite_caller.c_str(), g_settings.update_dir.c_str(), filename.c_str(), ofgwrite_options.c_str());
#ifndef DRYRUN #ifndef DRYRUN
if (flashing) if (flashing)
my_system(4, ofgwrite_caller, g_settings.update_dir.c_str(), filename.c_str(), ofgwrite_options.c_str()); my_system(4, ofgwrite_caller.c_str(), g_settings.update_dir.c_str(), filename.c_str(), ofgwrite_options.c_str());
/* /*
TODO: fix osd-flickering TODO: fix osd-flickering
Neutrino is clearing framebuffer, so ofgwrite's gui is cleared too. Neutrino is clearing framebuffer, so ofgwrite's gui is cleared too.
*/ */
dprintf(DEBUG_NORMAL, "[update] %s done\n", ofgwrite_caller); dprintf(DEBUG_NORMAL, "[update] %s done\n", ofgwrite_caller.c_str());
if (restart == CMsgBox::mbrYes) if (restart == CMsgBox::mbrYes)
CNeutrinoApp::getInstance()->exec(NULL, "reboot"); CNeutrinoApp::getInstance()->exec(NULL, "reboot");