Print inode number if name can not be represented in the local charset
Subsystems (2)
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).
Signature · 2 lines
Best regards,
YuraThis 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).
fs/ntfs/dir.c +3 -1
@@ -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 &
fs/ntfs/unistr.c +1 -1
@@ -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);
Hi Yura,
Quoted 6 lines · Yura Pakhuchiy
This patch changes message type from
ntfs_errortontfs_debugin theunistr.cwhen 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 indir.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
Signature · 4 lines
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/
Quoted 10 lines · Anton Altaparmakov
Quoted 6 lines · Yura Pakhuchiy
This patch changes message type from
ntfs_errortontfs_debugin theunistr.cwhen 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 indir.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.
Signature · 2 lines
Best regards,
Yura