summaryrefslogtreecommitdiffstats
path: root/libgloss
diff options
context:
space:
mode:
authorChih-Mao Chen <cmchen@andestech.com>2017-11-16 16:08:16 +0800
committerCorinna Vinschen <corinna@vinschen.de>2018-01-18 09:21:10 +0100
commitf2c9e55faf6fa560c25d448afa7e2d1ad61468f2 (patch)
treeeeec648041fd96571b6fd1d41968370681fb1ef2 /libgloss
parentcba678ba02428b02e08a9a169d57e70f271d789f (diff)
downloadcygnal-f2c9e55faf6fa560c25d448afa7e2d1ad61468f2.tar.gz
cygnal-f2c9e55faf6fa560c25d448afa7e2d1ad61468f2.tar.bz2
cygnal-f2c9e55faf6fa560c25d448afa7e2d1ad61468f2.zip
RISC-V: isatty: return 0 on error
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/riscv/sys_isatty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgloss/riscv/sys_isatty.c b/libgloss/riscv/sys_isatty.c
index 0dc3db169..8857f4828 100644
--- a/libgloss/riscv/sys_isatty.c
+++ b/libgloss/riscv/sys_isatty.c
@@ -13,5 +13,5 @@ _isatty(int file)
{
struct stat s;
int ret = _fstat (file, &s);
- return ret == -1 ? -1 : !!(s.st_mode & S_IFCHR);
+ return ret == -1 ? 0 : !!(s.st_mode & S_IFCHR);
}