From 34b23241447251053efb1ee8032d1caa2965be6d Mon Sep 17 00:00:00 2001 From: ahodgkinson Date: Tue, 13 Jun 2006 19:02:07 +0000 Subject: [PATCH] Misc. FTK cleanup. git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@567 0109f412-320b-0410-ab79-c3e0c5ffbbe6 --- ftk/src/ftkdir.cpp | 6 +++--- ftk/src/ftkmem.cpp | 10 ---------- ftk/src/ftknlm.cpp | 14 +++++++------- ftk/src/ftksys.h | 1 - 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/ftk/src/ftkdir.cpp b/ftk/src/ftkdir.cpp index b233c8d..01da334 100644 --- a/ftk/src/ftkdir.cpp +++ b/ftk/src/ftkdir.cpp @@ -933,7 +933,7 @@ FSTATIC int Find1( char *PathSeparator; FLMINT uiFindLen; FLMINT uiLen; -#ifdef FLM_NLM +#ifdef FLM_LIBC_NLM char szPosixNam[ F_PATH_MAX_SIZE]; FLMINT uiCount; #endif @@ -951,7 +951,7 @@ FSTATIC int Find1( f_strcpy( DirInfo->full_path, FindTemplate); -#ifdef FLM_NLM +#ifdef FLM_LIBC_NLM if( (( PathSeparator = strrchr( DirInfo->full_path, '/')) == NULL) && ( PathSeparator = strrchr( DirInfo->full_path, '\\')) == NULL) #else @@ -992,7 +992,7 @@ FSTATIC int Find1( errno = 0; DirInfo->globbuf.gl_pathv = 0; -#ifdef FLM_NLM +#ifdef FLM_LIBC_NLM // glob does not seem to be able to handle a non-posix path // on NetWare. for( uiCount = 0; uiCount <= uiFindLen; uiCount++) diff --git a/ftk/src/ftkmem.cpp b/ftk/src/ftkmem.cpp index 3ac7475..ce0d4d1 100644 --- a/ftk/src/ftkmem.cpp +++ b/ftk/src/ftkmem.cpp @@ -3386,16 +3386,6 @@ void F_FixedAlloc::freeAll( void) m_bAvailListSorted = TRUE; m_uiTotalFreeCells = 0; - if( m_pUsageStats) - { - f_memset( m_pUsageStats, 0, sizeof( FLM_SLAB_USAGE)); - } - - if( m_puiTotalBytesAllocated) - { - m_puiTotalBytesAllocated = 0; - } - m_pSlabManager->unlockMutex(); } diff --git a/ftk/src/ftknlm.cpp b/ftk/src/ftknlm.cpp index b8d4c31..21cb55f 100644 --- a/ftk/src/ftknlm.cpp +++ b/ftk/src/ftknlm.cpp @@ -1061,8 +1061,10 @@ Desc: Default Constructor for F_FileHdl class #if defined( FLM_RING_ZERO_NLM) F_FileHdl::F_FileHdl() { - // Should call the base class constructor automatically. - + m_bFileOpened = FALSE; + m_bDeleteOnClose = FALSE; + m_bOpenedExclusive = FALSE; + m_bOpenedReadOnly = FALSE; m_lFileHandle = -1; m_lOpenAttr = 0; m_uiCurrentPos = 0; @@ -1073,12 +1075,10 @@ F_FileHdl::F_FileHdl() m_uiExtendSize = 0; m_uiMaxFileSize = f_getMaxFileSize(); m_uiMaxAutoExtendSize = m_uiMaxFileSize; - - // Direct IO members - m_bDoDirectIO = FALSE; // TRUE = do direct IO-style read/writes + m_bDoDirectIO = FALSE; m_lSectorsPerBlock = 0; m_lMaxBlocks = 0; - + m_NssKey = 0; m_bNSS = FALSE; m_bNSSFileOpen = FALSE; } @@ -4203,7 +4203,7 @@ extern "C" LONG f_nlmEntryPoint( if (moduleHandle->LDFlags & 4) { - gv_lFlmSyncSem = kSemaphoreAlloc( (BYTE *)"NOVDB", 0); + gv_lFlmSyncSem = kSemaphoreAlloc( (BYTE *)"FLAIM_SYNC", 0); } // Initialize NSS diff --git a/ftk/src/ftksys.h b/ftk/src/ftksys.h index ecf9c0d..d1d10b6 100644 --- a/ftk/src/ftksys.h +++ b/ftk/src/ftksys.h @@ -997,7 +997,6 @@ FLMBOOL m_bFileOpened; FLMBOOL m_bOpenedExclusive; FLMBOOL m_bOpenedReadOnly; - LONG m_lFileHandle; LONG m_lOpenAttr; LONG m_lVolumeID;