Browse Source

Remove the mmap debugging for now.

Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
pull/2/head
Rémi Denis-Courmont 19 years ago
parent
commit
d9a7620aa5
  1. 10
      modules/access/mmap.c

10
modules/access/mmap.c

@ -42,6 +42,10 @@
#define FILE_MMAP_LONGTEXT N_( \
"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 void Close (vlc_object_t *);
@ -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);
if (dbgpos != p_access->info.i_pos)
msg_Err (p_access, "position: 0x%08llx instead of 0x%08llx",
@ -225,7 +229,7 @@ static block_t *Block (access_t *p_access)
block->p_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",
(unsigned long)length, addr, (unsigned long)outer_offset);
@ -248,7 +252,7 @@ static block_t *Block (access_t *p_access)
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);
#endif

Loading…
Cancel
Save