[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] copy: handle EOPNOTSUPP from SEEK_DATA
From: |
Pádraig Brady |
Subject: |
[PATCH] copy: handle EOPNOTSUPP from SEEK_DATA |
Date: |
Sun, 9 May 2021 22:06:26 +0100 |
* src/copy.c (infer_scantype): Ensure we don't error out
if SEEK_DATA returns EOPNOTSUPP, on systems where this value
is distinct from ENOTSUP. Generally both of these should be checked.
---
src/copy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/copy.c b/src/copy.c
index d945a5d94..e92996390 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1255,7 +1255,7 @@ infer_scantype (int fd, struct stat const *sb,
scan_inference->ext_start = lseek (fd, 0, SEEK_DATA);
if (0 <= scan_inference->ext_start)
return LSEEK_SCANTYPE;
- else if (errno != EINVAL && errno != ENOTSUP)
+ else if (errno != EINVAL && !is_ENOTSUP (errno))
return errno == ENXIO ? LSEEK_SCANTYPE : ERROR_SCANTYPE;
#endif
--
2.26.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] copy: handle EOPNOTSUPP from SEEK_DATA,
Pádraig Brady <=