summaryrefslogtreecommitdiff
path: root/indra/llvfs
diff options
context:
space:
mode:
authorEric Tulla <tulla@lindenlab.com>2008-05-14 21:37:13 +0000
committerEric Tulla <tulla@lindenlab.com>2008-05-14 21:37:13 +0000
commite77de5d685ae441f72920f0e04d9887ee958745a (patch)
treeb3736831042b20be198dc9994ba68db1e8be2a14 /indra/llvfs
parent41e1ed5b4153019b07d97f54751db53fa248d8d4 (diff)
Result of svn merge -r 87455:87538 $SVN/branches/tulla/vc3-merge .
Passed QA as part of QAR-491.
Diffstat (limited to 'indra/llvfs')
-rw-r--r--indra/llvfs/lldir.cpp30
-rw-r--r--indra/llvfs/llvfs.cpp45
2 files changed, 38 insertions, 37 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index ae35b656d6..3604d3f86f 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -492,21 +492,21 @@ bool LLDir::setCacheDir(const std::string &path)
void LLDir::dumpCurrentDirectories()
{
- llinfos << "Current Directories:" << llendl;
-
- llinfos << " CurPath: " << getCurPath() << llendl;
- llinfos << " AppName: " << getAppName() << llendl;
- llinfos << " ExecutableFilename: " << getExecutableFilename() << llendl;
- llinfos << " ExecutableDir: " << getExecutableDir() << llendl;
- llinfos << " ExecutablePathAndName: " << getExecutablePathAndName() << llendl;
- llinfos << " WorkingDir: " << getWorkingDir() << llendl;
- llinfos << " AppRODataDir: " << getAppRODataDir() << llendl;
- llinfos << " OSUserDir: " << getOSUserDir() << llendl;
- llinfos << " OSUserAppDir: " << getOSUserAppDir() << llendl;
- llinfos << " LindenUserDir: " << getLindenUserDir() << llendl;
- llinfos << " TempDir: " << getTempDir() << llendl;
- llinfos << " CAFile: " << getCAFile() << llendl;
- llinfos << " SkinDir: " << getSkinDir() << llendl;
+ LL_DEBUGS2("AppInit","Directories") << "Current Directories:" << LL_ENDL;
+
+ LL_DEBUGS2("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL;
+ LL_DEBUGS2("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
}
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 66d333ccaf..cb04dee834 100644
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -248,7 +248,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
mDataFilename = new char[strlen(data_filename) + 1]; /* Flawfinder: ignore */
if (mIndexFilename == NULL || mDataFilename == NULL)
{
- llerrs << "Memory Allocation Failure" << llendl;
+ LL_ERRS("VFS") << "Memory Allocation Failure" << LL_ENDL;
return;
}
strcpy(mIndexFilename, index_filename); /* Flawfinder: ignore */
@@ -261,7 +261,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
if (mReadOnly)
{
- llwarns << "Can't find " << mDataFilename << " to open read-only VFS" << llendl;
+ LL_WARNS("VFS") << "Can't find " << mDataFilename << " to open read-only VFS" << LL_ENDL;
mValid = VFSVALID_BAD_CANNOT_OPEN_READONLY;
return;
}
@@ -274,18 +274,18 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
}
else
{
- llwarns << "Can't open VFS data file " << mDataFilename << " attempting to use alternate" << llendl;
+ LL_WARNS("VFS") << "Can't open VFS data file " << mDataFilename << " attempting to use alternate" << LL_ENDL;
char *temp_index = new char[strlen(mIndexFilename) + 10]; /* Flawfinder: ignore */
if (!temp_index)
{
- llerrs << "Out of the memory in LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL read_only, const U32 presize, const BOOL remove_after_crash)" << llendl;
+ LL_ERRS("VFS") << "Out of the memory in LLVFS::LLVFS()" << LL_ENDL;
return;
}
char *temp_data = new char[strlen(mDataFilename) + 10]; /* Flawfinder: ignore */
if (!temp_data)
{
- llerrs << "Out of the memory in LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL read_only, const U32 presize, const BOOL remove_after_crash)" << llendl;
+ LL_ERRS("VFS") << "Out of the memory in LLVFS::LLVFS()" << LL_ENDL;
return;
}
@@ -310,7 +310,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
if (! mDataFP)
{
- llwarns << "Couldn't open vfs data file after trying many alternates" << llendl;
+ LL_WARNS("VFS") << "Couldn't open vfs data file after trying many alternates" << LL_ENDL;
mValid = VFSVALID_BAD_CANNOT_CREATE;
delete[] temp_index;
delete[] temp_data;
@@ -338,7 +338,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
char* marker = new char[strlen(mDataFilename) + strlen(".open") + 1]; /* Flawfinder: ignore */
if (!marker )
{
- llerrs << "Out of memory in LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL read_only, const U32 presize, const BOOL remove_after_crash)" << llendl;
+ LL_ERRS("VFS") << "Out of memory in LLVFS::LLVFS()" << LL_ENDL;
return;
}
sprintf(marker, "%s.open", mDataFilename); /* Flawfinder: ignore */
@@ -348,7 +348,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
unlockAndClose(mDataFP);
mDataFP = NULL;
- llwarns << "VFS: File left open on last run, removing old VFS file " << mDataFilename << llendl;
+ LL_WARNS("VFS") << "VFS: File left open on last run, removing old VFS file " << mDataFilename << LL_ENDL;
LLFile::remove(mIndexFilename);
LLFile::remove(mDataFilename);
LLFile::remove(marker);
@@ -356,7 +356,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
mDataFP = openAndLock(mDataFilename, "w+b", FALSE);
if (!mDataFP)
{
- llwarns << "Can't open VFS data file in crash recovery" << llendl;
+ LL_WARNS("VFS") << "Can't open VFS data file in crash recovery" << LL_ENDL;
mValid = VFSVALID_BAD_CANNOT_CREATE;
return;
}
@@ -414,9 +414,9 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
if (block->mLength && block->mSize > 0)
{
// this is corrupt, not empty
- llwarns << "VFS corruption: " << block->mFileID << " (" << block->mFileType << ") at index " << block->mIndexLocation << " DS: " << data_size << llendl;
- llwarns << "Length: " << block->mLength << "\tLocation: " << block->mLocation << "\tSize: " << block->mSize << llendl;
- llwarns << "File has bad data - VFS removed" << llendl;
+ LL_WARNS("VFS") << "VFS corruption: " << block->mFileID << " (" << block->mFileType << ") at index " << block->mIndexLocation << " DS: " << data_size << LL_ENDL;
+ LL_WARNS("VFS") << "Length: " << block->mLength << "\tLocation: " << block->mLocation << "\tSize: " << block->mSize << LL_ENDL;
+ LL_WARNS("VFS") << "File has bad data - VFS removed" << LL_ENDL;
delete[] buffer;
delete block;
@@ -481,13 +481,13 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
if (cur_file_block->mLocation == last_file_block->mLocation
&& cur_file_block->mLength == last_file_block->mLength)
{
- llwarns << "VFS: removing duplicate entry"
+ LL_WARNS("VFS") << "VFS: removing duplicate entry"
<< " at " << cur_file_block->mLocation
<< " length " << cur_file_block->mLength
<< " size " << cur_file_block->mSize
<< " ID " << cur_file_block->mFileID
<< " type " << cur_file_block->mFileType
- << llendl;
+ << LL_ENDL;
// Duplicate entries. Nuke them both for safety.
mFileBlocks.erase(*cur_file_block); // remove ID/type entry
@@ -528,12 +528,12 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
mDataFP = NULL;
LLFile::remove( mDataFilename );
- llwarns << "VFS: overlapping entries"
+ LL_WARNS("VFS") << "VFS: overlapping entries"
<< " at " << cur_file_block->mLocation
<< " length " << cur_file_block->mLength
<< " ID " << cur_file_block->mFileID
<< " type " << cur_file_block->mFileType
- << llendl;
+ << LL_ENDL;
mValid = VFSVALID_BAD_CORRUPT;
return;
}
@@ -563,7 +563,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
{
if (mReadOnly)
{
- llwarns << "Can't find " << mIndexFilename << " to open read-only VFS" << llendl;
+ LL_WARNS("VFS") << "Can't find " << mIndexFilename << " to open read-only VFS" << LL_ENDL;
mValid = VFSVALID_BAD_CANNOT_OPEN_READONLY;
return;
}
@@ -572,7 +572,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
mIndexFP = openAndLock(mIndexFilename, "w+b", FALSE);
if (!mIndexFP)
{
- llwarns << "Couldn't open an index file for the VFS, probably a sharing violation!" << llendl;
+ LL_WARNS("VFS") << "Couldn't open an index file for the VFS, probably a sharing violation!" << LL_ENDL;
unlockAndClose( mDataFP );
mDataFP = NULL;
@@ -593,7 +593,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
char* marker = new char[strlen(mDataFilename) + strlen(".open") + 1];
if (!marker)
{
- llerrs << "Out of memory in LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL read_only, const U32 presize, const BOOL remove_after_crash)" << llendl;
+ LL_ERRS("VFS") << "Out of memory in LLVFS::LLVFS()" << LL_ENDL;
return;
}
sprintf(marker, "%s.open", mDataFilename); /* Flawfinder: ignore */
@@ -607,7 +607,8 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r
marker = NULL;
}
- llinfos << "VFS: Using index file " << mIndexFilename << " and data file " << mDataFilename << llendl;
+ LL_WARNS("VFS") << "Using index file " << mIndexFilename << LL_ENDL;
+ LL_WARNS("VFS") << "Using data file " << mDataFilename << LL_ENDL;
mValid = VFSVALID_OK;
}
@@ -616,7 +617,7 @@ LLVFS::~LLVFS()
{
if (mDataMutex->isLocked())
{
- llerrs << "LLVFS destroyed with mutex locked" << llendl;
+ LL_ERRS("VFS") << "LLVFS destroyed with mutex locked" << LL_ENDL;
}
unlockAndClose(mIndexFP);
@@ -642,7 +643,7 @@ LLVFS::~LLVFS()
char* marker_file = new char[strlen(mDataFilename) + strlen(".open") + 1];
if (marker_file == NULL)
{
- llerrs << "Memory Allocation Failure" << llendl;
+ LL_ERRS("VFS") << "Memory Allocation Failure" << LL_ENDL;
return;
}
sprintf(marker_file, "%s.open", mDataFilename); /* Flawfinder: ignore */