From: Sean Hefty Date: Tue, 7 Aug 2012 18:08:30 +0000 (-0700) Subject: support for debug prints X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0771c59dbf02c9c6170f8fb47c7d656e5e850006;p=~shefty%2Flibrdmacm.git support for debug prints --- diff --git a/src/preload.c b/src/preload.c index b9c32e67..37b23c59 100644 --- a/src/preload.c +++ b/src/preload.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -98,6 +99,8 @@ static int rq_size; static int sq_inline; static int fork_support; +static FILE fout; + enum fd_type { fd_normal, fd_rsocket, @@ -286,6 +289,7 @@ static void init_preload(void) rs.getsockopt = dlsym(RTLD_DEFAULT, "rgetsockopt"); rs.fcntl = dlsym(RTLD_DEFAULT, "rfcntl"); + fout = fopen("rs-out.txt", "w+"); getenv_options(); init = 1; out: @@ -967,6 +971,7 @@ int fstat(int socket, struct stat *buf) { int fd, ret; + fprintf(fout, "fstat"); if (fd_get(socket, &fd) == fd_rsocket) { ret = real.fstat(socket, buf); if (!ret)