svn commit: trunk/busybox: applets docs/busybox.net include scripts etc...

vda at busybox.net vda at busybox.net
Wed Apr 11 17:03:20 UTC 2007


Author: vda
Date: 2007-04-11 10:03:19 -0700 (Wed, 11 Apr 2007)
New Revision: 18402

Log:
rename: run_applet_by_name -> run_applet_and_exit


Modified:
   trunk/busybox/applets/applets.c
   trunk/busybox/docs/busybox.net/FAQ.html
   trunk/busybox/include/libbb.h
   trunk/busybox/scripts/individual
   trunk/busybox/shell/bbsh.c
   trunk/busybox/shell/hush.c
   trunk/busybox/shell/lash.c
   trunk/busybox/shell/msh.c


Changeset:
Modified: trunk/busybox/applets/applets.c
===================================================================
--- trunk/busybox/applets/applets.c	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/applets/applets.c	2007-04-11 17:03:19 UTC (rev 18402)
@@ -541,7 +541,7 @@
 		if (argc > 2) {
 			/* set name for proper "<name>: applet not found" */
 			applet_name = argv[2];
-			run_applet_by_name(applet_name, 2, argv);
+			run_applet_and_exit(applet_name, 2, argv);
 		} else {
 			const struct bb_applet *a;
 			int col, output_width;
@@ -582,7 +582,7 @@
 	} else {
 		/* we want "<argv[1]>: applet not found", not "busybox: ..." */
 		applet_name = argv[1];
-		run_applet_by_name(argv[1], argc - 1, argv + 1);
+		run_applet_and_exit(argv[1], argc - 1, argv + 1);
 	}
 
 	bb_error_msg_and_die("applet not found");
@@ -598,7 +598,7 @@
 	exit(current_applet->main(argc, argv));
 }
 
-void run_applet_by_name(const char *name, int argc, char **argv)
+void run_applet_and_exit(const char *name, int argc, char **argv)
 {
 	current_applet = find_applet_by_name(name);
 	if (current_applet)
@@ -633,6 +633,6 @@
 	if (ENABLE_LOCALE_SUPPORT && getpid() != 1)
 		setlocale(LC_ALL, "");
 
-	run_applet_by_name(applet_name, argc, argv);
+	run_applet_and_exit(applet_name, argc, argv);
 	bb_error_msg_and_die("applet not found");
 }

Modified: trunk/busybox/docs/busybox.net/FAQ.html
===================================================================
--- trunk/busybox/docs/busybox.net/FAQ.html	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/docs/busybox.net/FAQ.html	2007-04-11 17:03:19 UTC (rev 18402)
@@ -531,7 +531,7 @@
 
 <p>Busybox execution starts with the main() function in applets/busybox.c,
 which sets the global variable applet_name to argv[0] and calls
-run_applet_by_name() in applets/applets.c.  That uses the applets[] array
+run_applet_and_exit() in applets/applets.c.  That uses the applets[] array
 (defined in include/busybox.h and filled out in include/applets.h) to
 transfer control to the appropriate APPLET_main() function (such as
 cat_main() or sed_main()).  The individual applet takes it from there.</p>

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/include/libbb.h	2007-04-11 17:03:19 UTC (rev 18402)
@@ -675,7 +675,7 @@
 struct bb_applet;
 extern const struct bb_applet *find_applet_by_name(const char *name);
 /* Returns only if applet is not found. */
-extern void run_applet_by_name(const char *name, int argc, char **argv);
+extern void run_applet_and_exit(const char *name, int argc, char **argv);
 extern void run_current_applet_and_exit(int argc, char **argv) ATTRIBUTE_NORETURN;
 #endif
 

Modified: trunk/busybox/scripts/individual
===================================================================
--- trunk/busybox/scripts/individual	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/scripts/individual	2007-04-11 17:03:19 UTC (rev 18402)
@@ -106,7 +106,7 @@
     gcc -Os -o build/$APPLET applets/individual.c $j \
 	`extra_libraries $APPFILT` libbb/libbb.a -Iinclude \
 	-DBUILD_INDIVIDUAL \
-	'-Drun_applet_by_name(...)' '-Dfind_applet_by_name(...)=0' \
+	'-Drun_applet_and_exit(...)' '-Dfind_applet_by_name(...)=0' \
 	-DAPPLET_main=${APPFILT}_main -DAPPLET_full_usage=${HELPNAME}
     if [ $? -ne 0 ];
     then

Modified: trunk/busybox/shell/bbsh.c
===================================================================
--- trunk/busybox/shell/bbsh.c	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/shell/bbsh.c	2007-04-11 17:03:19 UTC (rev 18402)
@@ -165,7 +165,7 @@
 		int status;
 		pid_t pid=fork();
 		if(!pid) {
-			run_applet_by_name(cmd->argv[0],cmd->argc,cmd->argv);
+			run_applet_and_exit(cmd->argv[0],cmd->argc,cmd->argv);
 			execvp(cmd->argv[0],cmd->argv);
 			printf("No %s",cmd->argv[0]);
 			exit(1);

Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/shell/hush.c	2007-04-11 17:03:19 UTC (rev 18402)
@@ -1123,7 +1123,7 @@
 				/**/;
 			optind = 1;
 			debug_printf("running applet %s\n", name);
-			run_applet_by_name(name, argc_l, child->argv);
+			run_applet_and_exit(name, argc_l, child->argv);
 		}
 #endif
 		debug_printf("exec of %s\n", child->argv[0]);

Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/shell/lash.c	2007-04-11 17:03:19 UTC (rev 18402)
@@ -1170,7 +1170,7 @@
 
 		for (argc_l = 0; *argv_l; argv_l++, argc_l++);
 		optind = 1;
-		run_applet_by_name(child->argv[0], argc_l, child->argv);
+		run_applet_and_exit(child->argv[0], argc_l, child->argv);
 	}
 
 	execvp(child->argv[0], child->argv);

Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c	2007-04-11 16:23:57 UTC (rev 18401)
+++ trunk/busybox/shell/msh.c	2007-04-11 17:03:19 UTC (rev 18402)
@@ -3068,7 +3068,7 @@
 		optind = 1;
 		if (find_applet_by_name(name)) {
 			/* We have to exec here since we vforked.  Running
-			 * run_applet_by_name() won't work and bad things
+			 * run_applet_and_exit() won't work and bad things
 			 * will happen. */
 			execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
 		}




More information about the busybox-cvs mailing list