From af4f6a406a5f117b26e118b3626b278e62523e59 Mon Sep 17 00:00:00 2001 From: jpandre Date: Thu, 5 Nov 2009 11:43:36 +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 768f0593..f78336aa 100644 --- a/libntfs-3g/index.c +++ b/libntfs-3g/index.c @@ -558,7 +558,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 fc24bb05..609584fd 100644 --- a/libntfs-3g/inode.c +++ b/libntfs-3g/inode.c @@ -182,7 +182,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 + @@ -223,7 +224,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; @@ -235,8 +237,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 d6387614..aed9ff1b 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -3254,7 +3254,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 initial SECURITY_DESCRIPTOR\n"); + ntfs_log_perror("Failed to add initial SECURITY_DESCRIPTOR"); free(sd); return ret;