svn commit: branches/busybox_1_8_stable: applets editors libbb networking

vda at busybox.net vda at busybox.net
Fri Mar 21 08:50:06 UTC 2008


Author: vda
Date: 2008-03-21 01:50:06 -0700 (Fri, 21 Mar 2008)
New Revision: 21432

Log:
apply four post-1.8.2 patches; bump to 1.8.3



Modified:
   branches/busybox_1_8_stable/Makefile
   branches/busybox_1_8_stable/applets/applets.c
   branches/busybox_1_8_stable/editors/vi.c
   branches/busybox_1_8_stable/libbb/lineedit.c
   branches/busybox_1_8_stable/networking/arping.c


Changeset:
Modified: branches/busybox_1_8_stable/Makefile
===================================================================
--- branches/busybox_1_8_stable/Makefile	2008-03-21 08:45:06 UTC (rev 21431)
+++ branches/busybox_1_8_stable/Makefile	2008-03-21 08:50:06 UTC (rev 21432)
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 8
-SUBLEVEL = 2
+SUBLEVEL = 3
 EXTRAVERSION =
 NAME = Unnamed
 

Modified: branches/busybox_1_8_stable/applets/applets.c
===================================================================
--- branches/busybox_1_8_stable/applets/applets.c	2008-03-21 08:45:06 UTC (rev 21431)
+++ branches/busybox_1_8_stable/applets/applets.c	2008-03-21 08:50:06 UTC (rev 21432)
@@ -17,7 +17,7 @@
 #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
 #warning Note that glibc is unsuitable for static linking anyway.
 #warning If you still want to do it, remove -Wl,--gc-sections
-#warning from top-level Makefile and remove this warning.
+#warning from file scripts/trylink and remove this warning.
 #error Aborting compilation.
 #endif
 

Modified: branches/busybox_1_8_stable/editors/vi.c
===================================================================
--- branches/busybox_1_8_stable/editors/vi.c	2008-03-21 08:45:06 UTC (rev 21431)
+++ branches/busybox_1_8_stable/editors/vi.c	2008-03-21 08:50:06 UTC (rev 21432)
@@ -184,6 +184,7 @@
 #if ENABLE_FEATURE_VI_COLON
 	char *initial_cmds[3];  // currently 2 entries, NULL terminated
 #endif
+	char readbuffer[MAX_LINELEN];
 };
 #define G (*ptr_to_globals)
 #define text           (G.text          )
@@ -200,6 +201,10 @@
 #define term_orig      (G.term_orig     )
 #define term_vi        (G.term_vi       )
 #define initial_cmds   (G.initial_cmds  )
+#define readbuffer     (G.readbuffer    )
+#define INIT_G() do { \
+	PTR_TO_GLOBALS = xzalloc(sizeof(G)); \
+} while (0)
 
 static int init_text_buffer(char *); // init from file or create new
 static void edit_file(char *);	// edit one file
@@ -321,7 +326,7 @@
 	my_pid = getpid();
 #endif
 
-	PTR_TO_GLOBALS = xzalloc(sizeof(G));
+	INIT_G();
 
 #if ENABLE_FEATURE_VI_CRASHME
 	srand((long) my_pid);
@@ -2142,8 +2147,6 @@
 	return safe_poll(pfd, 1, hund*10) > 0;
 }
 
-#define readbuffer bb_common_bufsiz1
-
 static int readed_for_parse;
 
 //----- IO Routines --------------------------------------------

Modified: branches/busybox_1_8_stable/libbb/lineedit.c
===================================================================
--- branches/busybox_1_8_stable/libbb/lineedit.c	2008-03-21 08:45:06 UTC (rev 21431)
+++ branches/busybox_1_8_stable/libbb/lineedit.c	2008-03-21 08:50:06 UTC (rev 21432)
@@ -1211,7 +1211,7 @@
 #endif
 
 #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp)
-#define getTermSettings(fd, argp) tcgetattr(fd, argp);
+#define getTermSettings(fd, argp) tcgetattr(fd, argp)
 
 static sighandler_t previous_SIGWINCH_handler;
 
@@ -1270,9 +1270,10 @@
 	smalluint prevc;
 #endif
 
-	getTermSettings(0, (void *) &initial_settings);
-	/* Happens when e.g. stty -echo was run before */
-	if (!(initial_settings.c_lflag & ECHO)) {
+	if (getTermSettings(0, (void *) &initial_settings) < 0
+	 /* Happens when e.g. stty -echo was run before */
+	 || !(initial_settings.c_lflag & ECHO)
+	) {
 		parse_prompt(prompt);
 		fflush(stdout);
 		fgets(command, maxsize, stdin);

Modified: branches/busybox_1_8_stable/networking/arping.c
===================================================================
--- branches/busybox_1_8_stable/networking/arping.c	2008-03-21 08:45:06 UTC (rev 21431)
+++ branches/busybox_1_8_stable/networking/arping.c	2008-03-21 08:50:06 UTC (rev 21432)
@@ -207,7 +207,8 @@
 		}
 
 		if (last) {
-			printf(" %u.%03ums\n", last / 1000, last % 1000);
+			unsigned diff = MONOTONIC_US() - last;
+			printf(" %u.%03ums\n", diff / 1000, diff % 1000);
 		} else {
 			printf(" UNSOLICITED?\n");
 		}




More information about the busybox-cvs mailing list