From d046837241cd5d007d54ff09e63e92d7a16ff6e4 Mon Sep 17 00:00:00 2001 From: szaka Date: Mon, 15 Jan 2007 21:58:00 +0000 Subject: [PATCH] report logfile check errors --- libntfs-3g/logfile.c | 16 ++++++++-------- src/utils.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libntfs-3g/logfile.c b/libntfs-3g/logfile.c index c41a762b..1bf2fe11 100644 --- a/libntfs-3g/logfile.c +++ b/libntfs-3g/logfile.c @@ -655,19 +655,16 @@ BOOL ntfs_is_logfile_clean(ntfs_attr *log_na, RESTART_PAGE_HEADER *rp) ntfs_log_trace("Entering.\n"); /* An empty $LogFile must have been clean before it got emptied. */ if (NVolLogFileEmpty(log_na->ni->vol)) { - ntfs_log_trace("Done. ($LogFile is empty.)\n"); + ntfs_log_trace("$LogFile is empty\n"); return TRUE; } if (!rp) { - ntfs_log_error("Restart page header is NULL.\n"); + ntfs_log_error("Restart page header is NULL\n"); return FALSE; } if (!ntfs_is_rstr_record(rp->magic) && !ntfs_is_chkd_record(rp->magic)) { - ntfs_log_error("Restart page buffer is invalid. This is " - "probably a bug in that the $LogFile should " - "have been consistency checked before calling " - "this function.\n"); + ntfs_log_error("Restart page buffer is invalid\n"); return FALSE; } @@ -679,11 +676,14 @@ BOOL ntfs_is_logfile_clean(ntfs_attr *log_na, RESTART_PAGE_HEADER *rp) */ if (ra->client_in_use_list != LOGFILE_NO_CLIENT && !(ra->flags & RESTART_VOLUME_IS_CLEAN)) { - ntfs_log_debug("Done. $LogFile indicates a dirty shutdown.\n"); + ntfs_log_error("$LogFile indicates unclean shutdown (%d, %d). " + "Please report to %s!\n", + le16_to_cpu(ra->client_in_use_list), + le16_to_cpu(ra->flags), NTFS_DEV_LIST); return FALSE; } /* $LogFile indicates a clean shutdown. */ - ntfs_log_trace("Done. $LogFile indicates a clean shutdown.\n"); + ntfs_log_trace("$LogFile indicates a clean shutdown\n"); return TRUE; } diff --git a/src/utils.c b/src/utils.c index d6414f78..40ba1009 100644 --- a/src/utils.c +++ b/src/utils.c @@ -97,7 +97,7 @@ static const char *hibernated_volume_msg = "off properly, so mounting could be done safely.\n"; static const char *unclean_journal_msg = -"Mount is denied because NTFS is unclean. Choose one of these actions:\n" +"Mount is denied because NTFS logfile is unclean. Choose one action:\n" " Boot Windows and shutdown it cleanly, or if you have a removable\n" " device then click the 'Safely Remove Hardware' icon in the Windows\n" " taskbar notification area before disconnecting it.\n"