]> err.no Git - linux-2.6/blobdiff - fs/ntfs/unistr.c
Pull ar-k0-usage into release branch
[linux-2.6] / fs / ntfs / unistr.c
index 560b0ea255b0b6be01b5f3abcb4ad9d572c457da..0ea887fc859cc358dca5276f65ea1bcc9bb04e2f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * unistr.c - NTFS Unicode string handling. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001-2004 Anton Altaparmakov
+ * Copyright (c) 2001-2005 Anton Altaparmakov
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -264,7 +264,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
 
        /* We don't trust outside sources. */
        if (ins) {
-               ucs = (ntfschar*)kmem_cache_alloc(ntfs_name_cache, SLAB_NOFS);
+               ucs = kmem_cache_alloc(ntfs_name_cache, SLAB_NOFS);
                if (ucs) {
                        for (i = o = 0; i < ins_len; i += wc_len) {
                                wc_len = nls->char2uni(ins + i, ins_len - i,
@@ -372,7 +372,8 @@ retry:                      wc = nls->uni2char(le16_to_cpu(ins[i]), ns + o,
        return -EINVAL;
 conversion_err:
        ntfs_error(vol->sb, "Unicode name contains characters that cannot be "
-                       "converted to character set %s.", nls->charset);
+                       "converted to character set %s.  You might want to "
+                       "try to use the mount option nls=utf8.", nls->charset);
        if (ns != *outs)
                kfree(ns);
        if (wc != -ENAMETOOLONG)