summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/tty.c
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-07-16 21:04:31 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2013-07-20 12:04:35 +0200
commit0e48cb4998a89a2adae95d97f3bce5f89c77d762 (patch)
tree754bf7e9765fbeb8f0fe9418d9d399335c7c7af8 /deps/uv/src/unix/tty.c
parent221c689ebbac9bda42c005b7f0278ce420766b22 (diff)
downloadandroid-node-v8-0e48cb4998a89a2adae95d97f3bce5f89c77d762.tar.gz
android-node-v8-0e48cb4998a89a2adae95d97f3bce5f89c77d762.tar.bz2
android-node-v8-0e48cb4998a89a2adae95d97f3bce5f89c77d762.zip
deps: upgrade libuv to 3ee4d3f
Diffstat (limited to 'deps/uv/src/unix/tty.c')
-rw-r--r--deps/uv/src/unix/tty.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c
index a2b76add67..91baa6ac8c 100644
--- a/deps/uv/src/unix/tty.c
+++ b/deps/uv/src/unix/tty.c
@@ -37,8 +37,11 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
uv__stream_init(loop, (uv_stream_t*)tty, UV_TTY);
#if defined(__APPLE__)
- if (uv__stream_try_select((uv_stream_t*) tty, &fd))
- return -1;
+ {
+ int err = uv__stream_try_select((uv_stream_t*) tty, &fd);
+ if (err)
+ return err;
+ }
#endif /* defined(__APPLE__) */
if (readable) {
@@ -102,18 +105,15 @@ int uv_tty_set_mode(uv_tty_t* tty, int mode) {
}
fatal:
- uv__set_sys_error(tty->loop, errno);
- return -1;
+ return -errno;
}
int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) {
struct winsize ws;
- if (ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws) < 0) {
- uv__set_sys_error(tty->loop, errno);
- return -1;
- }
+ if (ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws))
+ return -errno;
*width = ws.ws_col;
*height = ws.ws_row;