diff --git a/libntfs/attrib.c b/libntfs/attrib.c index a086cd29..9a525a5f 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -1204,7 +1204,7 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, const s64 pos, s64 count, const void *b) if (ntfs_cluster_free_from_rl(vol, rlc)) { ntfs_log_trace("Failed to free just " "allocated clusters. Leaving " - "inconstant metadata. Run chkdsk"); + "inconstant metadata. Run chkdsk\n"); } errno = eo; goto err_out; diff --git a/libntfs/collate.c b/libntfs/collate.c index 57c13bfa..2cab50f3 100644 --- a/libntfs/collate.c +++ b/libntfs/collate.c @@ -59,7 +59,7 @@ static int ntfs_collate_binary(ntfs_volume *vol __attribute__((unused)), else rc = 1; } - ntfs_log_trace("Done, returning %i.", rc); + ntfs_log_trace("Done, returning %i.\n", rc); return rc; } @@ -84,7 +84,7 @@ static int ntfs_collate_ntofs_ulong(ntfs_volume *vol __attribute__((unused)), ntfs_log_trace("Entering.\n"); if (data1_len != data2_len || data1_len != 4) { - ntfs_log_error("data1_len or/and data2_len not equal to 4."); + ntfs_log_error("data1_len or/and data2_len not equal to 4.\n"); return NTFS_COLLATION_ERROR; } d1 = le32_to_cpup(data1); @@ -172,7 +172,7 @@ int ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr, ntfs_log_trace("Entering.\n"); if (!vol || !data1 || !data2 || data1_len < 0 || data2_len < 0) { - ntfs_log_error("Invalid arguments passed."); + ntfs_log_error("Invalid arguments passed.\n"); return NTFS_COLLATION_ERROR; } /* diff --git a/libntfs/dir.c b/libntfs/dir.c index 13f69b51..3a0c5ea8 100644 --- a/libntfs/dir.c +++ b/libntfs/dir.c @@ -1113,13 +1113,13 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, ntfs_log_trace("Entering.\n"); /* Sanity checks. */ if (!dir_ni || !name || !name_len) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); return NULL; } /* Allocate MFT record for new file. */ ni = ntfs_mft_record_alloc(dir_ni->vol, NULL); if (!ni) { - ntfs_log_error("Failed to allocate new MFT record."); + ntfs_log_error("Failed to allocate new MFT record.\n"); return NULL; } /* @@ -1130,7 +1130,7 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, si = calloc(1, si_len); if (!si) { err = errno; - ntfs_log_error("Not enough memory."); + ntfs_log_error("Not enough memory.\n"); goto err_out; } si->creation_time = utc2ntfs(ni->creation_time); @@ -1145,7 +1145,7 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, if (ntfs_attr_add(ni, AT_STANDARD_INFORMATION, AT_UNNAMED, 0, (u8*)si, si_len)) { err = errno; - ntfs_log_error("Failed to add STANDARD_INFORMATION attribute."); + ntfs_log_error("Failed to add STANDARD_INFORMATION attribute.\n"); goto err_out; } if (S_ISDIR(type)) { @@ -1159,7 +1159,7 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, ir = calloc(1, ir_len); if (!ir) { err = errno; - ntfs_log_error("Not enough memory."); + ntfs_log_error("Not enough memory.\n"); goto err_out; } ir->type = AT_FILE_NAME; @@ -1183,7 +1183,7 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, if (ntfs_attr_add(ni, AT_INDEX_ROOT, NTFS_INDEX_I30, 4, (u8*)ir, ir_len)) { err = errno; free(ir); - ntfs_log_error("Failed to add INDEX_ROOT attribute."); + ntfs_log_error("Failed to add INDEX_ROOT attribute.\n"); goto err_out; } } else { @@ -1237,7 +1237,7 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, if (ntfs_attr_add(ni, AT_DATA, AT_UNNAMED, 0, (u8*)data, data_len)) { err = errno; - ntfs_log_error("Failed to add DATA attribute."); + ntfs_log_error("Failed to add DATA attribute.\n"); goto err_out; } if (data) @@ -1248,7 +1248,7 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, fn = calloc(1, fn_len); if (!fn) { err = errno; - ntfs_log_error("Not enough memory."); + ntfs_log_error("Not enough memory.\n"); goto err_out; } fn->parent_directory = MK_LE_MREF(dir_ni->mft_no, @@ -1267,14 +1267,14 @@ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, /* Add FILE_NAME attribute to inode. */ if (ntfs_attr_add(ni, AT_FILE_NAME, AT_UNNAMED, 0, (u8*)fn, fn_len)) { err = errno; - ntfs_log_error("Failed to add FILE_NAME attribute."); + ntfs_log_error("Failed to add FILE_NAME attribute.\n"); goto err_out; } /* Add FILE_NAME attribute to index. */ if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no, le16_to_cpu(ni->mrec->sequence_number)))) { err = errno; - ntfs_log_error("Failed to add entry to the index."); + ntfs_log_error("Failed to add entry to the index.\n"); goto err_out; } /* Set hard links count and directory flag. */ @@ -1291,7 +1291,7 @@ err_out: ntfs_log_trace("Failed.\n"); if (ntfs_mft_record_free(ni->vol, ni)) ntfs_log_error("Failed to free MFT record. " - "Leaving inconsistent metadata. Run chkdsk."); + "Leaving inconsistent metadata. Run chkdsk.\n"); free(fn); free(si); errno = err; @@ -1307,7 +1307,7 @@ ntfs_inode *ntfs_create(ntfs_inode *dir_ni, ntfschar *name, u8 name_len, { if (type != S_IFREG && type != S_IFDIR && type != S_IFIFO && type != S_IFSOCK) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); return NULL; } return __ntfs_create(dir_ni, name, name_len, type, 0, NULL, 0); @@ -1317,7 +1317,7 @@ ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, ntfschar *name, u8 name_len, dev_t type, dev_t dev) { if (type != S_IFCHR && type != S_IFBLK) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); return NULL; } return __ntfs_create(dir_ni, name, name_len, type, dev, NULL, 0); @@ -1327,7 +1327,7 @@ ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, ntfschar *name, u8 name_len, ntfschar *target, u8 target_len) { if (!target || !target_len) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); return NULL; } return __ntfs_create(dir_ni, name, name_len, S_IFLNK, 0, @@ -1357,7 +1357,7 @@ int ntfs_delete(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len) ntfs_log_trace("Entering.\n"); if (!ni || !dir_ni || !name || !name_len) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); errno = EINVAL; goto err_out; } @@ -1429,7 +1429,7 @@ search: na = ntfs_attr_open(ni, AT_INDEX_ROOT, NTFS_INDEX_I30, 4); if (!na) { - ntfs_log_error("Corrupt directory or library bug."); + ntfs_log_error("Corrupt directory or library bug.\n"); errno = EIO; goto err_out; } @@ -1445,7 +1445,7 @@ search: (fn->file_name_type == FILE_NAME_WIN32 || fn->file_name_type == FILE_NAME_DOS)))) { ntfs_attr_close(na); - ntfs_log_error("Directory is not empty."); + ntfs_log_error("Directory is not empty.\n"); errno = ENOTEMPTY; goto err_out; } @@ -1504,13 +1504,13 @@ search: if (!rl) { err = errno; ntfs_log_error("Failed to decompress runlist. " - "Leaving inconsistent metadata."); + "Leaving inconsistent metadata.\n"); continue; } if (ntfs_cluster_free_from_rl(ni->vol, rl)) { err = errno; ntfs_log_error("Failed to free clusters. " - "Leaving inconsistent metadata."); + "Leaving inconsistent metadata.\n"); continue; } free(rl); @@ -1519,19 +1519,19 @@ search: if (errno != ENOENT) { err = errno; ntfs_log_error("Attribute enumeration failed. " - "Probably leaving inconsistent metadata."); + "Probably leaving inconsistent metadata.\n"); } /* All extents should be attached after attribute walk. */ while (ni->nr_extents) if (ntfs_mft_record_free(ni->vol, *(ni->extent_nis))) { err = errno; ntfs_log_error("Failed to free extent MFT record. " - "Leaving inconsistent metadata."); + "Leaving inconsistent metadata.\n"); } if (ntfs_mft_record_free(ni->vol, ni)) { err = errno; ntfs_log_error("Failed to free base MFT record. " - "Leaving inconsistent metadata."); + "Leaving inconsistent metadata.\n"); } ni = NULL; out: @@ -1576,7 +1576,7 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len) ntfs_log_trace("Entering.\n"); if (!ni || !dir_ni || !name || !name_len) { err = errno; - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); goto err_out; } /* Create FILE_NAME attribute. */ @@ -1584,7 +1584,7 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len) fn = calloc(1, fn_len); if (!fn) { err = errno; - ntfs_log_error("Not enough memory."); + ntfs_log_error("Not enough memory.\n"); goto err_out; } fn->parent_directory = MK_LE_MREF(dir_ni->mft_no, @@ -1605,7 +1605,7 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len) if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no, le16_to_cpu(ni->mrec->sequence_number)))) { err = errno; - ntfs_log_error("Failed to add entry to the index."); + ntfs_log_error("Failed to add entry to the index.\n"); goto err_out; } /* Add FILE_NAME attribute to inode. */ @@ -1613,7 +1613,7 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len) ntfs_index_context *ictx; err = errno; - ntfs_log_error("Failed to add FILE_NAME attribute."); + ntfs_log_error("Failed to add FILE_NAME attribute.\n"); /* Try to remove just added attribute from index. */ ictx = ntfs_index_ctx_get(dir_ni, NTFS_INDEX_I30, 4); if (!ictx) @@ -1637,7 +1637,7 @@ int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len) ntfs_log_trace("Done.\n"); return 0; rollback_failed: - ntfs_log_error("Rollback failed. Leaving inconsistent metadata."); + ntfs_log_error("Rollback failed. Leaving inconsistent metadata.\n"); err_out: ntfs_log_error("Failed.\n"); free(fn); diff --git a/libntfs/index.c b/libntfs/index.c index 67136d94..0bd8ac90 100644 --- a/libntfs/index.c +++ b/libntfs/index.c @@ -95,7 +95,7 @@ void ntfs_index_ctx_put(ntfs_index_context *ictx) 1, ictx->block_size, ictx->ia) != 1) ntfs_log_error("Failed to write out " - "index block."); + "index block.\n"); } /* Free resources. */ free(ictx->ia); @@ -127,7 +127,7 @@ void ntfs_index_ctx_reinit(ntfs_index_context *ictx) 1, ictx->block_size, ictx->ia) != 1) ntfs_log_error("Failed to write out " - "index block."); + "index block.\n"); } /* Free resources. */ free(ictx->ia); @@ -206,7 +206,7 @@ int ntfs_index_lookup(const void *key, const int key_len, if (err) { if (errno == ENOENT) { ntfs_log_error("Index root attribute missing in inode " - "0x%llx.", ni->mft_no); + "0x%llx.\n", ni->mft_no); err = EIO; } else err = errno; @@ -222,7 +222,7 @@ int ntfs_index_lookup(const void *key, const int key_len, cr = ir->collation_rule; if (!ntfs_is_collation_rule_supported(cr)) { ntfs_log_error("Index uses unsupported collation rule 0x%x. " - "Aborting lookup.", (unsigned)le32_to_cpu(cr)); + "Aborting lookup.\n", (unsigned)le32_to_cpu(cr)); err = EOPNOTSUPP; goto err_out; } @@ -272,7 +272,7 @@ done: le16_to_cpu(ie->key_length)); if (rc == NTFS_COLLATION_ERROR) { ntfs_log_error("Collation error. Probably filename " - "contain invalid characters."); + "contain invalid characters.\n"); err = ERANGE; goto err_out; } @@ -312,14 +312,14 @@ done: if (!na) { ntfs_log_error("No index allocation attribute but index entry " "requires one. Inode 0x%llx is corrupt or " - "library bug.", ni->mft_no); + "library bug.\n", ni->mft_no); goto err_out; } /* Allocate memory to store index block. */ ia = malloc(ictx->block_size); if (!ia) { ntfs_log_error("Not enough memory to allocate buffer for index" - " allocation."); + " allocation.\n"); err = ENOMEM; goto err_out; } @@ -328,20 +328,20 @@ descend_into_child_node: /* Read index allocation block. */ if (ntfs_attr_mst_pread(na, vcn << vol->cluster_size_bits, 1, ictx->block_size, ia) != 1) { - ntfs_log_error("Failed to read index allocation."); + ntfs_log_error("Failed to read index allocation.\n"); goto err_out; } /* Catch multi sector transfer fixup errors. */ if (!ntfs_is_indx_record(ia->magic)) { ntfs_log_error("Index record with vcn 0x%llx is corrupt. " - "Corrupt inode 0x%llx. Run chkdsk.", + "Corrupt inode 0x%llx. Run chkdsk.\n", (long long)vcn, ni->mft_no); goto err_out; } if (sle64_to_cpu(ia->index_block_vcn) != vcn) { ntfs_log_error("Actual VCN (0x%llx) of index buffer is " "different from expected VCN (0x%llx). Inode " - "0x%llx is corrupt or driver bug.", + "0x%llx is corrupt or driver bug.\n", (unsigned long long) sle64_to_cpu(ia->index_block_vcn), (unsigned long long)vcn, ni->mft_no); @@ -351,7 +351,7 @@ descend_into_child_node: ntfs_log_error("Index buffer (VCN 0x%llx) of inode 0x%llx has " "a size (%u) differing from the index " "specified size (%u). Inode is corrupt or " - "driver bug.", (unsigned long long)vcn, + "driver bug.\n", (unsigned long long)vcn, ni->mft_no, (unsigned) le32_to_cpu(ia->index.allocated_size) + 0x18, (unsigned)ictx->block_size); @@ -360,7 +360,7 @@ descend_into_child_node: index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length); if (index_end > (u8*)ia + ictx->block_size) { ntfs_log_error("Size of index buffer (VCN 0x%llx) of inode " - "0x%llx exceeds maximum size.", + "0x%llx exceeds maximum size.\n", (unsigned long long)vcn, ni->mft_no); goto err_out; } @@ -378,7 +378,7 @@ descend_into_child_node: sizeof(INDEX_ENTRY_HEADER) > index_end || (u8*)ie + le16_to_cpu(ie->length) > index_end) { ntfs_log_error("Index entry out of bounds in inode " - "0x%llx.", ni->mft_no); + "0x%llx.\n", ni->mft_no); goto err_out; } /* @@ -406,7 +406,7 @@ ia_done: le16_to_cpu(ie->key_length)); if (rc == NTFS_COLLATION_ERROR) { ntfs_log_error("Collation error. Probably filename " - "contain invalid characters."); + "contain invalid characters.\n"); err = ERANGE; goto err_out; } @@ -436,14 +436,14 @@ ia_done: } if ((ia->index.flags & NODE_MASK) == LEAF_NODE) { ntfs_log_error("Index entry with child node found in a leaf " - "node in inode 0x%llx.", ni->mft_no); + "node in inode 0x%llx.\n", ni->mft_no); goto err_out; } /* Child node present, descend into it. */ vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8)); if (vcn >= 0) goto descend_into_child_node; - ntfs_log_error("Negative child node vcn in inode 0x%llx.", ni->mft_no); + ntfs_log_error("Negative child node vcn in inode 0x%llx.\n", ni->mft_no); err_out: if (na) ntfs_attr_close(na); @@ -455,7 +455,7 @@ err_out: errno = err; return -1; idx_err_out: - ntfs_log_error("Corrupt index. Aborting lookup."); + ntfs_log_error("Corrupt index. Aborting lookup.\n"); goto err_out; } @@ -479,7 +479,7 @@ int ntfs_index_add_filename(ntfs_inode *ni, FILE_NAME_ATTR *fn, MFT_REF mref) ntfs_log_trace("Entering.\n"); if (!ni || !fn) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); errno = EINVAL; return -1; } @@ -493,12 +493,12 @@ retry: /* Find place where insert new entry. */ if (!ntfs_index_lookup(fn, fn_size, ictx)) { err = EEXIST; - ntfs_log_error("Index already have such entry."); + ntfs_log_error("Index already have such entry.\n"); goto err_out; } if (errno != ENOENT) { err = errno; - ntfs_log_error("Failed to find place where to insert new entry."); + ntfs_log_error("Failed to find place where to insert new entry.\n"); goto err_out; } /* Some setup. */ @@ -520,14 +520,14 @@ retry: ictx->name_len); if (!na) { err = errno; - ntfs_log_error("Failed to open INDEX_ROOT."); + ntfs_log_error("Failed to open INDEX_ROOT.\n"); goto err_out; } if (ntfs_attr_truncate(na, allocated_size + offsetof( INDEX_ROOT, index))) { err = EOPNOTSUPP; ntfs_attr_close(na); - ntfs_log_error("Failed to truncate INDEX_ROOT."); + ntfs_log_error("Failed to truncate INDEX_ROOT.\n"); goto err_out; } ntfs_attr_close(na); @@ -590,7 +590,7 @@ int ntfs_index_rm(ntfs_index_context *ictx) ntfs_log_trace("Entering.\n"); if (!ictx || (!ictx->ia && !ictx->ir) || ictx->entry->flags & INDEX_ENTRY_END) { - ntfs_log_error("Invalid arguments."); + ntfs_log_error("Invalid arguments.\n"); err = EINVAL; goto err_out; } @@ -630,7 +630,7 @@ int ntfs_index_rm(ntfs_index_context *ictx) if (!na) { err = errno; ntfs_log_error("Failed to open INDEX_ROOT attribute. " - "Leaving inconsistent metadata."); + "Leaving inconsistent metadata.\n"); goto err_out; } if (ntfs_attr_truncate(na, new_index_length + offsetof( @@ -638,7 +638,7 @@ int ntfs_index_rm(ntfs_index_context *ictx) err = errno; ntfs_log_error("Failed to truncate INDEX_ROOT " "attribute. Leaving inconsistent " - "metadata."); + "metadata.\n"); goto err_out; } ntfs_attr_close(na); diff --git a/libntfs/logfile.c b/libntfs/logfile.c index 1c1e392c..a429ce68 100644 --- a/libntfs/logfile.c +++ b/libntfs/logfile.c @@ -70,7 +70,7 @@ static BOOL ntfs_check_restart_page_header(RESTART_PAGE_HEADER *rp, s64 pos) logfile_system_page_size & (logfile_system_page_size - 1) || logfile_log_page_size & (logfile_log_page_size - 1)) { - ntfs_log_error("$LogFile uses unsupported page size."); + ntfs_log_error("$LogFile uses unsupported page size.\n"); return FALSE; } /* @@ -79,7 +79,7 @@ static BOOL ntfs_check_restart_page_header(RESTART_PAGE_HEADER *rp, s64 pos) */ if (pos && pos != logfile_system_page_size) { ntfs_log_error("Found restart area in incorrect " - "position in $LogFile."); + "position in $LogFile.\n"); return FALSE; } /* We only know how to handle version 1.1. */ @@ -87,7 +87,7 @@ static BOOL ntfs_check_restart_page_header(RESTART_PAGE_HEADER *rp, s64 pos) sle16_to_cpu(rp->minor_ver) != 1) { ntfs_log_error("$LogFile version %i.%i is not " "supported. (This driver supports version " - "1.1 only.)", (int)sle16_to_cpu(rp->major_ver), + "1.1 only.)\n", (int)sle16_to_cpu(rp->major_ver), (int)sle16_to_cpu(rp->minor_ver)); return FALSE; } @@ -103,7 +103,7 @@ static BOOL ntfs_check_restart_page_header(RESTART_PAGE_HEADER *rp, s64 pos) usa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS); if (usa_count != le16_to_cpu(rp->usa_count)) { ntfs_log_error("$LogFile restart page specifies " - "inconsistent update sequence array count."); + "inconsistent update sequence array count.\n"); return FALSE; } /* Verify the position of the update sequence array. */ @@ -112,7 +112,7 @@ static BOOL ntfs_check_restart_page_header(RESTART_PAGE_HEADER *rp, s64 pos) if (usa_ofs < sizeof(RESTART_PAGE_HEADER) || usa_end > NTFS_BLOCK_SIZE - sizeof(u16)) { ntfs_log_error("$LogFile restart page specifies " - "inconsistent update sequence array offset."); + "inconsistent update sequence array offset.\n"); return FALSE; } skip_usa_checks: @@ -127,7 +127,7 @@ skip_usa_checks: ra_ofs < sizeof(RESTART_PAGE_HEADER)) || ra_ofs > logfile_system_page_size) { ntfs_log_error("$LogFile restart page specifies " - "inconsistent restart area offset."); + "inconsistent restart area offset.\n"); return FALSE; } /* @@ -136,7 +136,7 @@ skip_usa_checks: */ if (!ntfs_is_chkd_record(rp->magic) && sle64_to_cpu(rp->chkdsk_lsn)) { ntfs_log_error("$LogFile restart page is not modified " - "by chkdsk but a chkdsk LSN is specified."); + "by chkdsk but a chkdsk LSN is specified.\n"); return FALSE; } ntfs_log_trace("Done.\n"); @@ -174,7 +174,7 @@ static BOOL ntfs_check_restart_area(RESTART_PAGE_HEADER *rp) if (ra_ofs + offsetof(RESTART_AREA, file_size) > NTFS_BLOCK_SIZE - sizeof(u16)) { ntfs_log_error("$LogFile restart area specifies " - "inconsistent file offset."); + "inconsistent file offset.\n"); return FALSE; } /* @@ -189,7 +189,7 @@ static BOOL ntfs_check_restart_area(RESTART_PAGE_HEADER *rp) ra_ofs + ca_ofs > (u16)(NTFS_BLOCK_SIZE - sizeof(u16))) { ntfs_log_error("$LogFile restart area specifies " - "inconsistent client array offset."); + "inconsistent client array offset.\n"); return FALSE; } /* @@ -206,7 +206,7 @@ static BOOL ntfs_check_restart_area(RESTART_PAGE_HEADER *rp) ntfs_log_error("$LogFile restart area is out of bounds " "of the system page size specified by the " "restart page header and/or the specified " - "restart area length is inconsistent."); + "restart area length is inconsistent.\n"); return FALSE; } /* @@ -221,7 +221,7 @@ static BOOL ntfs_check_restart_area(RESTART_PAGE_HEADER *rp) le16_to_cpu(ra->client_in_use_list) >= le16_to_cpu(ra->log_clients))) { ntfs_log_error("$LogFile restart area specifies " - "overflowing client free and/or in use lists."); + "overflowing client free and/or in use lists.\n"); return FALSE; } /* @@ -236,21 +236,21 @@ static BOOL ntfs_check_restart_area(RESTART_PAGE_HEADER *rp) } if (le32_to_cpu(ra->seq_number_bits) != (u32)(67 - fs_bits)) { ntfs_log_error("$LogFile restart area specifies " - "inconsistent sequence number bits."); + "inconsistent sequence number bits.\n"); return FALSE; } /* The log record header length must be a multiple of 8. */ if (((le16_to_cpu(ra->log_record_header_length) + 7) & ~7) != le16_to_cpu(ra->log_record_header_length)) { ntfs_log_error("$LogFile restart area specifies " - "inconsistent log record header length."); + "inconsistent log record header length.\n"); return FALSE; } /* Ditto for the log page data offset. */ if (((le16_to_cpu(ra->log_page_data_offset) + 7) & ~7) != le16_to_cpu(ra->log_page_data_offset)) { ntfs_log_error("$LogFile restart area specifies " - "inconsistent log page data offset."); + "inconsistent log page data offset.\n"); return FALSE; } ntfs_log_trace("Done.\n"); @@ -316,7 +316,7 @@ check_list: ntfs_log_trace("Done.\n"); return TRUE; err_out: - ntfs_log_error("$LogFile log client array is corrupt."); + ntfs_log_error("$LogFile log client array is corrupt.\n"); return FALSE; } @@ -374,7 +374,7 @@ static int ntfs_check_and_load_restart_page(ntfs_attr *log_na, trp = malloc(le32_to_cpu(rp->system_page_size)); if (!trp) { ntfs_log_error("Failed to allocate memory for $LogFile " - "restart page buffer."); + "restart page buffer.\n"); return ENOMEM; } /* @@ -389,7 +389,7 @@ static int ntfs_check_and_load_restart_page(ntfs_attr *log_na, le32_to_cpu(rp->system_page_size)) { err = errno; ntfs_log_error("Failed to read whole restart page into the " - "buffer."); + "buffer.\n"); if (err != ENOMEM) err = EIO; goto err_out; @@ -410,7 +410,7 @@ static int ntfs_check_and_load_restart_page(ntfs_attr *log_na, le16_to_cpu(ra->restart_area_length) > NTFS_BLOCK_SIZE - (int)sizeof(u16)) { ntfs_log_error("Multi sector transfer error " - "detected in $LogFile restart page."); + "detected in $LogFile restart page.\n"); err = EINVAL; goto err_out; } @@ -496,13 +496,13 @@ BOOL ntfs_check_logfile(ntfs_attr *log_na, RESTART_PAGE_HEADER **rp) */ if (size < log_page_size * 2 || (size - log_page_size * 2) >> log_page_bits < MinLogRecordPages) { - ntfs_log_error("$LogFile is too small."); + ntfs_log_error("$LogFile is too small.\n"); return FALSE; } /* Allocate memory for restart page. */ kaddr = malloc(NTFS_BLOCK_SIZE); if (!kaddr) { - ntfs_log_error("Not enough memory."); + ntfs_log_error("Not enough memory.\n"); return FALSE; } /* @@ -520,7 +520,7 @@ BOOL ntfs_check_logfile(ntfs_attr *log_na, RESTART_PAGE_HEADER **rp) if (ntfs_attr_pread(log_na, pos, NTFS_BLOCK_SIZE, kaddr) != NTFS_BLOCK_SIZE) { ntfs_log_error("Failed to read first NTFS_BLOCK_SIZE " - "bytes of potential restart page."); + "bytes of potential restart page.\n"); goto err_out; } @@ -593,9 +593,9 @@ is_empty: } if (!rstr1_ph) { if (rstr2_ph) - ntfs_log_error("BUG: rstr2_ph isn't NULL!"); + ntfs_log_error("BUG: rstr2_ph isn't NULL!\n"); ntfs_log_error("Did not find any restart pages in " - "$LogFile and it was not empty."); + "$LogFile and it was not empty.\n"); return FALSE; } /* If both restart pages were found, use the more recent one. */ @@ -662,7 +662,7 @@ BOOL ntfs_is_logfile_clean(ntfs_attr *log_na, RESTART_PAGE_HEADER *rp) return TRUE; } if (!rp) { - ntfs_log_error("Restart page header is NULL."); + ntfs_log_error("Restart page header is NULL.\n"); return FALSE; } if (!ntfs_is_rstr_record(rp->magic) && @@ -670,7 +670,7 @@ BOOL ntfs_is_logfile_clean(ntfs_attr *log_na, RESTART_PAGE_HEADER *rp) 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."); + "this function.\n"); return FALSE; } diff --git a/libntfs/mft.c b/libntfs/mft.c index 32974328..68c1fca6 100644 --- a/libntfs/mft.c +++ b/libntfs/mft.c @@ -481,7 +481,7 @@ static int ntfs_mft_bitmap_find_free_rec(ntfs_volume *vol, ntfs_inode *base_ni) ll = ntfs_attr_pread(mftbmp_na, ofs, size, buf); if (ll < 0) { ntfs_log_error("Failed to read mft bitmap " - "attribute, aborting."); + "attribute, aborting.\n"); free(buf); return -1; } @@ -582,7 +582,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) vol->cluster_size_bits); if (!rl || !rl->length || rl->lcn < 0) { ntfs_log_error("Failed to determine last allocated " - "cluster of mft bitmap attribute."); + "cluster of mft bitmap attribute.\n"); if (rl) errno = EIO; return -1; @@ -595,7 +595,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) */ ret = (int)ntfs_attr_pread(lcnbmp_na, lcn >> 3, 1, &b); if (ret < 0) { - ntfs_log_error("Failed to read from lcn bitmap."); + ntfs_log_error("Failed to read from lcn bitmap.\n"); return -1; } ntfs_log_debug("Read %i byte%s.\n", ret, ret == 1 ? "" : "s"); @@ -606,7 +606,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) ret = (int)ntfs_attr_pwrite(lcnbmp_na, lcn >> 3, 1, &b); if (ret < 1) { ntfs_log_error("Failed to write to lcn " - "bitmap."); + "bitmap.\n"); if (!ret) errno = EIO; return -1; @@ -621,17 +621,17 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) rl2 = ntfs_cluster_alloc(vol, rl[1].vcn, 1, lcn, DATA_ZONE); if (!rl2) { ntfs_log_error("Failed to allocate a cluster for " - "the mft bitmap."); + "the mft bitmap.\n"); return -1; } rl = ntfs_runlists_merge(mftbmp_na->rl, rl2); if (!rl) { ret = errno; ntfs_log_error("Failed to merge runlists for mft " - "bitmap."); + "bitmap.\n"); if (ntfs_cluster_free_from_rl(vol, rl2)) ntfs_log_error("Failed to deallocate " - "cluster.%s", es); + "cluster.%s\n", es); free(rl2); errno = ret; return -1; @@ -649,13 +649,13 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) */ ctx = ntfs_attr_get_search_ctx(mftbmp_na->ni, NULL); if (!ctx) { - ntfs_log_error("Failed to get search context."); + ntfs_log_error("Failed to get search context.\n"); goto undo_alloc; } if (ntfs_attr_lookup(mftbmp_na->type, mftbmp_na->name, mftbmp_na->name_len, 0, rl[1].vcn, NULL, 0, ctx)) { ntfs_log_error("Failed to find last attribute extent of " - "mft bitmap attribute."); + "mft bitmap attribute.\n"); goto undo_alloc; } m = ctx->mrec; @@ -664,7 +664,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) rl2 = ntfs_attr_find_vcn(mftbmp_na, ll); if (!rl2 || !rl2->length) { ntfs_log_error("Failed to determine previous last " - "allocated cluster of mft bitmap attribute."); + "allocated cluster of mft bitmap attribute.\n"); if (rl2) errno = EIO; goto undo_alloc; @@ -673,7 +673,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll); if (mp_size <= 0) { ntfs_log_error("Get size for mapping pairs failed for " - "mft bitmap attribute extent."); + "mft bitmap attribute extent.\n"); goto undo_alloc; } /* Expand the attribute record if necessary. */ @@ -682,14 +682,14 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) le16_to_cpu(a->mapping_pairs_offset))) { if (errno != ENOSPC) { ntfs_log_error("Failed to resize attribute " - "record for mft bitmap attribute."); + "record for mft bitmap attribute.\n"); goto undo_alloc; } // TODO: Deal with this by moving this extent to a new mft // record or by starting a new extent in a new mft record. ntfs_log_error("Not enough space in this mft record to " "accommodate extended mft bitmap attribute " - "extent. Cannot handle this yet."); + "extent. Cannot handle this yet.\n"); errno = EOPNOTSUPP; goto undo_alloc; } @@ -699,7 +699,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) le16_to_cpu(a->mapping_pairs_offset), mp_size, rl2, ll, NULL)) { ntfs_log_error("Failed to build mapping pairs array for " - "mft bitmap attribute."); + "mft bitmap attribute.\n"); errno = EIO; goto undo_alloc; } @@ -719,7 +719,7 @@ static int ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) if (ntfs_attr_lookup(mftbmp_na->type, mftbmp_na->name, mftbmp_na->name_len, 0, 0, NULL, 0, ctx)) { ntfs_log_error("Failed to find first attribute " - "extent of mft bitmap attribute."); + "extent of mft bitmap attribute.\n"); goto restore_undo_alloc; } a = ctx->attr; @@ -736,7 +736,7 @@ restore_undo_alloc: if (ntfs_attr_lookup(mftbmp_na->type, mftbmp_na->name, mftbmp_na->name_len, 0, rl[1].vcn, NULL, 0, ctx)) { ntfs_log_error("Failed to find last attribute extent of " - "mft bitmap attribute.%s", es); + "mft bitmap attribute.%s\n", es); ntfs_attr_put_search_ctx(ctx); mftbmp_na->allocated_size += vol->cluster_size; /* @@ -764,18 +764,17 @@ undo_alloc: } /* Deallocate the cluster. */ if (ntfs_bitmap_clear_bit(lcnbmp_na, lcn)) - ntfs_log_error("Failed to free cluster.%s", es); + ntfs_log_error("Failed to free cluster.%s\n", es); if (status.mp_rebuilt) { if (ntfs_mapping_pairs_build(vol, (u8*)a + le16_to_cpu(a->mapping_pairs_offset), old_alen - le16_to_cpu(a->mapping_pairs_offset), rl2, ll, NULL)) ntfs_log_error("Failed to restore mapping " - "pairs array.%s", es); + "pairs array.%s\n", es); if (ntfs_attr_record_resize(m, a, old_alen)) ntfs_log_error("Failed to restore attribute " - "record.%s", - es); + "record.%s\n", es); ntfs_inode_mark_dirty(ctx->ntfs_ino); } if (ctx) @@ -807,13 +806,13 @@ static int ntfs_mft_bitmap_extend_initialized(ntfs_volume *vol) mftbmp_na = vol->mftbmp_na; ctx = ntfs_attr_get_search_ctx(mftbmp_na->ni, NULL); if (!ctx) { - ntfs_log_error("Failed to get search context."); + ntfs_log_error("Failed to get search context.\n"); return -1; } if (ntfs_attr_lookup(mftbmp_na->type, mftbmp_na->name, mftbmp_na->name_len, 0, 0, NULL, 0, ctx)) { ntfs_log_error("Failed to find first attribute extent of " - "mft bitmap attribute."); + "mft bitmap attribute.\n"); err = errno; goto put_err_out; } @@ -836,20 +835,20 @@ static int ntfs_mft_bitmap_extend_initialized(ntfs_volume *vol) ntfs_log_debug("Wrote eight initialized bytes to mft bitmap.\n"); return 0; } - ntfs_log_error("Failed to write to mft bitmap."); + ntfs_log_error("Failed to write to mft bitmap.\n"); err = errno; if (ll >= 0) err = EIO; /* Try to recover from the error. */ ctx = ntfs_attr_get_search_ctx(mftbmp_na->ni, NULL); if (!ctx) { - ntfs_log_error("Failed to get search context.%s", es); + ntfs_log_error("Failed to get search context.%s\n", es); goto err_out; } if (ntfs_attr_lookup(mftbmp_na->type, mftbmp_na->name, mftbmp_na->name_len, 0, 0, NULL, 0, ctx)) { ntfs_log_error("Failed to find first attribute extent of " - "mft bitmap attribute.%s", es); + "mft bitmap attribute.%s\n", es); put_err_out: ntfs_attr_put_search_ctx(ctx); goto err_out; @@ -911,7 +910,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) (mft_na->allocated_size - 1) >> vol->cluster_size_bits); if (!rl || !rl->length || rl->lcn < 0) { ntfs_log_error("Failed to determine last allocated " - "cluster of mft data attribute."); + "cluster of mft data attribute.\n"); if (rl) errno = EIO; return -1; @@ -936,7 +935,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) if (errno != ENOSPC || nr == min_nr) { ntfs_log_error("Failed to allocate the minimal " "number of clusters (%lli) for the " - "mft data attribute.", (long long)nr); + "mft data attribute.\n", (long long)nr); return -1; } /* @@ -952,10 +951,10 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) if (!rl) { err = errno; ntfs_log_error("Failed to merge runlists for mft data " - "attribute."); + "attribute.\n"); if (ntfs_cluster_free_from_rl(vol, rl2)) ntfs_log_error("Failed to deallocate clusters " - "from the mft data attribute.%s", es); + "from the mft data attribute.%s\n", es); free(rl2); errno = err; return -1; @@ -968,13 +967,13 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) /* Update the attribute record as well. */ ctx = ntfs_attr_get_search_ctx(mft_na->ni, NULL); if (!ctx) { - ntfs_log_error("Failed to get search context."); + ntfs_log_error("Failed to get search context.\n"); goto undo_alloc; } if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0, rl[1].vcn, NULL, 0, ctx)) { ntfs_log_error("Failed to find last attribute extent of " - "mft data attribute."); + "mft data attribute.\n"); goto undo_alloc; } m = ctx->mrec; @@ -983,7 +982,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) rl2 = ntfs_attr_find_vcn(mft_na, ll); if (!rl2 || !rl2->length) { ntfs_log_error("Failed to determine previous last " - "allocated cluster of mft data attribute."); + "allocated cluster of mft data attribute.\n"); if (rl2) errno = EIO; goto undo_alloc; @@ -992,7 +991,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll); if (mp_size <= 0) { ntfs_log_error("Get size for mapping pairs failed for " - "mft data attribute extent."); + "mft data attribute extent.\n"); goto undo_alloc; } /* Expand the attribute record if necessary. */ @@ -1001,7 +1000,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) mp_size + le16_to_cpu(a->mapping_pairs_offset))) { if (errno != ENOSPC) { ntfs_log_error("Failed to resize attribute " - "record for mft data attribute."); + "record for mft data attribute.\n"); goto undo_alloc; } // TODO: Deal with this by moving this extent to a new mft @@ -1011,7 +1010,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) // question. ntfs_log_error("Not enough space in this mft record to " "accommodate extended mft data attribute " - "extent. Cannot handle this yet."); + "extent. Cannot handle this yet.\n"); errno = EOPNOTSUPP; goto undo_alloc; } @@ -1023,7 +1022,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) (u8*)a + le16_to_cpu(a->mapping_pairs_offset), mp_size, rl2, ll, NULL)) { ntfs_log_error("Failed to build mapping pairs array of " - "mft data attribute."); + "mft data attribute.\n"); errno = EIO; goto undo_alloc; } @@ -1045,7 +1044,7 @@ static int ntfs_mft_data_extend_allocation(ntfs_volume *vol) if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0, 0, NULL, 0, ctx)) { ntfs_log_error("Failed to find first attribute " - "extent of mft data attribute."); + "extent of mft data attribute.\n"); goto restore_undo_alloc; } a = ctx->attr; @@ -1062,7 +1061,7 @@ restore_undo_alloc: if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0, rl[1].vcn, NULL, 0, ctx)) { ntfs_log_error("Failed to find last attribute extent of " - "mft data attribute.%s", es); + "mft data attribute.%s\n", es); ntfs_attr_put_search_ctx(ctx); mft_na->allocated_size += nr << vol->cluster_size_bits; /* @@ -1080,20 +1079,20 @@ undo_alloc: err = errno; if (ntfs_cluster_free(vol, mft_na, old_last_vcn, -1) < 0) ntfs_log_error("Failed to free clusters from mft data " - "attribute.%s", es); + "attribute.%s\n", es); if (ntfs_rl_truncate(&mft_na->rl, old_last_vcn)) ntfs_log_error("Failed to truncate mft data attribute " - "runlist.%s", es); + "runlist.%s\n", es); if (mp_rebuilt) { if (ntfs_mapping_pairs_build(vol, (u8*)a + le16_to_cpu(a->mapping_pairs_offset), old_alen - le16_to_cpu(a->mapping_pairs_offset), rl2, ll, NULL)) ntfs_log_error("Failed to restore mapping pairs " - "array.%s", es); + "array.%s\n", es); if (ntfs_attr_record_resize(m, a, old_alen)) ntfs_log_error("Failed to restore attribute " - "record.%s", es); + "record.%s\n", es); ntfs_inode_mark_dirty(ctx->ntfs_ino); } if (ctx) @@ -1198,7 +1197,7 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, ntfs_inode *base_ni) if (base_ni) ntfs_log_trace("Entering (allocating an extent mft record for " - "base mft record 0x%llx).", + "base mft record 0x%llx).\n", (long long)base_ni->mft_no); else ntfs_log_trace("Entering (allocating a base mft record).\n"); @@ -1275,7 +1274,7 @@ found_free_rec: /* @bit is the found free mft record, allocate it in the mft bitmap. */ ntfs_log_debug("At found_free_rec.\n"); if (ntfs_bitmap_set_bit(mftbmp_na, bit)) { - ntfs_log_error("Failed to allocate bit in mft bitmap."); + ntfs_log_error("Failed to allocate bit in mft bitmap.\n"); goto err_out; } ntfs_log_debug("Set bit 0x%llx in mft bitmap.\n", (long long)bit); @@ -1325,20 +1324,20 @@ found_free_rec: ntfs_log_debug("Initializing mft record 0x%llx.\n", (long long)ll2); err = ntfs_mft_record_format(vol, ll2); if (err) { - ntfs_log_error("Failed to format mft record."); + ntfs_log_error("Failed to format mft record.\n"); goto undo_data_init; } } /* Update the mft data attribute record to reflect the new sizes. */ ctx = ntfs_attr_get_search_ctx(mft_na->ni, NULL); if (!ctx) { - ntfs_log_error("Failed to get search context."); + ntfs_log_error("Failed to get search context.\n"); goto undo_data_init; } if (ntfs_attr_lookup(mft_na->type, mft_na->name, mft_na->name_len, 0, 0, NULL, 0, ctx)) { ntfs_log_error("Failed to find first attribute extent of " - "mft data attribute."); + "mft data attribute.\n"); ntfs_attr_put_search_ctx(ctx); goto undo_data_init; } @@ -1370,12 +1369,12 @@ mft_rec_already_initialized: m = (MFT_RECORD*)malloc(vol->mft_record_size); if (!m) { ntfs_log_error("Failed to allocate buffer for mft " - "record."); + "record.\n"); goto undo_mftbmp_alloc; } if (ntfs_mft_record_read(vol, bit, m)) { err = errno; - ntfs_log_error("Failed to read mft record."); + ntfs_log_error("Failed to read mft record.\n"); free(m); errno = err; goto undo_mftbmp_alloc; @@ -1385,7 +1384,7 @@ mft_rec_already_initialized: ntfs_log_error("Mft record 0x%llx was marked unused in " "mft bitmap but is marked used itself. " "Corrupt filesystem or library bug! " - "Run chkdsk immediately!", (long long)bit); + "Run chkdsk immediately!\n", (long long)bit); free(m); errno = EIO; goto undo_mftbmp_alloc; @@ -1394,7 +1393,7 @@ mft_rec_already_initialized: usn = *(u16*)((u8*)m + le16_to_cpu(m->usa_ofs)); if (ntfs_mft_record_layout(vol, bit, m)) { err = errno; - ntfs_log_error("Failed to re-format mft record."); + ntfs_log_error("Failed to re-format mft record.\n"); free(m); errno = err; goto undo_mftbmp_alloc; @@ -1410,7 +1409,7 @@ mft_rec_already_initialized: ni = ntfs_inode_allocate(vol); if (!ni) { err = errno; - ntfs_log_error("Failed to allocate buffer for inode."); + ntfs_log_error("Failed to allocate buffer for inode.\n"); free(m); errno = err; goto undo_mftbmp_alloc; @@ -1441,7 +1440,7 @@ mft_rec_already_initialized: err = errno; ntfs_log_error("Failed to allocate " "buffer for extent inodes " - "array."); + "array.\n"); free(m); free(ni); errno = err; @@ -1477,7 +1476,7 @@ undo_data_init: undo_mftbmp_alloc: err = errno; if (ntfs_bitmap_clear_bit(mftbmp_na, bit)) - ntfs_log_error("Failed to clear bit in mft bitmap.%s", es); + ntfs_log_error("Failed to clear bit in mft bitmap.%s\n", es); errno = err; err_out: if (!errno) diff --git a/libntfs/runlist.c b/libntfs/runlist.c index 22f46a1d..85d96881 100644 --- a/libntfs/runlist.c +++ b/libntfs/runlist.c @@ -912,7 +912,7 @@ mpa_err: rlpos++; } else if (deltaxcn > max_cluster) { ntfs_log_debug("Corrupt attribute. deltaxcn = " - "0x%llx, max_cluster = 0x%llx", + "0x%llx, max_cluster = 0x%llx\n", (long long)deltaxcn, (long long)max_cluster); goto mpa_err; diff --git a/libntfs/tree.c b/libntfs/tree.c index 9cb2d382..9dc5ef87 100644 --- a/libntfs/tree.c +++ b/libntfs/tree.c @@ -2000,7 +2000,7 @@ int ntfs_dt_alloc_add(struct ntfs_dt *parent, int index_num, INDEX_ENTRY *ie, st ntfs_log_debug("need %d, have %d\n", need, space); if (need > space) { - ntfs_log_debug("no room"); + ntfs_log_debug("no room\n"); return 0; } @@ -2101,7 +2101,7 @@ int ntfs_dt_root_add(struct ntfs_dt *parent, int index_num, INDEX_ENTRY *ie, str ntfs_log_debug("need %d, have %d\n", need, space); if (need > space) { - ntfs_log_debug("no room"); + ntfs_log_debug("no room\n"); return -1; } diff --git a/libntfs/unix_io.c b/libntfs/unix_io.c index 9ee5f3de..0b702ba1 100644 --- a/libntfs/unix_io.c +++ b/libntfs/unix_io.c @@ -104,7 +104,7 @@ static int ntfs_device_unix_io_open(struct ntfs_device *dev, int flags) flk.l_start = flk.l_len = 0LL; if (fcntl(DEV_FD(dev), F_SETLK, &flk)) { err = errno; - ntfs_log_debug("ntfs_device_unix_io_open: Could not lock %s for %s", + ntfs_log_debug("ntfs_device_unix_io_open: Could not lock %s for %s\n", dev->d_name, NDevReadOnly(dev) ? "reading" : "writing"); if (close(DEV_FD(dev))) ntfs_log_perror("ntfs_device_unix_io_open: Warning: Could not " diff --git a/libntfs/win32_io.c b/libntfs/win32_io.c index 44e44d21..a24abb3e 100644 --- a/libntfs/win32_io.c +++ b/libntfs/win32_io.c @@ -701,7 +701,7 @@ static BOOL ntfs_device_win32_find_partition(HANDLE handle, DWORD partition_id, err = GetLastError(); free(drive_layout); if (err != ERROR_INSUFFICIENT_BUFFER) { - ntfs_log_trace("GetDriveLayout failed."); + ntfs_log_trace("GetDriveLayout failed.\n"); errno = ntfs_w32error_to_errno(err); return FALSE; }