diff --git a/cpp/disk_image/mmap_file_handle.cpp b/cpp/disk_image/mmap_file_handle.cpp index 85703ac8..9b11de43 100644 --- a/cpp/disk_image/mmap_file_handle.cpp +++ b/cpp/disk_image/mmap_file_handle.cpp @@ -41,7 +41,7 @@ MmapFileHandle::MmapFileHandle(const string &path, int size, uint32_t blocks, of { LOGWARN("Unable to open file %s. Errno:%d", path.c_str(), errno) } - LOGWARN("%s opened %s", __PRETTY_FUNCTION__, path.c_str()) + LOGINFO("%s opened %s", __PRETTY_FUNCTION__, path.c_str()) struct stat sb; if (fstat(fd, &sb) < 0) { @@ -49,9 +49,7 @@ MmapFileHandle::MmapFileHandle(const string &path, int size, uint32_t blocks, of } printf("Size: %d\n", (unsigned int)sb.st_size); - LOGWARN("%s mmap-ed file of size: %d", __PRETTY_FUNCTION__, (unsigned int)sb.st_size) - - // int x = EACCES; + LOGINFO("%s mmap-ed file of size: %d", __PRETTY_FUNCTION__, (unsigned int)sb.st_size) memory_block = (const char *)mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); int errno_val = errno; @@ -76,7 +74,6 @@ MmapFileHandle::~MmapFileHandle() bool MmapFileHandle::ReadSector(vector& buf, int block) { assert(sec_size != 0); - assert(buf); assert(block < sec_blocks); assert(memory_block); @@ -93,8 +90,6 @@ bool MmapFileHandle::ReadSector(vector& buf, int block) bool MmapFileHandle::WriteSector(const vector& buf, int block) { - - assert(buf); assert(block < sec_blocks); assert(memory_block); diff --git a/cpp/disk_image/posix_file_handle.cpp b/cpp/disk_image/posix_file_handle.cpp index af3a3292..505b7dcb 100644 --- a/cpp/disk_image/posix_file_handle.cpp +++ b/cpp/disk_image/posix_file_handle.cpp @@ -59,9 +59,7 @@ bool PosixFileHandle::ReadSector(vector& buf, int block) } assert(sec_size != 0); - assert(buf); assert(block < sec_blocks); - assert(memory_block); size_t sector_size_bytes = (size_t)1 << sec_size; @@ -86,7 +84,6 @@ bool PosixFileHandle::WriteSector(const vector& buf, int block) return false; } - assert(buf); assert(block < sec_blocks); assert(memory_block);