EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>
This commit is contained in:
		@@ -562,12 +562,13 @@ char *find_execable(const char *filename);
 | 
			
		||||
int exists_execable(const char *filename);
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_FEATURE_EXEC_PREFER_APPLETS
 | 
			
		||||
#define BB_EXECVP(prog,cmd) \
 | 
			
		||||
	execvp((find_applet_by_name(prog)) ? CONFIG_BUSYBOX_EXEC_PATH : prog, cmd)
 | 
			
		||||
int bb_execvp(const char *file, char *const argv[]);
 | 
			
		||||
#define BB_EXECVP(prog,cmd) bb_execvp(prog,cmd)
 | 
			
		||||
#define BB_EXECLP(prog,cmd,...) \
 | 
			
		||||
	execlp((find_applet_by_name(prog)) ? CONFIG_BUSYBOX_EXEC_PATH : prog, cmd, __VA_ARGS__)
 | 
			
		||||
	execlp((find_applet_by_name(prog)) ? CONFIG_BUSYBOX_EXEC_PATH : prog, \
 | 
			
		||||
		cmd, __VA_ARGS__)
 | 
			
		||||
#else
 | 
			
		||||
#define BB_EXECVP(prog,cmd) execvp(prog,cmd)
 | 
			
		||||
#define BB_EXECVP(prog,cmd)     execvp(prog,cmd)
 | 
			
		||||
#define BB_EXECLP(prog,cmd,...) execlp(prog,cmd, __VA_ARGS__) 
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user