diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-02-22 18:08:28 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-02-22 18:08:28 +0000 |
commit | 4985fb53859f7aab18676cdaeb7a620571269976 (patch) | |
tree | b204c7659189f4022a892f5a7578d55cd67ca39b /sysdeps/unix/sysv/linux/ttyname_r.c | |
parent | 3f933dc2ef1aa201cd277a480b3954afa1f62b07 (diff) | |
download | glibc-4985fb53859f7aab18676cdaeb7a620571269976.tar glibc-4985fb53859f7aab18676cdaeb7a620571269976.tar.gz glibc-4985fb53859f7aab18676cdaeb7a620571269976.tar.bz2 glibc-4985fb53859f7aab18676cdaeb7a620571269976.zip |
Update.
1999-02-22 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/ttyname.c: Use __xstat and __fxstat
instead of stat and fstat.
* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ttyname_r.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/ttyname_r.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c index fe68e10b4d..b92c712fcc 100644 --- a/sysdeps/unix/sysv/linux/ttyname_r.c +++ b/sysdeps/unix/sysv/linux/ttyname_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,95,96,97,98,99 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -74,7 +74,7 @@ getttyname_r (buf, buflen, mydev, myino, save, dostat) cp = __stpncpy (buf + devlen, d->d_name, needed); cp[0] = '\0'; - if (stat (buf, &st) == 0 + if (__xstat (_STAT_VER, buf, &st) == 0 #ifdef _STATBUF_ST_RDEV && S_ISCHR (st.st_mode) && st.st_rdev == mydev #else @@ -141,14 +141,14 @@ __ttyname_r (fd, buf, buflen) return ERANGE; } - if (fstat (fd, &st) < 0) + if (__fxstat (_STAT_VER, fd, &st) < 0) return errno; /* Prepare the result buffer. */ memcpy (buf, "/dev/pts/", sizeof ("/dev/pts/")); buflen -= sizeof ("/dev/pts/") - 1; - if (stat (buf, &st1) == 0 && S_ISDIR (st1.st_mode)) + if (__xstat (_STAT_VER, buf, &st1) == 0 && S_ISDIR (st1.st_mode)) { #ifdef _STATBUF_ST_RDEV ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino, save, |