mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Redefined file_offset on 64 bits in ntfsrecover.h
The log file offsets are apparently stored on 64 bits, though the file size is unlikely to reach 2MB.
This commit is contained in:
parent
d947ffa834
commit
044f2104f9
@ -1101,7 +1101,7 @@ static const struct BUFFER *findprevious(CONTEXT *ctx, const struct BUFFER *buf)
|
||||
prevblk = (logfilesz >> blockbits) - 1;
|
||||
else {
|
||||
rph = &buf->block.record;
|
||||
prevblk = (le32_to_cpu(rph->copy.file_offset)
|
||||
prevblk = (sle64_to_cpu(rph->copy.file_offset)
|
||||
>> blockbits) - 1;
|
||||
/*
|
||||
* If an initial block leads to block 4, it
|
||||
@ -2371,8 +2371,8 @@ static void showheadrcrd(u32 blk, const RECORD_PAGE_HEADER *rph)
|
||||
printf("usa_count %04x\n",
|
||||
(int)le16_to_cpu(rph->usa_count));
|
||||
if (blk < 4)
|
||||
printf("file_offset %08lx\n",
|
||||
(long)le32_to_cpu(rph->copy.file_offset));
|
||||
printf("file_offset %016llx\n",
|
||||
(long long)sle64_to_cpu(rph->copy.file_offset));
|
||||
else {
|
||||
diff = sle64_to_cpu(rph->copy.last_lsn) - synced_lsn;
|
||||
printf("last_lsn %016llx"
|
||||
|
@ -202,7 +202,7 @@ typedef struct { /* size 40 */
|
||||
le16 usa_count;
|
||||
union {
|
||||
leLSN last_lsn;
|
||||
le32 file_offset;
|
||||
sle64 file_offset;
|
||||
} __attribute__((__packed__)) copy;
|
||||
le32 flags;
|
||||
le16 page_count;
|
||||
|
Loading…
Reference in New Issue
Block a user