From 08dccd58fb8b1f978516fec4f1b29ce964fd26f1 Mon Sep 17 00:00:00 2001 From: szaka Date: Tue, 21 Jul 2009 12:55:08 +0000 Subject: [PATCH] fix format breaking new lines in error messages --- libntfs-3g/index.c | 2 +- libntfs-3g/inode.c | 11 +++++++---- libntfs-3g/security.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c index acd6394c..4f2dbcf3 100644 --- a/libntfs-3g/index.c +++ b/libntfs-3g/index.c @@ -556,7 +556,7 @@ static int ntfs_ie_lookup(const void *key, const int key_len, *vcn = ntfs_ie_get_vcn(ie); if (*vcn < 0) { errno = EINVAL; - ntfs_log_perror("Negative vcn in inode %llu\n", + ntfs_log_perror("Negative vcn in inode %llu", (unsigned long long)icx->ni->mft_no); return STATUS_ERROR; } diff --git a/libntfs-3g/inode.c b/libntfs-3g/inode.c index e1c24ce8..c83fe6c7 100644 --- a/libntfs-3g/inode.c +++ b/libntfs-3g/inode.c @@ -177,7 +177,8 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref) /* Receive some basic information about inode. */ if (ntfs_attr_lookup(AT_STANDARD_INFORMATION, AT_UNNAMED, 0, CASE_SENSITIVE, 0, NULL, 0, ctx)) { - ntfs_log_perror("No STANDARD_INFORMATION in base record\n"); + ntfs_log_perror("No STANDARD_INFORMATION in base record %lld", + (long long)MREF(mref)); goto put_err_out; } std_info = (STANDARD_INFORMATION *)((u8 *)ctx->attr + @@ -201,7 +202,8 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref) goto put_err_out; if (l > 0x40000) { errno = EIO; - ntfs_log_perror("Too large attrlist (%lld)\n", (long long)l); + ntfs_log_perror("Too large attrlist attribute (%lld), inode " + "%lld", (long long)l, (long long)MREF(mref)); goto put_err_out; } ni->attr_list_size = l; @@ -213,8 +215,9 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref) goto put_err_out; if (l != ni->attr_list_size) { errno = EIO; - ntfs_log_perror("Unexpected attrlist size (%lld <> %u)\n", - (long long)l, ni->attr_list_size); + ntfs_log_perror("Unexpected attrlist size (%lld <> %u), inode " + "%lld", (long long)l, ni->attr_list_size, + (long long)MREF(mref)); goto put_err_out; } get_size: diff --git a/libntfs-3g/security.c b/libntfs-3g/security.c index 4b54b699..c9beb99a 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -333,7 +333,7 @@ int ntfs_sd_add_everyone(ntfs_inode *ni) ret = ntfs_attr_add(ni, AT_SECURITY_DESCRIPTOR, AT_UNNAMED, 0, (u8 *)sd, sd_len); if (ret) - ntfs_log_perror("Failed to add SECURITY_DESCRIPTOR\n"); + ntfs_log_perror("Failed to add SECURITY_DESCRIPTOR"); free(sd); return ret;