Lines Matching refs:name
3 * linux/fs/hpfs/name.c
42 int hpfs_chk_name(const unsigned char *name, unsigned *len)
46 hpfs_adjust_length(name, len);
48 for (i = 0; i < *len; i++) if (not_allowed_char(name[i])) return -EINVAL;
49 if (*len == 1) if (name[0] == '.') return -EINVAL;
50 if (*len == 2) if (name[0] == '.' && name[1] == '.') return -EINVAL;
60 pr_err("Long name flag mismatch - name ");
68 pr_err("can't allocate memory for name conversion buffer\n");
93 int hpfs_is_name_long(const unsigned char *name, unsigned len)
96 for (i = 0; i < len && name[i] != '.'; i++)
97 if (no_dos_char(name[i])) return 1;
101 if (name[j] == '.' || no_dos_char(name[i])) return 1;
105 /* OS/2 clears dots and spaces at the end of file name, so we have to */
107 void hpfs_adjust_length(const unsigned char *name, unsigned *len)
110 if (*len == 1 && name[0] == '.') return;
111 if (*len == 2 && name[0] == '.' && name[1] == '.') return;
112 while (*len && (name[*len - 1] == '.' || name[*len - 1] == ' '))