diff options
author | Steve French <smfrench@austin.rr.com> | 2005-04-29 01:41:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-29 01:41:05 -0400 |
commit | 6a0b48245a135cd132e747815854e3999967f8a7 (patch) | |
tree | 55fffb67b924fbca2a5a16e83100a5d1000daaf4 /fs/cifs/connect.c | |
parent | cbe0476fa6a76b01b79e7c117963d45ed0a28758 (diff) |
[PATCH] cifs: Add new mount parm mapchars
For handling seven special characters that shells use for filenames.
This first parts implements conversions from Unicode.
Signed-off-by: Steve French
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 814e709ca0ca..3d036bf689d8 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -72,6 +72,7 @@ struct smb_vol { | |||
72 | unsigned no_xattr:1; /* set if xattr (EA) support should be disabled*/ | 72 | unsigned no_xattr:1; /* set if xattr (EA) support should be disabled*/ |
73 | unsigned server_ino:1; /* use inode numbers from server ie UniqueId */ | 73 | unsigned server_ino:1; /* use inode numbers from server ie UniqueId */ |
74 | unsigned direct_io:1; | 74 | unsigned direct_io:1; |
75 | unsigned remap:1; /* set to remap seven reserved chars in filenames */ | ||
75 | unsigned int rsize; | 76 | unsigned int rsize; |
76 | unsigned int wsize; | 77 | unsigned int wsize; |
77 | unsigned int sockopt; | 78 | unsigned int sockopt; |
@@ -771,6 +772,10 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol) | |||
771 | vol->noperm = 0; | 772 | vol->noperm = 0; |
772 | } else if (strnicmp(data, "noperm", 6) == 0) { | 773 | } else if (strnicmp(data, "noperm", 6) == 0) { |
773 | vol->noperm = 1; | 774 | vol->noperm = 1; |
775 | } else if (strnicmp(data, "mapchars", 8) == 0) { | ||
776 | vol->remap = 1; | ||
777 | } else if (strnicmp(data, "nomapchars", 10) == 0) { | ||
778 | vol->remap = 0; | ||
774 | } else if (strnicmp(data, "setuids", 7) == 0) { | 779 | } else if (strnicmp(data, "setuids", 7) == 0) { |
775 | vol->setuids = 1; | 780 | vol->setuids = 1; |
776 | } else if (strnicmp(data, "nosetuids", 9) == 0) { | 781 | } else if (strnicmp(data, "nosetuids", 9) == 0) { |
@@ -1421,6 +1426,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1421 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SET_UID; | 1426 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SET_UID; |
1422 | if(volume_info.server_ino) | 1427 | if(volume_info.server_ino) |
1423 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SERVER_INUM; | 1428 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_SERVER_INUM; |
1429 | if(volume_info.remap) | ||
1430 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MAP_SPECIAL_CHR; | ||
1424 | if(volume_info.no_xattr) | 1431 | if(volume_info.no_xattr) |
1425 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR; | 1432 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR; |
1426 | if(volume_info.direct_io) { | 1433 | if(volume_info.direct_io) { |