Welcome! Log In Create A New Profile

Advanced

[njs] File flags table cleanup.

Dmitry Volyntsev
July 14, 2021 09:22AM
details: https://hg.nginx.org/njs/rev/1cfcce81e4e9
branches:
changeset: 1678:1cfcce81e4e9
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed Jul 14 13:18:56 2021 +0000
description:
File flags table cleanup.

diffstat:

src/njs_fs.c | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)

diffs (41 lines):

diff -r e37a80fac86f -r 1cfcce81e4e9 src/njs_fs.c
--- a/src/njs_fs.c Tue Jul 13 15:22:24 2021 +0000
+++ b/src/njs_fs.c Wed Jul 14 13:18:56 2021 +0000
@@ -106,26 +106,19 @@ static njs_int_t njs_fs_dirent_create(nj
njs_value_t *type, njs_value_t *retval);

static njs_fs_entry_t njs_flags_table[] = {
+ { njs_str("a"), O_APPEND | O_CREAT | O_WRONLY },
+ { njs_str("a+"), O_APPEND | O_CREAT | O_RDWR },
+ { njs_str("as"), O_APPEND | O_CREAT | O_SYNC | O_WRONLY },
+ { njs_str("as+"), O_APPEND | O_CREAT | O_RDWR | O_SYNC },
+ { njs_str("ax"), O_APPEND | O_CREAT | O_EXCL | O_WRONLY },
+ { njs_str("ax+"), O_APPEND | O_CREAT | O_EXCL | O_RDWR },
{ njs_str("r"), O_RDONLY },
{ njs_str("r+"), O_RDWR },
- { njs_str("w"), O_TRUNC | O_CREAT | O_WRONLY },
- { njs_str("w+"), O_TRUNC | O_CREAT | O_RDWR },
- { njs_str("a"), O_APPEND | O_CREAT | O_WRONLY },
- { njs_str("a+"), O_APPEND | O_CREAT | O_RDWR },
- { njs_str("as"), O_SYNC | O_APPEND | O_CREAT | O_WRONLY },
- { njs_str("as+"), O_SYNC | O_APPEND | O_CREAT | O_RDWR },
- { njs_str("rs"), O_SYNC | O_RDONLY },
- { njs_str("sr"), O_SYNC | O_RDONLY },
- { njs_str("wx"), O_TRUNC | O_CREAT | O_EXCL | O_WRONLY },
- { njs_str("xw"), O_TRUNC | O_CREAT | O_EXCL | O_WRONLY },
- { njs_str("ax"), O_APPEND | O_CREAT | O_EXCL | O_WRONLY },
- { njs_str("xa"), O_APPEND | O_CREAT | O_EXCL | O_WRONLY },
- { njs_str("rs+"), O_SYNC | O_RDWR },
- { njs_str("sr+"), O_SYNC | O_RDWR },
- { njs_str("wx+"), O_TRUNC | O_CREAT | O_EXCL | O_RDWR },
- { njs_str("xw+"), O_TRUNC | O_CREAT | O_EXCL | O_RDWR },
- { njs_str("ax+"), O_APPEND | O_CREAT | O_EXCL | O_RDWR },
- { njs_str("xa+"), O_APPEND | O_CREAT | O_EXCL | O_RDWR },
+ { njs_str("rs+"), O_RDWR | O_SYNC },
+ { njs_str("w"), O_CREAT | O_TRUNC | O_WRONLY },
+ { njs_str("w+"), O_CREAT | O_TRUNC | O_RDWR },
+ { njs_str("wx"), O_CREAT | O_TRUNC | O_EXCL | O_WRONLY },
+ { njs_str("wx+"), O_CREAT | O_TRUNC | O_EXCL | O_RDWR },
{ njs_null_str, 0 }
};

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] File flags table cleanup.

Dmitry Volyntsev 411 July 14, 2021 09:22AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 247
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready