comparison ie-docker.c @ 27:3e6cf8f3aa62

Init file_path
author innparusu
date Tue, 05 Dec 2017 14:03:34 +0900
parents 8cabc269c3d6
children
comparison
equal deleted inserted replaced
26:324a6b216d70 27:3e6cf8f3aa62
289 /* 289 /*
290 * Check argv for proper arguments and run 290 * Check argv for proper arguments and run
291 * the corresponding script, if invoked. 291 * the corresponding script, if invoked.
292 */ 292 */
293 char *execv_args[16]; 293 char *execv_args[16];
294 char file_path[128] = "";
294 295
295 if (command_is_matched(argv[1], ps_command)) { 296 if (command_is_matched(argv[1], ps_command)) {
296 PSLISTPTR pslist = get_pslist(pattern); 297 PSLISTPTR pslist = get_pslist(pattern);
297 print_pslist(pslist); // TODO check work correctly 298 print_pslist(pslist); // TODO check work correctly
298 return 0; 299 return 0;
337 return 0; 338 return 0;
338 } 339 }
339 execv_args[0] = base_exec_command; 340 execv_args[0] = base_exec_command;
340 execv_args[1] = cp_command; 341 execv_args[1] = cp_command;
341 execv_args[2] = argv[2]; 342 execv_args[2] = argv[2];
342
343 char file_path[128];
344 strcat(file_path, name); 343 strcat(file_path, name);
345 strcat(file_path, ":"); 344 strcat(file_path, ":");
346 strcat(file_path, cp_file_path); 345 strcat(file_path, cp_file_path);
347 execv_args[3] = file_path; 346 execv_args[3] = file_path;
348 execv_args[4] = NULL; 347 execv_args[4] = NULL;