summaryrefslogtreecommitdiff
path: root/src/mongo/db/traffic_reader.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2022-03-15 02:35:13 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-16 01:41:26 +0000
commit4b4a334cf67eba2abaaca1854eac5a8a03bee3e7 (patch)
tree10e35337c0238e6ef410ebeaec548bb7592a234f /src/mongo/db/traffic_reader.cpp
parent04d14e9675539103de563ffa250380538206ee93 (diff)
downloadmongo-4b4a334cf67eba2abaaca1854eac5a8a03bee3e7.tar.gz
SERVER-51770 add std::error_code functions to errno_util
Remove errnoWithPrefix, errnoAndDescription
Diffstat (limited to 'src/mongo/db/traffic_reader.cpp')
-rw-r--r--src/mongo/db/traffic_reader.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/traffic_reader.cpp b/src/mongo/db/traffic_reader.cpp
index d6b5bc27a8f..c6a4ade2b48 100644
--- a/src/mongo/db/traffic_reader.cpp
+++ b/src/mongo/db/traffic_reader.cpp
@@ -90,12 +90,11 @@ bool readBytes(size_t toRead, char* buf, int fd) {
#endif
if (r == -1) {
- auto pair = errnoAndDescription();
-
+ auto ec = lastPosixError();
uassert(ErrorCodes::FileStreamFailed,
- str::stream() << "failed to read bytes: errno(" << pair.first
- << ") : " << pair.second,
- pair.first == EINTR);
+ str::stream() << "failed to read bytes: errno(" << ec.value()
+ << ") : " << errorMessage(ec),
+ ec.value() == EINTR);
continue;
} else if (r == 0) {