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.
This commit is contained in:
Stefan Seyfried
2013-03-03 19:18:13 +01:00
parent 8f3872177c
commit 96650cdd45
12 changed files with 51 additions and 31 deletions

View File

@@ -514,7 +514,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