diff options
Diffstat (limited to 'fs/vfat/namei.c')
-rw-r--r-- | fs/vfat/namei.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c index ef46939c0c1a..a56cec3be5f0 100644 --- a/fs/vfat/namei.c +++ b/fs/vfat/namei.c | |||
@@ -185,24 +185,6 @@ static int vfat_valid_longname(const unsigned char *name, unsigned int len) | |||
185 | return -EINVAL; | 185 | return -EINVAL; |
186 | if (len >= 256) | 186 | if (len >= 256) |
187 | return -ENAMETOOLONG; | 187 | return -ENAMETOOLONG; |
188 | |||
189 | /* MS-DOS "device special files" */ | ||
190 | if (len == 3 || (len > 3 && name[3] == '.')) { /* basename == 3 */ | ||
191 | if (!strnicmp(name, "aux", 3) || | ||
192 | !strnicmp(name, "con", 3) || | ||
193 | !strnicmp(name, "nul", 3) || | ||
194 | !strnicmp(name, "prn", 3)) | ||
195 | return -EINVAL; | ||
196 | } | ||
197 | if (len == 4 || (len > 4 && name[4] == '.')) { /* basename == 4 */ | ||
198 | /* "com1", "com2", ... */ | ||
199 | if ('1' <= name[3] && name[3] <= '9') { | ||
200 | if (!strnicmp(name, "com", 3) || | ||
201 | !strnicmp(name, "lpt", 3)) | ||
202 | return -EINVAL; | ||
203 | } | ||
204 | } | ||
205 | |||
206 | return 0; | 188 | return 0; |
207 | } | 189 | } |
208 | 190 | ||