svn commit: [25956] trunk/busybox/shell

vda at busybox.net vda at busybox.net
Sun Apr 5 01:46:59 UTC 2009


Author: vda
Date: 2009-04-05 01:46:59 +0000 (Sun, 05 Apr 2009)
New Revision: 25956

Log:
hush: fix hush-misc/break5.tests NOMMU failure

function                                             old     new   delta
hush_main                                           1118    1144     +26
re_execute_shell                                     188     204     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 42/0)               Total: 42 bytes



Modified:
   trunk/busybox/shell/hush.c


Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2009-04-05 01:42:59 UTC (rev 25955)
+++ trunk/busybox/shell/hush.c	2009-04-05 01:46:59 UTC (rev 25956)
@@ -2345,8 +2345,8 @@
 	char **argv, **pp;
 	unsigned cnt;
 
-	/* hush -$<pid> -?<exitcode> ... -c <cmd> NULL */
-	cnt = 6;
+	/* hush -$<pid> -?<exitcode> -D<depth> ... -c <cmd> NULL */
+	cnt = 7;
 	for (cur = G.top_var; cur; cur = cur->next) {
 		if (!cur->flg_export || cur->flg_read_only)
 			cnt += 2;
@@ -2356,6 +2356,7 @@
 	*pp++ = (char *) applet_name;
 	*pp++ = xasprintf("-$%u", G.root_pid);
 	*pp++ = xasprintf("-?%u", G.last_return_code);
+	*pp++ = xasprintf("-D%u", G.depth_of_loop);
 	for (cur = G.top_var; cur; cur = cur->next) {
 		if (cur->varstr == hush_version_str)
 			continue;
@@ -5009,7 +5010,7 @@
 	while (1) {
 		opt = getopt(argc, argv, "c:xins"
 #if !BB_MMU
-				"$:?:R:V:"
+				"$:?:D:R:V:"
 #endif
 		);
 		if (opt <= 0)
@@ -5041,6 +5042,9 @@
 		case '?':
 			G.last_return_code = xatoi_u(optarg);
 			break;
+		case 'D':
+			G.depth_of_loop = xatoi_u(optarg);
+			break;
 		case 'R':
 		case 'V':
 			set_local_var(xstrdup(optarg), 0, opt == 'R');



More information about the busybox-cvs mailing list