mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
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>
Origin commit data
------------------
Branch: ni/coolstream
Commit: 988a8ebec2
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-03-03 (Sun, 03 Mar 2013)
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Jacek Jendrzej
parent
915c34bd15
commit
767be83e22
@@ -441,7 +441,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
||||
printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
||||
std::string cmd = "cp /usr/share/zoneinfo/" + zone + " /etc/localtime";
|
||||
printf("exec %s\n", cmd.c_str());
|
||||
my_system("/bin/sh", "-c", cmd.c_str());
|
||||
my_system(3,"/bin/sh", "-c", cmd.c_str());
|
||||
cmd = ":" + zone;
|
||||
setenv("TZ", cmd.c_str(), 1);
|
||||
}
|
||||
@@ -464,7 +464,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
|
||||
return true;
|
||||
|
||||
if(delete_all) {
|
||||
my_system("/bin/sh", "-c", "rm -f /var/tuxbox/config/zapit/*.conf");
|
||||
my_system(3, "/bin/sh", "-c", "rm -f /var/tuxbox/config/zapit/*.conf");
|
||||
CServiceManager::getInstance()->SatelliteList().clear();
|
||||
CZapit::getInstance()->LoadSettings();
|
||||
CZapit::getInstance()->GetConfig(zapitCfg);
|
||||
@@ -484,7 +484,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
|
||||
CFrameBuffer::getInstance()->Clear();
|
||||
}
|
||||
if(delete_chan) {
|
||||
my_system("/bin/sh", "-c", "rm -f /var/tuxbox/config/zapit/*.xml");
|
||||
my_system(3, "/bin/sh", "-c", "rm -f /var/tuxbox/config/zapit/*.xml");
|
||||
g_Zapit->reinitChannels();
|
||||
}
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user