From e338f95879dd3ad1f89e7618b0ddf4f28e6245c7 Mon Sep 17 00:00:00 2001 From: szaka Date: Thu, 25 Oct 2007 20:03:10 +0000 Subject: [PATCH] ntfs_file_record_read(): logging cleanup --- libntfs-3g/mft.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libntfs-3g/mft.c b/libntfs-3g/mft.c index b4bdd0c6..d4d280f8 100644 --- a/libntfs-3g/mft.c +++ b/libntfs-3g/mft.c @@ -265,19 +265,20 @@ int ntfs_file_record_read(const ntfs_volume *vol, const MFT_REF mref, } err = EIO; if (!ntfs_is_file_record(m->magic)) { - ntfs_log_perror("Record %llu has no FILE magic", - (unsigned long long)MREF(mref)); + ntfs_log_error("Record %llu has no FILE magic (0x%x)\n", + (unsigned long long)MREF(mref), *(le32 *)m); goto err_out; } if (MSEQNO(mref) && MSEQNO(mref) != le16_to_cpu(m->sequence_number)) { - ntfs_log_perror("Record %llu has wrong SeqNo", - (unsigned long long)MREF(mref)); + ntfs_log_error("Record %llu has wrong SeqNo (%d <> %d)\n", + (unsigned long long)MREF(mref), MSEQNO(mref), + le16_to_cpu(m->sequence_number)); goto err_out; } a = (ATTR_RECORD*)((char*)m + le16_to_cpu(m->attrs_offset)); if (p2n(a) < p2n(m) || (char*)a > (char*)m + vol->mft_record_size) { - ntfs_log_perror("Record %llu is corrupt", - (unsigned long long)MREF(mref)); + ntfs_log_error("Record %llu is corrupt\n", + (unsigned long long)MREF(mref)); goto err_out; } *mrec = m;