Re: [PATCH 1/4] Move check for invalid chars tovfat_valid_longname()

From: OGAWA Hirofumi
Date: Tue Nov 09 2004 - 10:06:25 EST


lsr@xxxxxxxxxxxxxxxxxxxxxxx writes:

> + /* check for invalid characters */
> + for (p = name; p < name + len; p++) {
> + if (*p < 0x0020 || strchr("*?<>|\":\\", *p) != NULL)
> + return 0;
> + }
> +
> return 1;
> }
>
> @@ -636,10 +627,6 @@ static int vfat_build_slots(struct inode
> if (res < 0)
> goto out_free;
>
> - res = vfat_is_used_badchars(uname, ulen);
> - if (res < 0)
> - goto out_free;
> -
> res = vfat_create_shortname(dir, sbi->nls_disk, uname, ulen,
> msdos_name, &lcase);
> if (res < 0)

Some encodings is using the area of ascii code as second byte.
So, it can't.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/