Mercurial > hg > nginx-quic
diff src/os/unix/ngx_files.c @ 3164:b1b1775698d5
uniform ngx_directio_on/off() interface with other file functions
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 25 Sep 2009 14:17:28 +0000 |
parents | 34cbd6e86218 |
children | 26784c34e8be |
line wrap: on
line diff
--- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -406,7 +406,7 @@ ngx_directio_on(ngx_fd_t fd) flags = fcntl(fd, F_GETFL); if (flags == -1) { - return -1; + return NGX_FILE_ERROR; } return fcntl(fd, F_SETFL, flags | O_DIRECT); @@ -421,7 +421,7 @@ ngx_directio_off(ngx_fd_t fd) flags = fcntl(fd, F_GETFL); if (flags == -1) { - return -1; + return NGX_FILE_ERROR; } return fcntl(fd, F_SETFL, flags & ~O_DIRECT);