patch-2.4.23 linux-2.4.23/fs/jfs/jfs_unicode.c
Next file: linux-2.4.23/fs/jfs/jfs_xtree.c
Previous file: linux-2.4.23/fs/jfs/jfs_txnmgr.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/fs/jfs/jfs_unicode.c
- Orig date:
2003-06-13 07:51:37.000000000 -0700
diff -urN linux-2.4.22/fs/jfs/jfs_unicode.c linux-2.4.23/fs/jfs/jfs_unicode.c
@@ -68,8 +68,7 @@
jfs_err("jfs_strtoUCS: char2uni returned %d.", charlen);
jfs_err("charset = %s, char = 0x%x",
codepage->charset, (unsigned char) *from);
- to[i] = 0x003f; /* a question mark */
- charlen = 1;
+ return charlen;
}
}
@@ -89,16 +88,21 @@
int length = dentry->d_name.len;
if (length > JFS_NAME_MAX)
- return ENAMETOOLONG;
+ return -ENAMETOOLONG;
uniName->name =
kmalloc((length + 1) * sizeof(wchar_t), GFP_NOFS);
if (uniName->name == NULL)
- return ENOSPC;
+ return -ENOSPC;
uniName->namlen = jfs_strtoUCS(uniName->name, dentry->d_name.name,
length, nls_tab);
+ if (uniName->namlen < 0) {
+ kfree(uniName->name);
+ return uniName->namlen;
+ }
+
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)