Mercurial > hg > nginx-quic
annotate src/os/win32/ngx_files.c @ 44:0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 09 Jan 2003 05:36:00 +0000 |
parents | cd035a94e0b6 |
children | 7ebc8b7fb816 |
rev | line source |
---|---|
42
cd035a94e0b6
nginx-0.0.1-2002-12-27-10:27:47 import
Igor Sysoev <igor@sysoev.ru>
parents:
35
diff
changeset
|
1 |
cd035a94e0b6
nginx-0.0.1-2002-12-27-10:27:47 import
Igor Sysoev <igor@sysoev.ru>
parents:
35
diff
changeset
|
2 #include <ngx_config.h> |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
3 |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 #include <ngx_core.h> |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 #include <ngx_types.h> |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
6 #include <ngx_file.h> |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 ssize_t ngx_read_file(ngx_file_t *file, char *buf, size_t size, off_t offset) |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 { |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 size_t n; |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 if (ReadFile(file->fd, buf, size, &n, NULL) == 0) { |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 ngx_log_error(NGX_LOG_ERR, file->log, ngx_errno, "ReadFile() failed"); |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 return NGX_ERROR; |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 } |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
16 |
35
79c1fce18e71
nginx-0.0.1-2002-12-21-20:14:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
17 file->offset += n; |
79c1fce18e71
nginx-0.0.1-2002-12-21-20:14:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
18 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
19 return n; |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
20 } |