summaryrefslogtreecommitdiffstats
path: root/stat.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-09-18 17:36:56 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-09-18 17:36:56 -0400
commitcac079d033259e72f0d11e81856c0266eada3b7f (patch)
treeeda002cc6970a7a82832e77e63b65b91f09e20ce /stat.c
parentccf75c74bdac06eec97a2a6a5228c2e706c121bd (diff)
downloadbfs-cac079d033259e72f0d11e81856c0266eada3b7f.tar.xz
stat: Rename bfs_stat_flag to _flags
Flags enums should be plural.
Diffstat (limited to 'stat.c')
-rw-r--r--stat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stat.c b/stat.c
index cefefd6..55aece0 100644
--- a/stat.c
+++ b/stat.c
@@ -82,7 +82,7 @@ const char *bfs_stat_field_name(enum bfs_stat_field field) {
/**
* Check if we should retry a failed stat() due to a potentially broken link.
*/
-static bool bfs_stat_retry(int ret, enum bfs_stat_flag flags) {
+static bool bfs_stat_retry(int ret, enum bfs_stat_flags flags) {
return ret != 0
&& (flags & (BFS_STAT_NOFOLLOW | BFS_STAT_TRYFOLLOW)) == BFS_STAT_TRYFOLLOW
&& is_nonexistence_error(errno);
@@ -139,7 +139,7 @@ static void bfs_stat_convert(const struct stat *statbuf, struct bfs_stat *buf) {
/**
* bfs_stat() implementation backed by stat().
*/
-static int bfs_stat_impl(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flag flags, struct bfs_stat *buf) {
+static int bfs_stat_impl(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flags flags, struct bfs_stat *buf) {
struct stat statbuf;
int ret = fstatat(at_fd, at_path, &statbuf, at_flags);
@@ -177,7 +177,7 @@ static int bfs_statx(int at_fd, const char *at_path, int at_flags, unsigned int
/**
* bfs_stat() implementation backed by statx().
*/
-static int bfs_statx_impl(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flag flags, struct bfs_stat *buf) {
+static int bfs_statx_impl(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flags flags, struct bfs_stat *buf) {
unsigned int mask = STATX_BASIC_STATS | STATX_BTIME;
struct statx xbuf;
int ret = bfs_statx(at_fd, at_path, at_flags, mask, &xbuf);
@@ -276,7 +276,7 @@ static int bfs_statx_impl(int at_fd, const char *at_path, int at_flags, enum bfs
/**
* Allows calling stat with custom at_flags.
*/
-static int bfs_stat_explicit(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flag flags, struct bfs_stat *buf) {
+static int bfs_stat_explicit(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flags flags, struct bfs_stat *buf) {
#if HAVE_BFS_STATX
static bool has_statx = true;
@@ -295,7 +295,7 @@ static int bfs_stat_explicit(int at_fd, const char *at_path, int at_flags, enum
return bfs_stat_impl(at_fd, at_path, at_flags, flags, buf);
}
-int bfs_stat(int at_fd, const char *at_path, enum bfs_stat_flag flags, struct bfs_stat *buf) {
+int bfs_stat(int at_fd, const char *at_path, enum bfs_stat_flags flags, struct bfs_stat *buf) {
int at_flags = 0;
if (flags & BFS_STAT_NOFOLLOW) {
at_flags |= AT_SYMLINK_NOFOLLOW;