diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-25 14:17:28 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-25 14:17:28 +0000 |
commit | 48a28e2dad8d5190ebae5dbe2f7779f8e17884a1 (patch) | |
tree | 9aff32418924dac3e1f8c479904a2c2c6e6fa909 /src/os/unix/ngx_files.c | |
parent | 38a7faadfedd84ea7212d69ed610d06022e83928 (diff) | |
download | nginx-48a28e2dad8d5190ebae5dbe2f7779f8e17884a1.tar.gz nginx-48a28e2dad8d5190ebae5dbe2f7779f8e17884a1.zip |
uniform ngx_directio_on/off() interface with other file functions
Diffstat (limited to 'src/os/unix/ngx_files.c')
-rw-r--r-- | src/os/unix/ngx_files.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index d4bf0436f..2154bed49 100644 --- 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); |