[BusyBox 0001418]: 'More' and 'less' seam to point to 'cat' when cross compiled with uClibc
bugs at busybox.net
bugs at busybox.net
Tue Jul 3 10:26:49 UTC 2007
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=1418
======================================================================
Reported By: phire
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 1418
Category: Other
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 07-02-2007 23:11 PDT
Last Modified: 07-03-2007 03:26 PDT
======================================================================
Summary: 'More' and 'less' seam to point to 'cat' when cross
compiled with uClibc
Description:
When I cross compile busybox (manually, not with buildroot) with my uClibc
x86 toolchain (uClibc 0.9.29 and GCC 4.1.2) More and less are broken.
As far as I can tell, both are compiling, there are no errors or warning
in the compile process (except a single warning for find) but when I try
to run them I get cat instead.
When I compile the same configration with glibc, more and less work as
expected.
======================================================================
----------------------------------------------------------------------
phire - 07-03-07 00:37
----------------------------------------------------------------------
I did some checking of the source code, Seams the problem come from
Revision 18061:
more: do not mess with "/dev/console" (!);
fill whole 1st screen (was "screen sans one line");
fall back to cat if redirected or no ctty
less: fall back to cat if no ctty (was exiting)
resize: cosmetics
uClibc (or at least the version I have) seams to fail to open CURRENT_TTY
here:
(line 1333 in miscutils/less.c)
kbd_fd = open(CURRENT_TTY, O_RDONLY);
if (kbd_fd < 0)
return bb_cat(argv);
----------------------------------------------------------------------
phire - 07-03-07 01:00
----------------------------------------------------------------------
I changed it from open to xopen (which is was before) and it kindly
informed me:
less: can't open '/dev/tty': No such file or directory
I was in the process of working out how to mount the root file system when
I came across this problem.
I think its better to inform me that I have a problem, rather than falling
back to cat.
----------------------------------------------------------------------
vda - 07-03-07 03:26
----------------------------------------------------------------------
If less or more cannot open /dev/tty, they think that they are run in a
session without controlling tty (for such session opening /dev/tty fails
with ENXIO: open("/dev/tty", O_RDONLY|O_LARGEFILE) = -1 ENXIO (No such
device or address)).
But in your case, you simply don't have /dev/tty node created, period.
Just create it. Should be like this:
# ls -l /dev/tty
crw-rw-rw- 1 root root 5, 0 Jun 29 19:51 /dev/tty
Issue History
Date Modified Username Field Change
======================================================================
07-02-07 23:11 phire New Issue
07-02-07 23:11 phire Status new => assigned
07-02-07 23:11 phire Assigned To => BusyBox
07-03-07 00:37 phire Note Added: 0002547
07-03-07 01:00 phire Note Added: 0002548
07-03-07 03:26 vda Note Added: 0002549
07-03-07 03:26 vda Status assigned => closed
======================================================================
More information about the busybox-cvs
mailing list