[BusyBox] problems with ash on sparc in interactive mode (patch included)

Maciej Witkowiak d118986 at atos.wmid.amu.edu.pl
Fri Apr 4 18:28:11 UTC 2003


Package: busybox
Version: 0.60.5
Severity: normal

(I sent it here as mail to submit at bugs.busybox.net bounces)

When using ash on sparcs as interactive shell you don't get any output until
you type four characters (e.g. when typing '12345678' the line is updated after
pressing 4 and 8).
This was observed on Linux, both sparc32 and 64, both glibc and uClibc.
Here is a patch for stable version that fixes that:

---8<--

diff -Nru busybox-0.60.5-orig/cmdedit.c busybox-0.60.5/cmdedit.c
--- busybox-0.60.5-orig/cmdedit.c	Thu Apr 25 01:07:03 2002
+++ busybox-0.60.5/cmdedit.c	Fri Apr  4 19:55:30 2003
@@ -1177,7 +1177,7 @@
 	new_settings.c_lflag &= ~ICANON;        /* unbuffered input */
 	/* Turn off echoing and CTRL-C, so we can trap it */
 	new_settings.c_lflag &= ~(ECHO | ECHONL | ISIG);
-#ifndef linux
+#if (defined(__sparc__) && defined(linux)) || ! defined(linux)
 	/* Hmm, in linux c_cc[] not parsed if set ~ICANON */
 	new_settings.c_cc[VMIN] = 1;
 	new_settings.c_cc[VTIME] = 0;

---8<--

Here is a similar patch for today (04.04.2003) snapshot of development
version:

---8<--

diff -Nru busybox-orig/shell/cmdedit.c busybox/shell/cmdedit.c
--- busybox-orig/shell/cmdedit.c	Wed Mar 19 10:12:52 2003
+++ busybox/shell/cmdedit.c	Fri Apr  4 19:50:48 2003
@@ -1244,7 +1244,7 @@
 	new_settings.c_lflag &= ~ICANON;        /* unbuffered input */
 	/* Turn off echoing and CTRL-C, so we can trap it */
 	new_settings.c_lflag &= ~(ECHO | ECHONL | ISIG);
-#ifndef linux
+#if (defined(__sparc__) && defined(linux)) || ! defined(linux)
 	/* Hmm, in linux c_cc[] not parsed if set ~ICANON */
 	new_settings.c_cc[VMIN] = 1;
 	new_settings.c_cc[VTIME] = 0;

---8<---

M.



More information about the busybox mailing list