Commit 9a5bc72e authored by Ramon Nou's avatar Ramon Nou
Browse files

missing fdopen

parent 05f752f1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2620,7 +2620,7 @@ fdopen(int fd, const char* mode) {
        }
    }
   
    return ret;
    return dlsym_fdopen(fd, mode);
}


@@ -2650,8 +2650,7 @@ fopen(const char* filename, const char* mode) {
                break;
        }
    }
    ret = dlsym_fopen(filename, mode);
    return ret;
    return dlsym_fopen(filename, mode);
}


@@ -2790,8 +2789,8 @@ fgets(char* str, int n, FILE* stream) {
     if(CTX->interception_enabled()) {
    if(CTX->file_map()->exist(stream->_fileno)) {
        // read str n chars
        size_t n = gkfs::syscall::gkfs_read(fileno(stream), str, n);
        if(n == 0) {
        auto l = gkfs::syscall::gkfs_read(fileno(stream), str, n);
        if(l == 0) {
            return NULL;
        }    
        return str;