summaryrefslogtreecommitdiffstats
path: root/stat.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-01-03 17:18:37 -0500
committerTavian Barnes <tavianator@tavianator.com>2019-01-03 17:18:37 -0500
commit89802c00cffe574a2e461ba0d9b29db572102e43 (patch)
tree3a1835fee8448c4c626ba8e62891ce48cd9b35a8 /stat.c
parentf28298ba3cffd2ad3f5756796b35dac4d987429d (diff)
downloadbfs-89802c00cffe574a2e461ba0d9b29db572102e43.tar.xz
stat: s/ENODATA/ENOTSUP, since ENODATA is POSIX-optional
Fixes half of #40.
Diffstat (limited to 'stat.c')
-rw-r--r--stat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stat.c b/stat.c
index e78e206..47585b8 100644
--- a/stat.c
+++ b/stat.c
@@ -186,9 +186,9 @@ static int bfs_statx_impl(int at_fd, const char *at_path, int at_flags, enum bfs
}
// Callers shouldn't have to check anything except the times
- const int guaranteed = STATX_BASIC_STATS ^ (STATX_ATIME | STATX_CTIME | STATX_MTIME);
+ const unsigned int guaranteed = STATX_BASIC_STATS ^ (STATX_ATIME | STATX_CTIME | STATX_MTIME);
if ((xbuf.stx_mask & guaranteed) != guaranteed) {
- errno = ENODATA;
+ errno = ENOTSUP;
return -1;
}
@@ -308,7 +308,7 @@ int bfs_fstat(int fd, struct bfs_stat *buf) {
const struct timespec *bfs_stat_time(const struct bfs_stat *buf, enum bfs_stat_field field) {
if (!(buf->mask & field)) {
- errno = ENODATA;
+ errno = ENOTSUP;
return NULL;
}