From aed9b2c133fda3b9cd3e687859a1d77cfe873563 Mon Sep 17 00:00:00 2001 From: OGAWA Hirofumi Date: Fri, 31 Mar 2006 02:30:53 -0800 Subject: [PATCH] --- yaml --- r: 24895 b: refs/heads/master c: 094e320d761dae5816d8faa695b0509eea79c108 h: refs/heads/master i: 24893: 890a2fb139d9d98efde454f69fe34b9b25255f60 24891: 323c10cccd2b86b147d0395aa2396531df4fc4a0 24887: 8195b207ac0bd5eb2368989b821333f91c1b0897 24879: 666027a283a6417cb865292091b44a05c69e8bac 24863: bbfb9e3daa2bce6741a1cbc72ca9807fc0ffad4d 24831: f349d84973f205a3dc6ba070b5932a9fa98733ef v: v3 --- [refs] | 2 +- trunk/fs/msdos/namei.c | 15 +-------------- trunk/fs/vfat/namei.c | 18 ------------------ 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/[refs] b/[refs] index f0bfbd78cee9..ebaadb503e67 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4e364e865b382f9d99c7fc230ec2ce7df21257a +refs/heads/master: 094e320d761dae5816d8faa695b0509eea79c108 diff --git a/trunk/fs/msdos/namei.c b/trunk/fs/msdos/namei.c index 626a367bcd81..5b76ccd19e3f 100644 --- a/trunk/fs/msdos/namei.c +++ b/trunk/fs/msdos/namei.c @@ -12,14 +12,6 @@ #include #include -/* 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; } diff --git a/trunk/fs/vfat/namei.c b/trunk/fs/vfat/namei.c index ef46939c0c1a..a56cec3be5f0 100644 --- a/trunk/fs/vfat/namei.c +++ b/trunk/fs/vfat/namei.c @@ -185,24 +185,6 @@ static int vfat_valid_longname(const unsigned char *name, unsigned int len) return -EINVAL; if (len >= 256) return -ENAMETOOLONG; - - /* MS-DOS "device special files" */ - if (len == 3 || (len > 3 && name[3] == '.')) { /* basename == 3 */ - if (!strnicmp(name, "aux", 3) || - !strnicmp(name, "con", 3) || - !strnicmp(name, "nul", 3) || - !strnicmp(name, "prn", 3)) - return -EINVAL; - } - if (len == 4 || (len > 4 && name[4] == '.')) { /* basename == 4 */ - /* "com1", "com2", ... */ - if ('1' <= name[3] && name[3] <= '9') { - if (!strnicmp(name, "com", 3) || - !strnicmp(name, "lpt", 3)) - return -EINVAL; - } - } - return 0; }