OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8535b4
)
A patch from Danny Lepage so that we do not setting on symlinks
author
Eric Andersen
<andersen@codepoet.org>
Tue, 5 Nov 2002 16:28:56 +0000
(16:28 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 5 Nov 2002 16:28:56 +0000
(16:28 -0000)
when looking for a device match, and instead keep looking till
we find the correct device.
libc/termios/ttyname.c
patch
|
blob
|
history
diff --git
a/libc/termios/ttyname.c
b/libc/termios/ttyname.c
index
c5f22e4
..
c9c2c32
100644
(file)
--- a/
libc/termios/ttyname.c
+++ b/
libc/termios/ttyname.c
@@
-26,10
+26,10
@@
static int __check_dir_for_tty_match(char * dirname, struct stat *st, char *buf,
* st_ino and st_dev 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... */
- if (stat(buf, &dst) == 0 &&
+ if (
l
stat(buf, &dst) == 0 &&
st->st_dev == dst.st_dev && st->st_ino == dst.st_ino)
#else
- if (stat(buf, &dst) == 0 &&
+ if (
l
stat(buf, &dst) == 0 &&
S_ISCHR(dst.st_mode) && st->st_rdev == dst.st_rdev)
#endif
{