Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 843290
Collapse All | Expand All

(-)a/src/mongo/shell/shell_utils_extended.cpp (-1 / +1 lines)
Lines 390-396 BSONObj writeFile(const BSONObj& args, void* data) { Link Here
390
            mode |= std::ios::binary;
390
            mode |= std::ios::binary;
391
    }
391
    }
392
    boost::filesystem::ofstream ofs{normalizedFilePath, mode};
392
    std::ofstream ofs{normalizedFilePath, mode};
393
    uassert(40346,
393
    uassert(40346,
394
            str::stream() << "failed to open file " << normalizedFilePath.string()
394
            str::stream() << "failed to open file " << normalizedFilePath.string()
395
                          << " for writing",
395
                          << " for writing",
(-)a/src/mongo/db/auth/security_key_test.cpp (-1 / +2 lines)
Lines 29-34 Link Here
29
#include "mongo/platform/basic.h"
29
#include "mongo/platform/basic.h"
30
#include <fstream>
30
#include <boost/filesystem.hpp>
31
#include <boost/filesystem.hpp>
31
#include "mongo/base/string_data.h"
32
#include "mongo/base/string_data.h"
Lines 47-53 class TestFile { Link Here
47
public:
48
public:
48
    TestFile(StringData contents, bool fixPerms = true) : _path(boost::filesystem::unique_path()) {
49
    TestFile(StringData contents, bool fixPerms = true) : _path(boost::filesystem::unique_path()) {
49
        boost::filesystem::ofstream stream(_path, std::ios_base::out | std::ios_base::trunc);
50
        std::ofstream stream(_path, std::ios_base::out | std::ios_base::trunc);
50
        ASSERT_TRUE(stream.good());
51
        ASSERT_TRUE(stream.good());
51
        stream.write(contents.rawData(), contents.size());
52
        stream.write(contents.rawData(), contents.size());
(-)a/src/mongo/db/storage/storage_repair_observer.cpp (-1 / +2 lines)
Lines 34-39 Link Here
34
#include <algorithm>
34
#include <algorithm>
35
#include <cerrno>
35
#include <cerrno>
36
#include <cstring>
36
#include <cstring>
37
#include <fstream>
37
#ifdef __linux__
38
#ifdef __linux__
38
#include <fcntl.h>
39
#include <fcntl.h>
Lines 121-127 bool StorageRepairObserver::isDataInvalidated() const { Link Here
121
}
122
}
122
void StorageRepairObserver::_touchRepairIncompleteFile() {
123
void StorageRepairObserver::_touchRepairIncompleteFile() {
123
    boost::filesystem::ofstream fileStream(_repairIncompleteFilePath);
124
    std::ofstream fileStream(_repairIncompleteFilePath);
124
    fileStream << "This file indicates that a repair operation is in progress or incomplete.";
125
    fileStream << "This file indicates that a repair operation is in progress or incomplete.";
125
    if (fileStream.fail()) {
126
    if (fileStream.fail()) {
126
        LOGV2_FATAL_NOTRACE(50920,
127
        LOGV2_FATAL_NOTRACE(50920,
(-)a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp (-1 / +2 lines)
Lines 33-38 Link Here
33
#include "mongo/db/storage/kv/kv_engine_test_harness.h"
33
#include "mongo/db/storage/kv/kv_engine_test_harness.h"
34
#include <fstream>
34
#include <boost/filesystem.hpp>
35
#include <boost/filesystem.hpp>
35
#include <boost/filesystem/path.hpp>
36
#include <boost/filesystem/path.hpp>
36
#include <memory>
37
#include <memory>
Lines 226-232 TEST_F(WiredTigerKVEngineRepairTest, UnrecoverableOrphanedDataFilesAreRebuilt) { Link Here
226
    // Create an empty data file. The subsequent call to recreate the collection will fail because
227
    // Create an empty data file. The subsequent call to recreate the collection will fail because
227
    // it is unsalvageable.
228
    // it is unsalvageable.
228
    boost::filesystem::ofstream fileStream(*dataFilePath);
229
    std::ofstream fileStream(*dataFilePath);
229
    fileStream << "";
230
    fileStream << "";
230
    fileStream.close();
231
    fileStream.close();
(-)a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp (-1 / +2 lines)
Lines 34-39 Link Here
34
#include "mongo/db/storage/wiredtiger/wiredtiger_util.h"
34
#include "mongo/db/storage/wiredtiger/wiredtiger_util.h"
35
#include <limits>
35
#include <limits>
36
#include <fstream>
36
#include <boost/filesystem.hpp>
37
#include <boost/filesystem.hpp>
37
#include <boost/filesystem/path.hpp>
38
#include <boost/filesystem/path.hpp>
Lines 80-86 void createTableChecksFile() { Link Here
80
    auto path = boost::filesystem::path(storageGlobalParams.dbpath) /
81
    auto path = boost::filesystem::path(storageGlobalParams.dbpath) /
81
        boost::filesystem::path(kTableChecksFileName);
82
        boost::filesystem::path(kTableChecksFileName);
82
    boost::filesystem::ofstream fileStream(path);
83
    std::ofstream fileStream(path);
83
    fileStream << "This file indicates that a WiredTiger table check operation is in progress or "
84
    fileStream << "This file indicates that a WiredTiger table check operation is in progress or "
84
                  "incomplete."
85
                  "incomplete."
85
               << std::endl;
86
               << std::endl;
(-)a/src/mongo/shell/shell_utils_extended.cpp (-1 / +1 lines)
Lines 454-460 BSONObj readDumpFile(const BSONObj& a, void*) { Link Here
454
    // Open the file for reading in binary mode.
454
    // Open the file for reading in binary mode.
455
    const auto pathStr = a.firstElement().String();
455
    const auto pathStr = a.firstElement().String();
456
    boost::filesystem::ifstream stream(pathStr, std::ios::in | std::ios::binary);
456
    std::ifstream stream(pathStr, std::ios::in | std::ios::binary);
457
    uassert(31405,
457
    uassert(31405,
458
            str::stream() << "readDumpFile(): Unable to open file \"" << pathStr
458
            str::stream() << "readDumpFile(): Unable to open file \"" << pathStr
459
                          << "\" for reading",
459
                          << "\" for reading",
(-)a/src/mongo/util/stacktrace_threads.cpp (-1 / +2 lines)
Lines 40-45 Link Here
40
#include <cstdlib>
40
#include <cstdlib>
41
#include <dirent.h>
41
#include <dirent.h>
42
#include <fcntl.h>
42
#include <fcntl.h>
43
#include <fstream>
43
#include <fmt/format.h>
44
#include <fmt/format.h>
44
#include <signal.h>
45
#include <signal.h>
45
#include <string>
46
#include <string>
Lines 243-249 bool tidExists(int tid) { Link Here
243
std::string readThreadName(int tid) {
244
std::string readThreadName(int tid) {
244
    std::string threadName;
245
    std::string threadName;
245
    try {
246
    try {
246
        boost::filesystem::ifstream in(taskDir() / std::to_string(tid) / "comm");
247
        std::ifstream in(taskDir() / std::to_string(tid) / "comm");
247
        std::getline(in, threadName);
248
        std::getline(in, threadName);
248
    } catch (...) {
249
    } catch (...) {
249
    }
250
    }
(-)a/src/mongo/util/processinfo_linux.cpp (+1 lines)
Lines 33-38 Link Here
33
#include "processinfo.h"
33
#include "processinfo.h"
34
#include <fstream>
34
#include <iostream>
35
#include <iostream>
35
#include <malloc.h>
36
#include <malloc.h>
36
#include <pcrecpp.h>
37
#include <pcrecpp.h>

Return to bug 843290