diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-01-03 17:18:37 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-01-03 17:18:37 -0500 |
commit | 89802c00cffe574a2e461ba0d9b29db572102e43 (patch) | |
tree | 3a1835fee8448c4c626ba8e62891ce48cd9b35a8 /stat.c | |
parent | f28298ba3cffd2ad3f5756796b35dac4d987429d (diff) | |
download | bfs-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |