mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +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>
This commit is contained in:
committed by
Jacek Jendrzej
parent
22be19a9b0
commit
988a8ebec2
@@ -22,9 +22,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
int my_system(const char * cmd, const char * arg1, const char * arg2 = NULL, const char * arg3 = NULL, const char * arg4 = NULL, const char * arg5 = NULL, const char * arg6 = NULL);
|
||||
|
||||
int my_system(const char * cmd);
|
||||
int my_system(int argc, const char *arg, ...); /* argc is number of arguments including command */
|
||||
|
||||
FILE* my_popen( pid_t& pid, const char *cmdstring, const char *type);
|
||||
int safe_mkdir(char * path);
|
||||
|
Reference in New Issue
Block a user