return ret;
}
-static inline unsigned char
-vfat_tolower(struct nls_table *t, unsigned char c)
-{
- unsigned char nc = t->charset2lower[c];
-
- return nc ? nc : c;
-}
-
-static inline unsigned char
-vfat_toupper(struct nls_table *t, unsigned char c)
-{
- unsigned char nc = t->charset2upper[c];
-
- return nc ? nc : c;
-}
-
-static inline int
-vfat_strnicmp(struct nls_table *t, const unsigned char *s1,
- const unsigned char *s2, int len)
-{
- while(len--)
- if (vfat_tolower(t, *s1++) != vfat_tolower(t, *s2++))
- return 1;
-
- return 0;
-}
-
/* returns the length of a struct qstr, ignoring trailing dots */
static unsigned int vfat_striptail_len(struct qstr *qstr)
{
hash = init_name_hash();
while (len--)
- hash = partial_name_hash(vfat_tolower(t, *name++), hash);
+ hash = partial_name_hash(nls_tolower(t, *name++), hash);
qstr->hash = end_name_hash(hash);
return 0;
alen = vfat_striptail_len(a);
blen = vfat_striptail_len(b);
if (alen == blen) {
- if (vfat_strnicmp(t, a->name, b->name, alen) == 0)
+ if (nls_strnicmp(t, a->name, b->name, alen) == 0)
return 0;
}
return 1;
info->upper = 0;
}
- buf[0] = vfat_toupper(nls, buf[0]);
+ buf[0] = nls_toupper(nls, buf[0]);
if (isalpha(buf[0])) {
if (buf[0] == prev)
info->lower = 0;
de->attr = is_dir ? ATTR_DIR : ATTR_ARCH;
de->lcase = lcase;
de->adate = de->cdate = de->date = 0;
- de->ctime_ms = de->ctime = de->time = 0;
+ de->ctime = de->time = 0;
+ de->ctime_ms = 0;
de->start = 0;
de->starthi = 0;
de->size = 0;
if (is_dir) {
int start = MSDOS_I(new_dir)->i_logstart;
- dotdot_de->start = CT_LE_W(start);
- dotdot_de->starthi = CT_LE_W(start>>16);
+ dotdot_de->start = cpu_to_le16(start);
+ dotdot_de->starthi = cpu_to_le16(start>>16);
mark_buffer_dirty(dotdot_bh);
old_dir->i_nlink--;
if (new_inode) {