Clarify _PC_REC_INCR_XFER_SIZE and _PC_REC_MAX_XFER_SIZE.
The -1 from pathconf()/fpathconf() with these isn't the "I don't know
what you're talking about" -1/EINVAL, but the "I understand the
question, but don't have an answer for you --- you'll have to try it and
see" -1.
Bug: http://b/326245682
Test: treehugger
Change-Id: I67be277f3ffd9b5a355787ae7ffc4a31e32b0128
diff --git a/libc/bionic/pathconf.cpp b/libc/bionic/pathconf.cpp
index 9724f44..9bbecc3 100644
--- a/libc/bionic/pathconf.cpp
+++ b/libc/bionic/pathconf.cpp
@@ -107,14 +107,6 @@
case _PC_REC_MIN_XFER_SIZE:
return s.f_bsize;
-#if 0
- case _PC_REC_INCR_XFER_SIZE:
- case _PC_REC_MAX_XFER_SIZE:
-#endif
-
- case _PC_SYMLINK_MAX:
- return -1; /* no limit */
-
case _PC_CHOWN_RESTRICTED:
return _POSIX_CHOWN_RESTRICTED;
@@ -125,12 +117,15 @@
return _POSIX_VDISABLE;
case _PC_ASYNC_IO:
- return -1;
-
case _PC_PRIO_IO:
- return -1;
-
+ case _PC_REC_INCR_XFER_SIZE:
+ case _PC_REC_MAX_XFER_SIZE:
+ case _PC_SYMLINK_MAX:
case _PC_SYNC_IO:
+ // No API to answer these: the caller will have to "try it and see".
+ // This differs from the next case in not setting errno to EINVAL,
+ // since we did understand the question --- we just don't have a
+ // good answer.
return -1;
default: