summaryrefslogtreecommitdiff
path: root/libc/termios/ttyname.c
AgeCommit message (Collapse)Author
2019-06-21fix opendir, fpathconf and ttyname_r to use fstat64(), not fstat()Denys Vlasenko
There is no opendir64(), thus even programs built for 64-bit off_t use opendir(). Before this change, internally opendir() uses fstat(), with the following breakage if some of struct stat fields are too narrow: $ strace ls -l execve("/busybox/ls", ["ls", "-l"], 0x7ffcdc43ede8 /* 16 vars */) = 0 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 getuid32() = 0 time([1551486393 /* 2019-03-02T00:26:33+0000 */]) = 1551486393 (2019-03-02T00:26:33+0000) ioctl(0, TIOCGWINSZ, {ws_row=38, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 brk(NULL) = 0x9768000 brk(0x9769000) = 0x9769000 lstat64(".", 0xffa6e374) = 0 open(".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3 fstat(3, 0xffa6e378) = -1 EOVERFLOW (Value too large for defined data type) See https://bugs.busybox.net/show_bug.cgi?id=11651 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2008-11-20next portion of libc_hidden_proto removalDenis Vlasenko
2008-05-19Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko
in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
2006-01-14hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger
missing headers, other jump relocs removed
2005-12-16Convert all the rest, remove isxupper/isxlower, if someone objects, I'll add ↵Peter S. Mazinger
it back
2005-12-13Convert all users of earlier hiddensPeter S. Mazinger
2005-12-13Convert internal users of chmod/*stat*, minimize change for __strsepPeter S. Mazinger
2005-12-10fix a warningMike Frysinger
2005-12-08Use internal versionsPeter S. Mazinger
2005-12-07Hide morePeter S. Mazinger
2005-12-01Hide mostly used functionsPeter S. Mazinger
2004-07-15Cleanup a few of the more egregiously broken sysconf values toEric Andersen
actually match reality. In particular, _SC_GETPW_R_SIZE_MAX and _SC_GETGR_R_SIZE_MAX were causing us problems with programs such as libglib, since they were always returning -1, which is a bit smaller than the actual passwd and group max buffer sizes. -Erik
2004-01-13Add another devfs subdir to the list of checked subdirs.Manuel Novoa III
2004-01-02Kept the same approach, but rewrote the code for the most part.Manuel Novoa III
Fixed some minor issues plus (as I recall) one SUSv3 errno case.
2003-09-01Greg Nutt writes:Eric Andersen
Attached is a patch for a bug I found in libc/termios/ttyname.c. Essentially the length of the buffer is calculated incorrectly in a strncpy call and then the null terminator is placed on the byte after the buffer. This probably cause some very strange behavior on my system (it ended up setting malloc's heapsize to zero) but may be innocuous on other systems.
2002-11-05A patch from Danny Lepage so that we do not setting on symlinksEric Andersen
when looking for a device match, and instead keep looking till we find the correct device.
2002-07-06Stupid filesystems like cramfs fail to guarantee that st_ino and st_devEric Andersen
uniquely identify a file, contrary to SuSv3, so we cannot be quite so precise as to require an exact match. Settle for something less... Grumble... -Erik
2002-06-19Oops. Looks like I broke ttyname. Fix it.Eric Andersen
-Erik
2002-06-15Implement ttyname_rEric Andersen
-Erik
2001-06-13Fix a really stupid bug with ttyname, thanks to a patch fromEric Andersen
Stefan Soucek <ssoucek@coactive.com>
2001-05-21rewrite to accomodate devfsEric Andersen
2001-04-06Fix include/errno.h to not use kernel header, and instead use bits/errno.h.Eric Andersen
This required we use _LIBC instead of __LIBC__ to be consistent with glibc. This had some sideffects in sys/syscalls.h. While fixing things, I made everything use __set_errno() for (eventual) thread support. -Erik
2000-10-09Bug ugly formatting updateEric Andersen
2000-05-14Work in progress -- cleanups.Erik Andersen
-Erik
2000-05-14Initial revisionErik Andersen