Commit b75e5c52 authored by Ramon Nou's avatar Ramon Nou
Browse files

debug info for new calls

parent 7196453f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2598,6 +2598,7 @@ fdopen(int fd, const char* mode) {

FILE*
fopen(const char* filename, const char* mode) {
    debug_info("[BYPASS] >> fopen.... %s \n", filename);
    initializeGekko();
    FILE* ret;
    if(CTX->interception_enabled()) {
@@ -2627,6 +2628,7 @@ fopen(const char* filename, const char* mode) {

size_t
fread(void* ptr, size_t size, size_t nmemb, FILE* stream) {
    debug_info("[BYPASS] >> fread.... \n");
    initializeGekko();
    size_t ret;
    if(CTX->interception_enabled()) {
@@ -2642,6 +2644,7 @@ fread(void* ptr, size_t size, size_t nmemb, FILE* stream) {

size_t
fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream) {
    debug_info("[BYPASS] >> fwrite.... \n");
    initializeGekko();
    size_t ret;
    if(CTX->interception_enabled()) {
@@ -2657,6 +2660,7 @@ fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream) {

int
fseek(FILE* stream, long int offset, int whence) {
    debug_info("[BYPASS] >> fseek.... \n");
    initializeGekko();
    int ret;
    if(CTX->interception_enabled()) {
@@ -2671,6 +2675,7 @@ fseek(FILE* stream, long int offset, int whence) {

long
ftell(FILE* stream) {
    debug_info("[BYPASS] >> ftell.... \n");
    initializeGekko();
    long ret;
    if(CTX->interception_enabled()) {
@@ -2685,6 +2690,7 @@ ftell(FILE* stream) {

void
rewind(FILE* stream) {
    debug_info("[BYPASS] >> rewind.... \n");
    initializeGekko();
    if(CTX->interception_enabled()) {
        if(CTX->file_map()->exist(stream->_fileno)) {
@@ -2697,6 +2703,8 @@ rewind(FILE* stream) {

int
fclose(FILE* stream) {
    
    debug_info("[BYPASS] >> fclose.... \n");
    initializeGekko();
    int ret;
    if(CTX->interception_enabled()) {
@@ -2714,6 +2722,7 @@ fclose(FILE* stream) {
// feof implementation with lseek
int
feof(FILE* stream) {
    debug_info("[BYPASS] >> feof.... \n");
    initializeGekko();
    int ret;
    if(CTX->interception_enabled()) {