From: Yura Pakhuchiy <pakhuchiy@iptel.by>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: linux-fsdevel@vger.kernel.org
Subject: Print inode number if name can not be represented in the local charset
Date: Fri, 01 Jul 2005 05:03:56 +0300 [thread overview]
Message-ID: <1120183436.2758.2.camel@chaos.void> (raw)
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
Hi Anton,
This patch changes message type from ntfs_error to ntfs_debug in the
unistr.c when unicode filename contains characters that can not be
converted into the local charset, because it's not useful for user and
actually it's not a error. Instead of this print warning in dir.c, this
warning includes inode number for further investigation (e.g. with
ntfsinfo).
Signed-off-by: Yura Pakhuchiy <pakhuchiy@gmail.com>
--
Best regards,
Yura
[-- Attachment #2: ntfs-print-inode-during-name-conversion-error.diff --]
[-- Type: text/x-patch, Size: 1649 bytes --]
This patch changes message type from ntfs_error to ntfs_debug in the unistr.c
when unicode filename contains characters that can not be converted into the
local charset, because it's not useful for user and actually it's not a error.
Instead of this print warning in dir.c, this warning includes inode number for
further investigation (e.g. with ntfsinfo).
Signed-off-by: Yura Pakhuchiy <pakhuchiy@gmail.com>
diff -ruNp -X kernel.ignore ntfs-2.6-devel/fs/ntfs/dir.c ntfs-2.6-yura/fs/ntfs/dir.c
--- ntfs-2.6-devel/fs/ntfs/dir.c 2005-07-01 00:38:49.000000000 +0300
+++ ntfs-2.6-yura/fs/ntfs/dir.c 2005-07-01 04:37:20.000000000 +0300
@@ -1051,7 +1051,9 @@ static inline int ntfs_filldir(ntfs_volu
ie->key.file_name.file_name_length, &name,
NTFS_MAX_NAME_LEN * NLS_MAX_CHARSET_SIZE + 1);
if (name_len <= 0) {
- ntfs_debug("Skipping unrepresentable file.");
+ ntfs_warning(vol->sb, "Skipping unrepresentable file "
+ "(inode %lu).", MREF_LE(
+ ie->data.dir.indexed_file));
return 0;
}
if (ie->key.file_name.file_attributes &
diff -ruNp -X kernel.ignore ntfs-2.6-devel/fs/ntfs/unistr.c ntfs-2.6-yura/fs/ntfs/unistr.c
--- ntfs-2.6-devel/fs/ntfs/unistr.c 2005-07-01 00:38:49.000000000 +0300
+++ ntfs-2.6-yura/fs/ntfs/unistr.c 2005-07-01 04:27:21.000000000 +0300
@@ -371,7 +371,7 @@ retry: wc = nls->uni2char(le16_to_cpu(
ntfs_error(vol->sb, "Received NULL pointer.");
return -EINVAL;
conversion_err:
- ntfs_error(vol->sb, "Unicode name contains characters that cannot be "
+ ntfs_debug("Unicode name contains characters that cannot be "
"converted to character set %s.", nls->charset);
if (ns != *outs)
kfree(ns);
next reply other threads:[~2005-07-01 2:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-01 2:03 Yura Pakhuchiy [this message]
2005-07-21 13:21 ` Print inode number if name can not be represented in the local charset Anton Altaparmakov
2005-07-21 13:27 ` Yura Pakhuchiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1120183436.2758.2.camel@chaos.void \
--to=pakhuchiy@iptel.by \
--cc=aia21@cam.ac.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=pakhuchiy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).