diff options
author | Joe Perches <joe@perches.com> | 2013-04-30 18:27:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 20:04:05 -0400 |
commit | d614267329f2bee7a082ed8781c581c0f3aaa808 (patch) | |
tree | edade57808a2a2e327daf83991a31a76660b7a41 /fs/hfs/super.c | |
parent | c2b3e1f76e5c90215bc7f740b376c0220eb8a8e3 (diff) |
hfs/hfsplus: convert printks to pr_<level>
Use a more current logging style.
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
hfsplus now uses "hfsplus: " for all messages.
Coalesce formats.
Prefix debugging messages too.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfs/super.c')
-rw-r--r-- | fs/hfs/super.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 719760b2b0a6..2d2039e754cd 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -117,12 +117,11 @@ static int hfs_remount(struct super_block *sb, int *flags, char *data) | |||
117 | return 0; | 117 | return 0; |
118 | if (!(*flags & MS_RDONLY)) { | 118 | if (!(*flags & MS_RDONLY)) { |
119 | if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { | 119 | if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { |
120 | printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, " | 120 | pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. leaving read-only.\n"); |
121 | "running fsck.hfs is recommended. leaving read-only.\n"); | ||
122 | sb->s_flags |= MS_RDONLY; | 121 | sb->s_flags |= MS_RDONLY; |
123 | *flags |= MS_RDONLY; | 122 | *flags |= MS_RDONLY; |
124 | } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { | 123 | } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { |
125 | printk(KERN_WARNING "hfs: filesystem is marked locked, leaving read-only.\n"); | 124 | pr_warn("filesystem is marked locked, leaving read-only.\n"); |
126 | sb->s_flags |= MS_RDONLY; | 125 | sb->s_flags |= MS_RDONLY; |
127 | *flags |= MS_RDONLY; | 126 | *flags |= MS_RDONLY; |
128 | } | 127 | } |
@@ -253,29 +252,29 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) | |||
253 | switch (token) { | 252 | switch (token) { |
254 | case opt_uid: | 253 | case opt_uid: |
255 | if (match_int(&args[0], &tmp)) { | 254 | if (match_int(&args[0], &tmp)) { |
256 | printk(KERN_ERR "hfs: uid requires an argument\n"); | 255 | pr_err("uid requires an argument\n"); |
257 | return 0; | 256 | return 0; |
258 | } | 257 | } |
259 | hsb->s_uid = make_kuid(current_user_ns(), (uid_t)tmp); | 258 | hsb->s_uid = make_kuid(current_user_ns(), (uid_t)tmp); |
260 | if (!uid_valid(hsb->s_uid)) { | 259 | if (!uid_valid(hsb->s_uid)) { |
261 | printk(KERN_ERR "hfs: invalid uid %d\n", tmp); | 260 | pr_err("invalid uid %d\n", tmp); |
262 | return 0; | 261 | return 0; |
263 | } | 262 | } |
264 | break; | 263 | break; |
265 | case opt_gid: | 264 | case opt_gid: |
266 | if (match_int(&args[0], &tmp)) { | 265 | if (match_int(&args[0], &tmp)) { |
267 | printk(KERN_ERR "hfs: gid requires an argument\n"); | 266 | pr_err("gid requires an argument\n"); |
268 | return 0; | 267 | return 0; |
269 | } | 268 | } |
270 | hsb->s_gid = make_kgid(current_user_ns(), (gid_t)tmp); | 269 | hsb->s_gid = make_kgid(current_user_ns(), (gid_t)tmp); |
271 | if (!gid_valid(hsb->s_gid)) { | 270 | if (!gid_valid(hsb->s_gid)) { |
272 | printk(KERN_ERR "hfs: invalid gid %d\n", tmp); | 271 | pr_err("invalid gid %d\n", tmp); |
273 | return 0; | 272 | return 0; |
274 | } | 273 | } |
275 | break; | 274 | break; |
276 | case opt_umask: | 275 | case opt_umask: |
277 | if (match_octal(&args[0], &tmp)) { | 276 | if (match_octal(&args[0], &tmp)) { |
278 | printk(KERN_ERR "hfs: umask requires a value\n"); | 277 | pr_err("umask requires a value\n"); |
279 | return 0; | 278 | return 0; |
280 | } | 279 | } |
281 | hsb->s_file_umask = (umode_t)tmp; | 280 | hsb->s_file_umask = (umode_t)tmp; |
@@ -283,39 +282,39 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) | |||
283 | break; | 282 | break; |
284 | case opt_file_umask: | 283 | case opt_file_umask: |
285 | if (match_octal(&args[0], &tmp)) { | 284 | if (match_octal(&args[0], &tmp)) { |
286 | printk(KERN_ERR "hfs: file_umask requires a value\n"); | 285 | pr_err("file_umask requires a value\n"); |
287 | return 0; | 286 | return 0; |
288 | } | 287 | } |
289 | hsb->s_file_umask = (umode_t)tmp; | 288 | hsb->s_file_umask = (umode_t)tmp; |
290 | break; | 289 | break; |
291 | case opt_dir_umask: | 290 | case opt_dir_umask: |
292 | if (match_octal(&args[0], &tmp)) { | 291 | if (match_octal(&args[0], &tmp)) { |
293 | printk(KERN_ERR "hfs: dir_umask requires a value\n"); | 292 | pr_err("dir_umask requires a value\n"); |
294 | return 0; | 293 | return 0; |
295 | } | 294 | } |
296 | hsb->s_dir_umask = (umode_t)tmp; | 295 | hsb->s_dir_umask = (umode_t)tmp; |
297 | break; | 296 | break; |
298 | case opt_part: | 297 | case opt_part: |
299 | if (match_int(&args[0], &hsb->part)) { | 298 | if (match_int(&args[0], &hsb->part)) { |
300 | printk(KERN_ERR "hfs: part requires an argument\n"); | 299 | pr_err("part requires an argument\n"); |
301 | return 0; | 300 | return 0; |
302 | } | 301 | } |
303 | break; | 302 | break; |
304 | case opt_session: | 303 | case opt_session: |
305 | if (match_int(&args[0], &hsb->session)) { | 304 | if (match_int(&args[0], &hsb->session)) { |
306 | printk(KERN_ERR "hfs: session requires an argument\n"); | 305 | pr_err("session requires an argument\n"); |
307 | return 0; | 306 | return 0; |
308 | } | 307 | } |
309 | break; | 308 | break; |
310 | case opt_type: | 309 | case opt_type: |
311 | if (match_fourchar(&args[0], &hsb->s_type)) { | 310 | if (match_fourchar(&args[0], &hsb->s_type)) { |
312 | printk(KERN_ERR "hfs: type requires a 4 character value\n"); | 311 | pr_err("type requires a 4 character value\n"); |
313 | return 0; | 312 | return 0; |
314 | } | 313 | } |
315 | break; | 314 | break; |
316 | case opt_creator: | 315 | case opt_creator: |
317 | if (match_fourchar(&args[0], &hsb->s_creator)) { | 316 | if (match_fourchar(&args[0], &hsb->s_creator)) { |
318 | printk(KERN_ERR "hfs: creator requires a 4 character value\n"); | 317 | pr_err("creator requires a 4 character value\n"); |
319 | return 0; | 318 | return 0; |
320 | } | 319 | } |
321 | break; | 320 | break; |
@@ -324,14 +323,14 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) | |||
324 | break; | 323 | break; |
325 | case opt_codepage: | 324 | case opt_codepage: |
326 | if (hsb->nls_disk) { | 325 | if (hsb->nls_disk) { |
327 | printk(KERN_ERR "hfs: unable to change codepage\n"); | 326 | pr_err("unable to change codepage\n"); |
328 | return 0; | 327 | return 0; |
329 | } | 328 | } |
330 | p = match_strdup(&args[0]); | 329 | p = match_strdup(&args[0]); |
331 | if (p) | 330 | if (p) |
332 | hsb->nls_disk = load_nls(p); | 331 | hsb->nls_disk = load_nls(p); |
333 | if (!hsb->nls_disk) { | 332 | if (!hsb->nls_disk) { |
334 | printk(KERN_ERR "hfs: unable to load codepage \"%s\"\n", p); | 333 | pr_err("unable to load codepage \"%s\"\n", p); |
335 | kfree(p); | 334 | kfree(p); |
336 | return 0; | 335 | return 0; |
337 | } | 336 | } |
@@ -339,14 +338,14 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) | |||
339 | break; | 338 | break; |
340 | case opt_iocharset: | 339 | case opt_iocharset: |
341 | if (hsb->nls_io) { | 340 | if (hsb->nls_io) { |
342 | printk(KERN_ERR "hfs: unable to change iocharset\n"); | 341 | pr_err("unable to change iocharset\n"); |
343 | return 0; | 342 | return 0; |
344 | } | 343 | } |
345 | p = match_strdup(&args[0]); | 344 | p = match_strdup(&args[0]); |
346 | if (p) | 345 | if (p) |
347 | hsb->nls_io = load_nls(p); | 346 | hsb->nls_io = load_nls(p); |
348 | if (!hsb->nls_io) { | 347 | if (!hsb->nls_io) { |
349 | printk(KERN_ERR "hfs: unable to load iocharset \"%s\"\n", p); | 348 | pr_err("unable to load iocharset \"%s\"\n", p); |
350 | kfree(p); | 349 | kfree(p); |
351 | return 0; | 350 | return 0; |
352 | } | 351 | } |
@@ -360,7 +359,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) | |||
360 | if (hsb->nls_disk && !hsb->nls_io) { | 359 | if (hsb->nls_disk && !hsb->nls_io) { |
361 | hsb->nls_io = load_nls_default(); | 360 | hsb->nls_io = load_nls_default(); |
362 | if (!hsb->nls_io) { | 361 | if (!hsb->nls_io) { |
363 | printk(KERN_ERR "hfs: unable to load default iocharset\n"); | 362 | pr_err("unable to load default iocharset\n"); |
364 | return 0; | 363 | return 0; |
365 | } | 364 | } |
366 | } | 365 | } |
@@ -400,7 +399,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
400 | 399 | ||
401 | res = -EINVAL; | 400 | res = -EINVAL; |
402 | if (!parse_options((char *)data, sbi)) { | 401 | if (!parse_options((char *)data, sbi)) { |
403 | printk(KERN_ERR "hfs: unable to parse mount options.\n"); | 402 | pr_err("unable to parse mount options\n"); |
404 | goto bail; | 403 | goto bail; |
405 | } | 404 | } |
406 | 405 | ||
@@ -411,7 +410,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
411 | res = hfs_mdb_get(sb); | 410 | res = hfs_mdb_get(sb); |
412 | if (res) { | 411 | if (res) { |
413 | if (!silent) | 412 | if (!silent) |
414 | printk(KERN_WARNING "hfs: can't find a HFS filesystem on dev %s.\n", | 413 | pr_warn("can't find a HFS filesystem on dev %s\n", |
415 | hfs_mdb_name(sb)); | 414 | hfs_mdb_name(sb)); |
416 | res = -EINVAL; | 415 | res = -EINVAL; |
417 | goto bail; | 416 | goto bail; |
@@ -449,7 +448,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
449 | return 0; | 448 | return 0; |
450 | 449 | ||
451 | bail_no_root: | 450 | bail_no_root: |
452 | printk(KERN_ERR "hfs: get root inode failed.\n"); | 451 | pr_err("get root inode failed\n"); |
453 | bail: | 452 | bail: |
454 | hfs_mdb_put(sb); | 453 | hfs_mdb_put(sb); |
455 | return res; | 454 | return res; |