Commit d9a7620a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove the mmap debugging for now.

Signed-off-by: default avatarRémi Denis-Courmont <rem@videolan.org>
parent 1db7c223
...@@ -42,6 +42,10 @@ ...@@ -42,6 +42,10 @@
#define FILE_MMAP_LONGTEXT N_( \ #define FILE_MMAP_LONGTEXT N_( \
"Try to use memory mapping to read files and block devices." ) "Try to use memory mapping to read files and block devices." )
#ifndef NDEBUG
/*# define MMAP_DEBUG 1*/
#endif
static int Open (vlc_object_t *); static int Open (vlc_object_t *);
static void Close (vlc_object_t *); static void Close (vlc_object_t *);
...@@ -179,7 +183,7 @@ static block_t *Block (access_t *p_access) ...@@ -179,7 +183,7 @@ static block_t *Block (access_t *p_access)
} }
} }
#ifndef NDEBUG #ifdef MMAP_DEBUG
int64_t dbgpos = lseek (p_sys->fd, 0, SEEK_CUR); int64_t dbgpos = lseek (p_sys->fd, 0, SEEK_CUR);
if (dbgpos != p_access->info.i_pos) if (dbgpos != p_access->info.i_pos)
msg_Err (p_access, "position: 0x%08llx instead of 0x%08llx", msg_Err (p_access, "position: 0x%08llx instead of 0x%08llx",
...@@ -225,7 +229,7 @@ static block_t *Block (access_t *p_access) ...@@ -225,7 +229,7 @@ static block_t *Block (access_t *p_access)
block->p_buffer += inner_offset; block->p_buffer += inner_offset;
block->i_buffer -= inner_offset; block->i_buffer -= inner_offset;
#ifndef NDEBUG #ifdef MMAP_DEBUG
msg_Dbg (p_access, "mapped 0x%lx bytes at %p from offset 0x%lx", msg_Dbg (p_access, "mapped 0x%lx bytes at %p from offset 0x%lx",
(unsigned long)length, addr, (unsigned long)outer_offset); (unsigned long)length, addr, (unsigned long)outer_offset);
...@@ -248,7 +252,7 @@ static block_t *Block (access_t *p_access) ...@@ -248,7 +252,7 @@ static block_t *Block (access_t *p_access)
static int Seek (access_t *p_access, int64_t i_pos) static int Seek (access_t *p_access, int64_t i_pos)
{ {
#ifndef NDEBUG #ifdef MMAP_DEBUG
lseek (p_access->p_sys->fd, i_pos, SEEK_SET); lseek (p_access->p_sys->fd, i_pos, SEEK_SET);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment