diff options
Diffstat (limited to 'fs/msdos/namei.c')
-rw-r--r-- | fs/msdos/namei.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/msdos/namei.c b/fs/msdos/namei.c index 626a367bcd81..5b76ccd19e3f 100644 --- a/fs/msdos/namei.c +++ b/fs/msdos/namei.c | |||
@@ -12,14 +12,6 @@ | |||
12 | #include <linux/msdos_fs.h> | 12 | #include <linux/msdos_fs.h> |
13 | #include <linux/smp_lock.h> | 13 | #include <linux/smp_lock.h> |
14 | 14 | ||
15 | /* MS-DOS "device special files" */ | ||
16 | static const unsigned char *reserved_names[] = { | ||
17 | "CON ", "PRN ", "NUL ", "AUX ", | ||
18 | "LPT1 ", "LPT2 ", "LPT3 ", "LPT4 ", | ||
19 | "COM1 ", "COM2 ", "COM3 ", "COM4 ", | ||
20 | NULL | ||
21 | }; | ||
22 | |||
23 | /* Characters that are undesirable in an MS-DOS file name */ | 15 | /* Characters that are undesirable in an MS-DOS file name */ |
24 | static unsigned char bad_chars[] = "*?<>|\""; | 16 | static unsigned char bad_chars[] = "*?<>|\""; |
25 | static unsigned char bad_if_strict_pc[] = "+=,; "; | 17 | static unsigned char bad_if_strict_pc[] = "+=,; "; |
@@ -40,7 +32,6 @@ static int msdos_format_name(const unsigned char *name, int len, | |||
40 | */ | 32 | */ |
41 | { | 33 | { |
42 | unsigned char *walk; | 34 | unsigned char *walk; |
43 | const unsigned char **reserved; | ||
44 | unsigned char c; | 35 | unsigned char c; |
45 | int space; | 36 | int space; |
46 | 37 | ||
@@ -127,11 +118,7 @@ static int msdos_format_name(const unsigned char *name, int len, | |||
127 | } | 118 | } |
128 | while (walk - res < MSDOS_NAME) | 119 | while (walk - res < MSDOS_NAME) |
129 | *walk++ = ' '; | 120 | *walk++ = ' '; |
130 | if (!opts->atari) | 121 | |
131 | /* GEMDOS is less stupid and has no reserved names */ | ||
132 | for (reserved = reserved_names; *reserved; reserved++) | ||
133 | if (!strncmp(res, *reserved, 8)) | ||
134 | return -EINVAL; | ||
135 | return 0; | 122 | return 0; |
136 | } | 123 | } |
137 | 124 | ||