options.c (cf9ce948f47640797bd19980e1d99c6d17d0bdc3) | options.c (d614267329f2bee7a082ed8781c581c0f3aaa808) |
---|---|
1/* 2 * linux/fs/hfsplus/options.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Option parsing --- 99 unchanged lines hidden (view full) --- 108 while ((p = strsep(&input, ",")) != NULL) { 109 if (!*p) 110 continue; 111 112 token = match_token(p, tokens, args); 113 switch (token) { 114 case opt_creator: 115 if (match_fourchar(&args[0], &sbi->creator)) { | 1/* 2 * linux/fs/hfsplus/options.c 3 * 4 * Copyright (C) 2001 5 * Brad Boyer (flar@allandria.com) 6 * (C) 2003 Ardis Technologies <roman@ardistech.com> 7 * 8 * Option parsing --- 99 unchanged lines hidden (view full) --- 108 while ((p = strsep(&input, ",")) != NULL) { 109 if (!*p) 110 continue; 111 112 token = match_token(p, tokens, args); 113 switch (token) { 114 case opt_creator: 115 if (match_fourchar(&args[0], &sbi->creator)) { |
116 printk(KERN_ERR "hfs: creator requires a 4 character value\n"); | 116 pr_err("creator requires a 4 character value\n"); |
117 return 0; 118 } 119 break; 120 case opt_type: 121 if (match_fourchar(&args[0], &sbi->type)) { | 117 return 0; 118 } 119 break; 120 case opt_type: 121 if (match_fourchar(&args[0], &sbi->type)) { |
122 printk(KERN_ERR "hfs: type requires a 4 character value\n"); | 122 pr_err("type requires a 4 character value\n"); |
123 return 0; 124 } 125 break; 126 case opt_umask: 127 if (match_octal(&args[0], &tmp)) { | 123 return 0; 124 } 125 break; 126 case opt_umask: 127 if (match_octal(&args[0], &tmp)) { |
128 printk(KERN_ERR "hfs: umask requires a value\n"); | 128 pr_err("umask requires a value\n"); |
129 return 0; 130 } 131 sbi->umask = (umode_t)tmp; 132 break; 133 case opt_uid: 134 if (match_int(&args[0], &tmp)) { | 129 return 0; 130 } 131 sbi->umask = (umode_t)tmp; 132 break; 133 case opt_uid: 134 if (match_int(&args[0], &tmp)) { |
135 printk(KERN_ERR "hfs: uid requires an argument\n"); | 135 pr_err("uid requires an argument\n"); |
136 return 0; 137 } 138 sbi->uid = make_kuid(current_user_ns(), (uid_t)tmp); 139 if (!uid_valid(sbi->uid)) { | 136 return 0; 137 } 138 sbi->uid = make_kuid(current_user_ns(), (uid_t)tmp); 139 if (!uid_valid(sbi->uid)) { |
140 printk(KERN_ERR "hfs: invalid uid specified\n"); | 140 pr_err("invalid uid specified\n"); |
141 return 0; 142 } 143 break; 144 case opt_gid: 145 if (match_int(&args[0], &tmp)) { | 141 return 0; 142 } 143 break; 144 case opt_gid: 145 if (match_int(&args[0], &tmp)) { |
146 printk(KERN_ERR "hfs: gid requires an argument\n"); | 146 pr_err("gid requires an argument\n"); |
147 return 0; 148 } 149 sbi->gid = make_kgid(current_user_ns(), (gid_t)tmp); 150 if (!gid_valid(sbi->gid)) { | 147 return 0; 148 } 149 sbi->gid = make_kgid(current_user_ns(), (gid_t)tmp); 150 if (!gid_valid(sbi->gid)) { |
151 printk(KERN_ERR "hfs: invalid gid specified\n"); | 151 pr_err("invalid gid specified\n"); |
152 return 0; 153 } 154 break; 155 case opt_part: 156 if (match_int(&args[0], &sbi->part)) { | 152 return 0; 153 } 154 break; 155 case opt_part: 156 if (match_int(&args[0], &sbi->part)) { |
157 printk(KERN_ERR "hfs: part requires an argument\n"); | 157 pr_err("part requires an argument\n"); |
158 return 0; 159 } 160 break; 161 case opt_session: 162 if (match_int(&args[0], &sbi->session)) { | 158 return 0; 159 } 160 break; 161 case opt_session: 162 if (match_int(&args[0], &sbi->session)) { |
163 printk(KERN_ERR "hfs: session requires an argument\n"); | 163 pr_err("session requires an argument\n"); |
164 return 0; 165 } 166 break; 167 case opt_nls: 168 if (sbi->nls) { | 164 return 0; 165 } 166 break; 167 case opt_nls: 168 if (sbi->nls) { |
169 printk(KERN_ERR "hfs: unable to change nls mapping\n"); | 169 pr_err("unable to change nls mapping\n"); |
170 return 0; 171 } 172 p = match_strdup(&args[0]); 173 if (p) 174 sbi->nls = load_nls(p); 175 if (!sbi->nls) { | 170 return 0; 171 } 172 p = match_strdup(&args[0]); 173 if (p) 174 sbi->nls = load_nls(p); 175 if (!sbi->nls) { |
176 printk(KERN_ERR "hfs: unable to load " | 176 pr_err("unable to load " |
177 "nls mapping \"%s\"\n", 178 p); 179 kfree(p); 180 return 0; 181 } 182 kfree(p); 183 break; 184 case opt_decompose: --- 55 unchanged lines hidden --- | 177 "nls mapping \"%s\"\n", 178 p); 179 kfree(p); 180 return 0; 181 } 182 kfree(p); 183 break; 184 case opt_decompose: --- 55 unchanged lines hidden --- |