minor cleanup

This commit is contained in:
cha0smaster 2005-10-27 20:42:10 +00:00
parent 8b1263c217
commit 1ce16eddb7
4 changed files with 19 additions and 15 deletions

View File

@ -636,8 +636,9 @@ int ntfs_index_rm(ntfs_index_context *ictx)
if (ntfs_attr_truncate(na, new_index_length + offsetof(
INDEX_ROOT, index))) {
err = errno;
ntfs_log_error("Failed to truncate INDEX_ROOT attribute. "
" Leaving inconsist metadata.");
ntfs_log_error("Failed to truncate INDEX_ROOT "
"attribute. Leaving inconsist "
"metadata.");
goto err_out;
}
ntfs_attr_close(na);

View File

@ -606,13 +606,13 @@ is_empty:
*/
if (rstr2_lsn > rstr1_lsn) {
ntfs_log_debug("Using second restart page as it is more "
"recent.");
"recent.\n");
free(rstr1_ph);
rstr1_ph = rstr2_ph;
/* rstr1_lsn = rstr2_lsn; */
} else {
ntfs_log_debug("Using first restart page as it is more "
"recent.");
"recent.\n");
free(rstr2_ph);
}
rstr2_ph = NULL;
@ -721,7 +721,8 @@ int ntfs_empty_logfile(ntfs_attr *na)
/* Get length of $LogFile contents. */
len = na->data_size;
if (!len) {
ntfs_log_debug("$LogFile has zero length, no disk write needed.\n");
ntfs_log_debug("$LogFile has zero length, no disk write "
"needed.\n");
return 0;
}
@ -734,8 +735,8 @@ int ntfs_empty_logfile(ntfs_attr *na)
if (count == -1 || pos != len) {
err = errno;
ntfs_log_debug("Amount of $LogFile data read does not correspond to "
"expected length!");
ntfs_log_debug("Amount of $LogFile data read does not "
"correspond to expected length!\n");
if (count != -1)
err = EIO;
goto io_error_exit;
@ -752,7 +753,8 @@ int ntfs_empty_logfile(ntfs_attr *na)
if ((count = ntfs_attr_pwrite(na, pos, count, buf)) <= 0) {
err = errno;
ntfs_log_debug("Failed to set the $LogFile attribute value.\n");
ntfs_log_debug("Failed to set the $LogFile attribute "
"value.\n");
if (count != -1)
err = EIO;
goto io_error_exit;

View File

@ -4,7 +4,7 @@
* Copyright (c) 2004-2005 Yura Pakhuchiy
* Copyright (c) 2005 Anton Altaparmakov
*
* This utility will overwrite files on ntfs volume
* This utility will overwrite files on NTFS volume.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -186,20 +186,21 @@ ntfs_volume * utils_mount_volume(const char *device, unsigned long flags, BOOL f
err = errno;
ntfs_log_perror("Couldn't mount device '%s'", device);
if (err == EPERM)
ntfs_log_error("Windows was hibernated. Try to mount volume "
"in windows, shut down and try "
ntfs_log_error("Windows was hibernated. Try to mount "
"volume in windows, shut down and try "
"again.\n");
if (err == EOPNOTSUPP)
ntfs_log_error("Windows did not shut down properly. Try to "
"mount volume in windows, shut down "
"and try again.\n");
ntfs_log_error("Windows did not shut down properly. "
"Try to mount volume in windows, "
"shut down and try again.\n");
return NULL;
}
if (vol->flags & VOLUME_IS_DIRTY) {
ntfs_log_warning("Volume is dirty.\n");
if (!force) {
ntfs_log_error("Run chkdsk and try again, or use the --force option.\n");
ntfs_log_error("Run chkdsk and try again, or use the "
"force option.\n");
ntfs_umount(vol, FALSE);
return NULL;
}