mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
(trunk libT) clean up the debugging messages added to smoke out #2030
This commit is contained in:
parent
091abed323
commit
a0597ec8fb
2 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue