Commit 0ddd69d4 authored by Nafi3's avatar Nafi3
Browse files

Check for the flags

parent a5ee379b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ int adafs_open(const std::string& path, mode_t mode, int flags) {
    init_ld_env_if_needed();
    auto err = 1;
    auto fd = file_map.add(path, (flags & O_APPEND) != 0);
    // TODO the open flags should not be in the map just set the pos accordingly
    // TODO look up if file exists configurable
    if (flags & O_CREAT)
        // no access check required here. If one is using our FS they have the permissions.
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ OpenFile::OpenFile(const string& path, const bool append_flag) : path_(path), ap
        exit(1);
    }
    fd_ = fileno(tmp_file_); // get a valid file descriptor from the kernel
    off_t pos_ = 0;
    off_t pos_ = 0; // TODO set the pos according to the flag and delete the flag from fd map??
}

string OpenFile::path() const {