summaryrefslogtreecommitdiff
path: root/fs/msdos
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2006-03-31 02:30:53 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-31 12:18:55 -0800
commit094e320d761dae5816d8faa695b0509eea79c108 (patch)
tree5b1c8b89880f44b08ce16456f9b8961e3933e71b /fs/msdos
parente4e364e865b382f9d99c7fc230ec2ce7df21257a (diff)
downloadlinux-3.10-094e320d761dae5816d8faa695b0509eea79c108.tar.gz
linux-3.10-094e320d761dae5816d8faa695b0509eea79c108.tar.bz2
linux-3.10-094e320d761dae5816d8faa695b0509eea79c108.zip
[PATCH] fat: kill reserved names
Since these names on old MSDOS is used as device, so, current fat driver doesn't allow a user to create those names. But many OSes and even Windows can create those names actually, now. This patch removes the reserved name check. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/msdos')
-rw-r--r--fs/msdos/namei.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/msdos/namei.c b/fs/msdos/namei.c
index 626a367bcd8..5b76ccd19e3 100644
--- a/fs/msdos/namei.c
+++ b/fs/msdos/namei.c
@@ -12,14 +12,6 @@
#include <linux/msdos_fs.h>
#include <linux/smp_lock.h>
-/* MS-DOS "device special files" */
-static const unsigned char *reserved_names[] = {
- "CON ", "PRN ", "NUL ", "AUX ",
- "LPT1 ", "LPT2 ", "LPT3 ", "LPT4 ",
- "COM1 ", "COM2 ", "COM3 ", "COM4 ",
- NULL
-};
-
/* Characters that are undesirable in an MS-DOS file name */
static unsigned char bad_chars[] = "*?<>|\"";
static unsigned char bad_if_strict_pc[] = "+=,; ";
@@ -40,7 +32,6 @@ static int msdos_format_name(const unsigned char *name, int len,
*/
{
unsigned char *walk;
- const unsigned char **reserved;
unsigned char c;
int space;
@@ -127,11 +118,7 @@ static int msdos_format_name(const unsigned char *name, int len,
}
while (walk - res < MSDOS_NAME)
*walk++ = ' ';
- if (!opts->atari)
- /* GEMDOS is less stupid and has no reserved names */
- for (reserved = reserved_names; *reserved; reserved++)
- if (!strncmp(res, *reserved, 8))
- return -EINVAL;
+
return 0;
}