diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2011-05-20 09:10:04 -0700 |
---|---|---|
committer | Randy Dunlap <randy.dunlap@oracle.com> | 2011-05-20 09:10:04 -0700 |
commit | 2f3e4af471e38e0658e701973238ae4b5e50fcd6 (patch) | |
tree | fbfc99c0d975e38ff80f4ff3239a9fc0567b8a4d /fs/hpfs/name.c | |
parent | 61516587513c84ac26e68e3ab008dc6e965d0378 (diff) | |
parent | d410fa4ef99112386de5f218dd7df7b4fca910b4 (diff) | |
download | op-kernel-dev-2f3e4af471e38e0658e701973238ae4b5e50fcd6.zip op-kernel-dev-2f3e4af471e38e0658e701973238ae4b5e50fcd6.tar.gz |
Merge branch 'docs-security' into docs-move
Diffstat (limited to 'fs/hpfs/name.c')
-rw-r--r-- | fs/hpfs/name.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/fs/hpfs/name.c b/fs/hpfs/name.c index f24736d..9acdf33 100644 --- a/fs/hpfs/name.c +++ b/fs/hpfs/name.c @@ -8,39 +8,6 @@ #include "hpfs_fn.h" -static const char *text_postfix[]={ -".ASM", ".BAS", ".BAT", ".C", ".CC", ".CFG", ".CMD", ".CON", ".CPP", ".DEF", -".DOC", ".DPR", ".ERX", ".H", ".HPP", ".HTM", ".HTML", ".JAVA", ".LOG", ".PAS", -".RC", ".TEX", ".TXT", ".Y", ""}; - -static const char *text_prefix[]={ -"AUTOEXEC.", "CHANGES", "COPYING", "CONFIG.", "CREDITS", "FAQ", "FILE_ID.DIZ", -"MAKEFILE", "READ.ME", "README", "TERMCAP", ""}; - -void hpfs_decide_conv(struct inode *inode, const unsigned char *name, unsigned len) -{ - struct hpfs_inode_info *hpfs_inode = hpfs_i(inode); - int i; - if (hpfs_inode->i_conv != CONV_AUTO) return; - for (i = 0; *text_postfix[i]; i++) { - int l = strlen(text_postfix[i]); - if (l <= len) - if (!hpfs_compare_names(inode->i_sb, text_postfix[i], l, name + len - l, l, 0)) - goto text; - } - for (i = 0; *text_prefix[i]; i++) { - int l = strlen(text_prefix[i]); - if (l <= len) - if (!hpfs_compare_names(inode->i_sb, text_prefix[i], l, name, l, 0)) - goto text; - } - hpfs_inode->i_conv = CONV_BINARY; - return; - text: - hpfs_inode->i_conv = CONV_TEXT; - return; -} - static inline int not_allowed_char(unsigned char c) { return c<' ' || c=='"' || c=='*' || c=='/' || c==':' || c=='<' || |