Changed the parameter rules for new command -launch_frontend

This commit is contained in:
2012-12-25 17:56:24 +00:00
parent cbb658991b
commit 88b4584ab2
10 changed files with 82 additions and 141 deletions

View File

@ -3675,15 +3675,11 @@ ex:;
}
/* >>> make configurable by configure.ac # define Xorriso_allow_launch_frontenD 1 */
/* # define Xorriso_allow_launch_frontend_suiD 1 */
int Xorriso_launch_frontend(struct XorrisO *xorriso, char *cmd,
int Xorriso_launch_frontend(struct XorrisO *xorriso, int argc, char **argv,
char *cmd_pipe_adr, char *reply_pipe_adr, int flag)
{
int command_pipe[2], reply_pipe[2], ret, i, argc= 0, cpid, is_banned= 0;
char **argv= NULL, **exec_argv= NULL, *sfe= NULL, *adrpt;
int command_pipe[2], reply_pipe[2], ret, i, cpid, is_banned= 0;
char **exec_argv= NULL, *sfe= NULL, *adrpt;
struct stat stbuf;
Xorriso_alloc_meM(sfe, char, 5 * SfileadrL);
@ -3721,9 +3717,6 @@ int Xorriso_launch_frontend(struct XorrisO *xorriso, char *cmd,
if(is_banned)
{ret= 0; goto ex;}
ret= Xorriso_parse_line(xorriso, cmd, "", "", 0, &argc, &argv, 1 | 64);
if(ret <= 0)
goto ex;
if(argc > 0) {
if(strchr(argv[0], '/') == NULL) {
sprintf(xorriso->info_text,
@ -3880,7 +3873,6 @@ no_dup:;
exit(1);
ex:;
Xorriso__dispose_words(&argc, &argv);
Xorriso_free_meM(exec_argv);
Xorriso_free_meM(sfe);
return(ret);