]> git.sesse.net Git - vlc/commitdiff
Remove the mmap debugging for now.
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 1 Mar 2008 22:17:40 +0000 (00:17 +0200)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 2 Mar 2008 08:48:28 +0000 (10:48 +0200)
Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
modules/access/mmap.c

index 57ed8bf78f705eaf9e2b2d310084d24ecf891b89..b1289170d10e83a7c45a1defa74d43a459cc18b8 100644 (file)
 #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