diff --git a/libtransmission/fdlimit.c b/libtransmission/fdlimit.c index 8fbe1f97f..f057b2ce2 100644 --- a/libtransmission/fdlimit.c +++ b/libtransmission/fdlimit.c @@ -243,9 +243,9 @@ void tr_close_file( int fd ) { #if defined(HAVE_POSIX_FADVISE) - const int err = errno; /* Set hint about not caching this file. It's okay for this to fail silently, so don't let it affect errno */ + const int err = errno; posix_fadvise( fd, 0, 0, POSIX_FADV_DONTNEED ); errno = err; #endif diff --git a/libtransmission/utils.c b/libtransmission/utils.c index c14e418bc..93f05f055 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -481,7 +481,6 @@ tr_loadFile( const char * path, errno = err; return NULL; } - tr_inf( "at the end of stat(%s), errno is %d", path, errno ); if( ( sb.st_mode & S_IFMT ) != S_IFREG ) { @@ -489,7 +488,6 @@ tr_loadFile( const char * path, errno = EISDIR; return NULL; } - tr_inf( "looks like %s is a regular file... now we'll try to read it", path ); /* Load the torrent file into our buffer */ fd = tr_open_file_for_scanning( path ); @@ -500,7 +498,6 @@ tr_loadFile( const char * path, errno = err; return NULL; } - tr_inf( "after trying to open the file for reading, fd is %d and errno is %d", fd, errno ); buf = malloc( sb.st_size + 1 ); if( !buf ) { @@ -511,7 +508,6 @@ tr_loadFile( const char * path, return NULL; } n = read( fd, buf, sb.st_size ); - tr_inf( "file size is %"PRId64"; read is %"PRId64", errno is %d", (int64_t)sb.st_size, (int64_t)n, errno ); if( n == -1 ) { const int err = errno; @@ -522,7 +518,6 @@ tr_loadFile( const char * path, return NULL; } - tr_inf( "nearing the end, and errno is %d", errno ); tr_close_file( fd ); buf[ sb.st_size ] = '\0'; *size = sb.st_size;