helpers: improve my_system function

Instead of hardcoding the maximum number of arguments to the
my_system helper, pass a variable argument list.
The function is deliberately source-incompatible with the old
implementation (as opposed to a variant with a sentinel NULL
argument, which would be compatible) to find all users and to
make sure that new future users of this function are not
overlooked during merges with other branches.

Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>
This commit is contained in:
Stefan Seyfried
2013-03-03 19:18:13 +01:00
committed by Jacek Jendrzej
parent 22be19a9b0
commit 988a8ebec2
13 changed files with 55 additions and 35 deletions

View File

@@ -512,7 +512,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
printf("[update] calling %s %s %s\n",install_sh, g_settings.update_dir, filename.c_str() );
#else
printf("[update] calling %s %s %s\n",install_sh, g_settings.update_dir, filename.c_str() );
my_system( install_sh, g_settings.update_dir, filename.c_str() );
my_system(3, install_sh, g_settings.update_dir, filename.c_str());
#endif
showGlobalStatus(100);
ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_READY)); // UTF-8