* Print inode number if name can not be represented in the local charset
@ 2005-07-01 2:03 Yura Pakhuchiy
2005-07-21 13:21 ` Anton Altaparmakov
0 siblings, 1 reply; 3+ messages in thread
From: Yura Pakhuchiy @ 2005-07-01 2:03 UTC (permalink / raw)
To: Anton Altaparmakov; +Cc: linux-fsdevel
[-- 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);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Print inode number if name can not be represented in the local charset
2005-07-01 2:03 Print inode number if name can not be represented in the local charset Yura Pakhuchiy
@ 2005-07-21 13:21 ` Anton Altaparmakov
2005-07-21 13:27 ` Yura Pakhuchiy
0 siblings, 1 reply; 3+ messages in thread
From: Anton Altaparmakov @ 2005-07-21 13:21 UTC (permalink / raw)
To: Yura Pakhuchiy; +Cc: linux-fsdevel
Hi Yura,
On Fri, 2005-07-01 at 05:03 +0300, Yura Pakhuchiy wrote:
> 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).
I applied something simillar to your patch to my private tree so it will
be in the next ntfs release. Thanks for the patch.
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Print inode number if name can not be represented in the local charset
2005-07-21 13:21 ` Anton Altaparmakov
@ 2005-07-21 13:27 ` Yura Pakhuchiy
0 siblings, 0 replies; 3+ messages in thread
From: Yura Pakhuchiy @ 2005-07-21 13:27 UTC (permalink / raw)
To: Anton Altaparmakov; +Cc: linux-fsdevel
On Thu, 2005-07-21 at 14:21 +0100, Anton Altaparmakov wrote:
> On Fri, 2005-07-01 at 05:03 +0300, Yura Pakhuchiy wrote:
> > 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).
>
> I applied something simillar to your patch to my private tree so it will
> be in the next ntfs release. Thanks for the patch.
Great! Thanks.
--
Best regards,
Yura
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-21 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-01 2:03 Print inode number if name can not be represented in the local charset Yura Pakhuchiy
2005-07-21 13:21 ` Anton Altaparmakov
2005-07-21 13:27 ` Yura Pakhuchiy
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).