diff options
author | Stef Walter <stef@thewalter.net> | 2011-01-23 14:47:41 -0600 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2011-01-23 14:47:41 -0600 |
commit | bad8106bc0fc8f509e9a29d7de301dc46d604abe (patch) | |
tree | 6668c79d0c2daf63bc72a8225d91f11bfaa0cb65 | |
parent | 0ce28cbfed5d711405dbfd85f7321b824842e47a (diff) |
Various output and progress tweaks.
-rw-r--r-- | src/debug.h | 1 | ||||
-rw-r--r-- | src/list.c | 2 | ||||
-rw-r--r-- | src/misc.c | 3 | ||||
-rw-r--r-- | src/ntfsx.c | 1 | ||||
-rw-r--r-- | src/scrounge.c | 9 |
5 files changed, 10 insertions, 6 deletions
diff --git a/src/debug.h b/src/debug.h index ea39d97..debca2d 100644 --- a/src/debug.h +++ b/src/debug.h @@ -20,6 +20,7 @@ #ifdef _DEBUG #include <stdarg.h> +#include <assert.h> #ifndef ASSERT #ifdef ATLASSERT @@ -109,7 +109,7 @@ int printPartitionInfo(int dd, uint64 tblSector) #else printf(" %-15llu %-15llu ", (unsigned long long)(tblSector + mbr.partitions[i].startsec), - (unsigned long long)tblSector + mbr.partitions[i].endsec)); + (unsigned long long)(tblSector + mbr.partitions[i].endsec)); #endif printNTFSInfo(dd, tblSector + (uint64)mbr.partitions[i].startsec); @@ -22,7 +22,6 @@ #include "memref.h" #include "locks.h" - /* These locks are used to signify which */ struct drivelock { @@ -74,7 +73,7 @@ uint64 checkLocationLock(drivelocks* locks, uint64 sec) sec < locks->_locks[i].end) { locked = locks->_locks[i].end - sec; - assert(locked != 0); + ASSERT(locked != 0); return locked; } } diff --git a/src/ntfsx.c b/src/ntfsx.c index 791fc16..9d5aa96 100644 --- a/src/ntfsx.c +++ b/src/ntfsx.c @@ -473,6 +473,7 @@ bool ntfsx_record_read(ntfsx_record* record, uint64 begSector, int dd) !ntfs_dofixups(record->_clus.data, record->_clus.size)) { warnx("invalid mft record"); + errno = EINVAL; ntfsx_cluster_release(&(record->_clus)); return false; } diff --git a/src/scrounge.c b/src/scrounge.c index a5670d7..61c2987 100644 --- a/src/scrounge.c +++ b/src/scrounge.c @@ -184,6 +184,12 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags) if(!fcscmp(basics.filename, FC_DOT)) RETURN; +#if 0 + printf("SECTOR: %llu", (unsigned long long)sector); +#endif + printf(flags & PROCESS_MFT_FLAG_SUB ? + "\\" FC_PRINTF : "\\" FC_PRINTF "\n", basics.filename); + /* System, Hidden files that begin with $ are skipped */ if(basics.flags & kNTFS_FileSystem && basics.flags & kNTFS_FileHidden && @@ -205,9 +211,6 @@ void processMFTRecord(partitioninfo* pi, uint64 sector, uint32 flags) } } - printf(flags & PROCESS_MFT_FLAG_SUB ? - "\\" FC_PRINTF : "\\" FC_PRINTF "\n", basics.filename); - /* Directory handling: */ if(header->flags & kNTFS_RecFlagDir) { |