diff options
Diffstat (limited to 'fs/umsdos/mangle.c')
-rw-r--r-- | fs/umsdos/mangle.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/umsdos/mangle.c b/fs/umsdos/mangle.c index 1f59447e9..a7649a39a 100644 --- a/fs/umsdos/mangle.c +++ b/fs/umsdos/mangle.c @@ -6,6 +6,10 @@ * Control the mangling of file name to fit msdos name space. * Many optimisation by GLU == dglaude@is1.vub.ac.be (GLAUDE DAVID) */ +#ifdef MODULE +#include <linux/module.h> +#endif + #include <linux/errno.h> #include <linux/ctype.h> #include <linux/string.h> @@ -222,13 +226,15 @@ int umsdos_parse ( with a special character as the first character of the extension will be mangled. This solve the following problem: - + + # touch FILE # FILE is invalid for DOS, so mangling is applied # file.{_1 is created in the DOS directory touch file.{_1 # To UMSDOS file point to a single DOS entry. # So file.{_1 has to be mangled. + # */ static char special[]={ SPECIAL_MANGLING,'\0' @@ -270,7 +276,9 @@ int umsdos_parse ( Control character are converted to #. Space are converted to #. The following character are also converted to #. + # " * + , / : ; < = > ? [ \ ] | ~ + # Sometime, the problem is not in MsDOS itself but in command.com. @@ -294,7 +302,7 @@ int umsdos_parse ( */ }else{ /* Conforming MSDOS file name */ - strcpy (info->fake.fname,fname); /* GLU C'est sur on a un 0 a la fin */ + strncpy (info->fake.fname,fname,len); info->msdos_reject = 0; base_len = firstpt != NULL ? (int)(firstpt - fname) : len; } @@ -316,10 +324,12 @@ int umsdos_parse ( Here is the list of DOS pseudo devices: + # "prn","con","aux","nul", "lpt1","lpt2","lpt3","lpt4", "com1","com2","com3","com4", "clock$" + # and some standard ones for common DOS programs |