From 89802c00cffe574a2e461ba0d9b29db572102e43 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 3 Jan 2019 17:18:37 -0500 Subject: stat: s/ENODATA/ENOTSUP, since ENODATA is POSIX-optional Fixes half of #40. --- stat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'stat.c') 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; } -- cgit v1.2.3