[vlc-devel] Rémi Denis-Courmont : Remove the mmap debugging for now.

git version control git at videolan.org
Sun Mar 2 09:48:46 CET 2008


Module: vlc
Branch: master
Commit: d9a7620aa541dca4e0e29c7ab1af2653f7723bac
URL:    http://git2.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9a7620aa541dca4e0e29c7ab1af2653f7723bac

Author: Rémi Denis-Courmont <rem at videolan.org>
Date:   Sun Mar  2 00:17:40 2008 +0200

Remove the mmap debugging for now.

Signed-off-by: Rémi Denis-Courmont <rem at videolan.org>

---

 modules/access/mmap.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/access/mmap.c b/modules/access/mmap.c
index 57ed8bf..b128917 100644
--- a/modules/access/mmap.c
+++ b/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
 




More information about the vlc-devel mailing list