diff options
author | Bob Copeland <me@bobcopeland.com> | 2008-04-17 11:47:48 +0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2008-04-17 16:29:56 +0400 |
commit | f845fced913b1437659bb5baf187698547697afe (patch) | |
tree | e23244018eeb8a57229ef0f12f69521a50881e14 /fs/udf/unicode.c | |
parent | 706047a79725b585cf272fdefc234b31b6545c72 (diff) | |
download | linux-f845fced913b1437659bb5baf187698547697afe.tar.xz |
udf: use crc_itu_t from lib instead of udf_crc
As pointed out by Sergey Vlasov, UDF implements its own version of
the CRC ITU-T V.41. Convert it to use the one in the library.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/unicode.c')
-rw-r--r-- | fs/udf/unicode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index f5872ae325a3..9fdf8c93c58e 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c @@ -23,6 +23,7 @@ #include <linux/kernel.h> #include <linux/string.h> /* for memset */ #include <linux/nls.h> +#include <linux/crc-itu-t.h> #include "udf_sb.h" @@ -454,7 +455,7 @@ static int udf_translate_to_linux(uint8_t *newName, uint8_t *udfName, } else if (newIndex > 250) newIndex = 250; newName[newIndex++] = CRC_MARK; - valueCRC = udf_crc(fidName, fidNameLen, 0); + valueCRC = crc_itu_t(0, fidName, fidNameLen); newName[newIndex++] = hexChar[(valueCRC & 0xf000) >> 12]; newName[newIndex++] = hexChar[(valueCRC & 0x0f00) >> 8]; newName[newIndex++] = hexChar[(valueCRC & 0x00f0) >> 4]; |