diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-12-21 10:06:14 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-12-21 10:06:14 -0500 |
commit | 8f1e01b0e4aac874a928a2f95248dd4d5500e05e (patch) | |
tree | 122ed503a9a7ac13bb5afd16f40781aee8abcf07 /util/mmap_posix.cpp | |
parent | a0945b20200514910ecb2585f71710610cc41dfe (diff) | |
download | mongo-8f1e01b0e4aac874a928a2f95248dd4d5500e05e.tar.gz |
macro for errno so messages are consistent and have full debugging
Diffstat (limited to 'util/mmap_posix.cpp')
-rw-r--r-- | util/mmap_posix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/mmap_posix.cpp b/util/mmap_posix.cpp index 25deb871f92..c23fbe15cc5 100644 --- a/util/mmap_posix.cpp +++ b/util/mmap_posix.cpp @@ -56,7 +56,7 @@ namespace mongo { fd = open(filename, O_RDWR | O_NOATIME); if ( fd <= 0 ) { - out() << "couldn't open " << filename << ' ' << errno << endl; + out() << "couldn't open " << filename << ' ' << OUTPUT_ERRNO << endl; return 0; } @@ -70,7 +70,7 @@ namespace mongo { view = mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if ( view == MAP_FAILED ) { - out() << " mmap() failed for " << filename << " len:" << length << " errno:" << errno << endl; + out() << " mmap() failed for " << filename << " len:" << length << " " << OUTPUT_ERRNO << endl; if ( errno == ENOMEM ){ out() << " mmap failed with out of memory, if you're using 32-bits, then you probably need to upgrade to 64" << endl; } @@ -83,7 +83,7 @@ namespace mongo { if ( view == 0 || fd == 0 ) return; if ( msync(view, len, sync ? MS_SYNC : MS_ASYNC) ) - problem() << "msync error " << errno << endl; + problem() << "msync " << OUTPUT_ERRNO << endl; } |