Commit b6a1a2b5 authored by Julius Athenstaedt's avatar Julius Athenstaedt
Browse files

debugging the remove dir problem

parent d79429bd
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -341,13 +341,6 @@ create_handler(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode,
    }
    std::string path = get_path(parent_inode, name);
    fuse_log(FUSE_LOG_DEBUG, "create handler %s\n", path.c_str());
    // int rc = gkfs::syscall::gkfs_create(path, mode);
    // int errno_bu = errno;
    // if(rc == -1) {
    //     fuse_log(FUSE_LOG_DEBUG,
    //              "create failed, here here mode %i flags %i errno %i\n", mode,
    //              fi->flags, errno);
    // }
    int fd = gkfs::syscall::gkfs_open(path, mode, fi->flags | O_CREAT);
    if(fd < 0) {
        fuse_log(FUSE_LOG_DEBUG, "create -> open failed errno %i\n", errno);
+8 −0
Original line number Diff line number Diff line
@@ -1558,6 +1558,14 @@ gkfs_rmdir(const std::string& path) {
    assert(ret.second);
    auto open_dir = ret.second;
    if(open_dir->size() != 2) {
        std::cout << "hier kommt der schuh in die tonne" << std::endl;
        size_t pos = 0;
        while(pos < open_dir->size()) {
            auto de = open_dir->getdent(pos);
            std::cout << de.name() << std::endl;
            pos++;
        }
        std::cout << "booom" << std::endl;
        errno = ENOTEMPTY;
        return -1;
    }