aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorSergei Antonov <saproj@gmail.com>2014-06-06 17:36:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:08:10 -0400
commitffbc0671618e9354ec065144f8a66ec5dd7d5d75 (patch)
tree0d04a4c1e114f7cf2337d53a1b4b68ee6b2d7485 /fs/hfsplus
parent297cc27207446e9f054492fff5b561cebc589328 (diff)
hfsplus: coding style fix for declarations in hfsplus_fs.h
Some function declarations in hfsplus_fs.h were with argument names, some without, and some were mixed. This patch adds argument names everywhere, sorts function in order they go in .c files, and moves hfs_part_find() to a proper section. Auto-formatting and sorting was done with: cfunctions *.c | indent -linux | sed "s| \* | \*|" Signed-off-by: Sergei Antonov <saproj@gmail.com> Cc: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/hfsplus_fs.h203
1 files changed, 107 insertions, 96 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index d5ab79bd2f0f..eb5e059f481a 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -369,112 +369,119 @@ typedef int (*search_strategy_t)(struct hfs_bnode *,
369/* attributes.c */ 369/* attributes.c */
370int __init hfsplus_create_attr_tree_cache(void); 370int __init hfsplus_create_attr_tree_cache(void);
371void hfsplus_destroy_attr_tree_cache(void); 371void hfsplus_destroy_attr_tree_cache(void);
372int hfsplus_attr_bin_cmp_key(const hfsplus_btree_key *k1,
373 const hfsplus_btree_key *k2);
374int hfsplus_attr_build_key(struct super_block *sb, hfsplus_btree_key *key,
375 u32 cnid, const char *name);
372hfsplus_attr_entry *hfsplus_alloc_attr_entry(void); 376hfsplus_attr_entry *hfsplus_alloc_attr_entry(void);
373void hfsplus_destroy_attr_entry(hfsplus_attr_entry *entry_p); 377void hfsplus_destroy_attr_entry(hfsplus_attr_entry *entry);
374int hfsplus_attr_bin_cmp_key(const hfsplus_btree_key *, 378int hfsplus_find_attr(struct super_block *sb, u32 cnid, const char *name,
375 const hfsplus_btree_key *); 379 struct hfs_find_data *fd);
376int hfsplus_attr_build_key(struct super_block *, hfsplus_btree_key *,
377 u32, const char *);
378int hfsplus_find_attr(struct super_block *, u32,
379 const char *, struct hfs_find_data *);
380int hfsplus_attr_exists(struct inode *inode, const char *name); 380int hfsplus_attr_exists(struct inode *inode, const char *name);
381int hfsplus_create_attr(struct inode *, const char *, const void *, size_t); 381int hfsplus_create_attr(struct inode *inode, const char *name,
382int hfsplus_delete_attr(struct inode *, const char *); 382 const void *value, size_t size);
383int hfsplus_delete_attr(struct inode *inode, const char *name);
383int hfsplus_delete_all_attrs(struct inode *dir, u32 cnid); 384int hfsplus_delete_all_attrs(struct inode *dir, u32 cnid);
384 385
385/* bitmap.c */ 386/* bitmap.c */
386int hfsplus_block_allocate(struct super_block *, u32, u32, u32 *); 387int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset,
387int hfsplus_block_free(struct super_block *, u32, u32); 388 u32 *max);
389int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count);
388 390
389/* btree.c */ 391/* btree.c */
390u32 hfsplus_calc_btree_clump_size(u32, u32, u64, int); 392u32 hfsplus_calc_btree_clump_size(u32 block_size, u32 node_size, u64 sectors,
391struct hfs_btree *hfs_btree_open(struct super_block *, u32); 393 int file_id);
392void hfs_btree_close(struct hfs_btree *); 394struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id);
393int hfs_btree_write(struct hfs_btree *); 395void hfs_btree_close(struct hfs_btree *tree);
394struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *); 396int hfs_btree_write(struct hfs_btree *tree);
395void hfs_bmap_free(struct hfs_bnode *); 397struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree);
398void hfs_bmap_free(struct hfs_bnode *node);
396 399
397/* bnode.c */ 400/* bnode.c */
398void hfs_bnode_read(struct hfs_bnode *, void *, int, int); 401void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len);
399u16 hfs_bnode_read_u16(struct hfs_bnode *, int); 402u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off);
400u8 hfs_bnode_read_u8(struct hfs_bnode *, int); 403u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off);
401void hfs_bnode_read_key(struct hfs_bnode *, void *, int); 404void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off);
402void hfs_bnode_write(struct hfs_bnode *, void *, int, int); 405void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len);
403void hfs_bnode_write_u16(struct hfs_bnode *, int, u16); 406void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data);
404void hfs_bnode_clear(struct hfs_bnode *, int, int); 407void hfs_bnode_clear(struct hfs_bnode *node, int off, int len);
405void hfs_bnode_copy(struct hfs_bnode *, int, 408void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst,
406 struct hfs_bnode *, int, int); 409 struct hfs_bnode *src_node, int src, int len);
407void hfs_bnode_move(struct hfs_bnode *, int, int, int); 410void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len);
408void hfs_bnode_dump(struct hfs_bnode *); 411void hfs_bnode_dump(struct hfs_bnode *node);
409void hfs_bnode_unlink(struct hfs_bnode *); 412void hfs_bnode_unlink(struct hfs_bnode *node);
410struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *, u32); 413struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid);
411struct hfs_bnode *hfs_bnode_find(struct hfs_btree *, u32); 414void hfs_bnode_unhash(struct hfs_bnode *node);
412void hfs_bnode_unhash(struct hfs_bnode *); 415struct hfs_bnode *hfs_bnode_find(struct hfs_btree *tree, u32 num);
413void hfs_bnode_free(struct hfs_bnode *); 416void hfs_bnode_free(struct hfs_bnode *node);
414struct hfs_bnode *hfs_bnode_create(struct hfs_btree *, u32); 417struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num);
415void hfs_bnode_get(struct hfs_bnode *); 418void hfs_bnode_get(struct hfs_bnode *node);
416void hfs_bnode_put(struct hfs_bnode *); 419void hfs_bnode_put(struct hfs_bnode *node);
417bool hfs_bnode_need_zeroout(struct hfs_btree *); 420bool hfs_bnode_need_zeroout(struct hfs_btree *tree);
418 421
419/* brec.c */ 422/* brec.c */
420u16 hfs_brec_lenoff(struct hfs_bnode *, u16, u16 *); 423u16 hfs_brec_lenoff(struct hfs_bnode *node, u16 rec, u16 *off);
421u16 hfs_brec_keylen(struct hfs_bnode *, u16); 424u16 hfs_brec_keylen(struct hfs_bnode *node, u16 rec);
422int hfs_brec_insert(struct hfs_find_data *, void *, int); 425int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len);
423int hfs_brec_remove(struct hfs_find_data *); 426int hfs_brec_remove(struct hfs_find_data *fd);
424 427
425/* bfind.c */ 428/* bfind.c */
426int hfs_find_init(struct hfs_btree *, struct hfs_find_data *); 429int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd);
427void hfs_find_exit(struct hfs_find_data *); 430void hfs_find_exit(struct hfs_find_data *fd);
428int hfs_find_1st_rec_by_cnid(struct hfs_bnode *, 431int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, struct hfs_find_data *fd,
429 struct hfs_find_data *, 432 int *begin, int *end, int *cur_rec);
430 int *, int *, int *); 433int hfs_find_rec_by_key(struct hfs_bnode *bnode, struct hfs_find_data *fd,
431int hfs_find_rec_by_key(struct hfs_bnode *, 434 int *begin, int *end, int *cur_rec);
432 struct hfs_find_data *, 435int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd,
433 int *, int *, int *); 436 search_strategy_t rec_found);
434int __hfs_brec_find(struct hfs_bnode *, struct hfs_find_data *, 437int hfs_brec_find(struct hfs_find_data *fd, search_strategy_t do_key_compare);
435 search_strategy_t); 438int hfs_brec_read(struct hfs_find_data *fd, void *rec, int rec_len);
436int hfs_brec_find(struct hfs_find_data *, search_strategy_t); 439int hfs_brec_goto(struct hfs_find_data *fd, int cnt);
437int hfs_brec_read(struct hfs_find_data *, void *, int);
438int hfs_brec_goto(struct hfs_find_data *, int);
439 440
440/* catalog.c */ 441/* catalog.c */
441int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *, 442int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *k1,
442 const hfsplus_btree_key *); 443 const hfsplus_btree_key *k2);
443int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *, 444int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *k1,
444 const hfsplus_btree_key *); 445 const hfsplus_btree_key *k2);
445void hfsplus_cat_build_key(struct super_block *sb, 446void hfsplus_cat_build_key(struct super_block *sb, hfsplus_btree_key *key,
446 hfsplus_btree_key *, u32, struct qstr *); 447 u32 parent, struct qstr *str);
447int hfsplus_find_cat(struct super_block *, u32, struct hfs_find_data *);
448int hfsplus_create_cat(u32, struct inode *, struct qstr *, struct inode *);
449int hfsplus_delete_cat(u32, struct inode *, struct qstr *);
450int hfsplus_rename_cat(u32, struct inode *, struct qstr *,
451 struct inode *, struct qstr *);
452void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms); 448void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms);
449int hfsplus_find_cat(struct super_block *sb, u32 cnid,
450 struct hfs_find_data *fd);
451int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str,
452 struct inode *inode);
453int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str);
454int hfsplus_rename_cat(u32 cnid, struct inode *src_dir, struct qstr *src_name,
455 struct inode *dst_dir, struct qstr *dst_name);
453 456
454/* dir.c */ 457/* dir.c */
455extern const struct inode_operations hfsplus_dir_inode_operations; 458extern const struct inode_operations hfsplus_dir_inode_operations;
456extern const struct file_operations hfsplus_dir_operations; 459extern const struct file_operations hfsplus_dir_operations;
457 460
458/* extents.c */ 461/* extents.c */
459int hfsplus_ext_cmp_key(const hfsplus_btree_key *, const hfsplus_btree_key *); 462int hfsplus_ext_cmp_key(const hfsplus_btree_key *k1,
460int hfsplus_ext_write_extent(struct inode *); 463 const hfsplus_btree_key *k2);
461int hfsplus_get_block(struct inode *, sector_t, struct buffer_head *, int); 464int hfsplus_ext_write_extent(struct inode *inode);
462int hfsplus_free_fork(struct super_block *, u32, 465int hfsplus_get_block(struct inode *inode, sector_t iblock,
463 struct hfsplus_fork_raw *, int); 466 struct buffer_head *bh_result, int create);
464int hfsplus_file_extend(struct inode *, bool zeroout); 467int hfsplus_free_fork(struct super_block *sb, u32 cnid,
465void hfsplus_file_truncate(struct inode *); 468 struct hfsplus_fork_raw *fork, int type);
469int hfsplus_file_extend(struct inode *inode, bool zeroout);
470void hfsplus_file_truncate(struct inode *inode);
466 471
467/* inode.c */ 472/* inode.c */
468extern const struct address_space_operations hfsplus_aops; 473extern const struct address_space_operations hfsplus_aops;
469extern const struct address_space_operations hfsplus_btree_aops; 474extern const struct address_space_operations hfsplus_btree_aops;
470extern const struct dentry_operations hfsplus_dentry_operations; 475extern const struct dentry_operations hfsplus_dentry_operations;
471 476
472void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *); 477struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode);
473void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *); 478void hfsplus_delete_inode(struct inode *inode);
474int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *); 479void hfsplus_inode_read_fork(struct inode *inode,
475int hfsplus_cat_write_inode(struct inode *); 480 struct hfsplus_fork_raw *fork);
476struct inode *hfsplus_new_inode(struct super_block *, umode_t); 481void hfsplus_inode_write_fork(struct inode *inode,
477void hfsplus_delete_inode(struct inode *); 482 struct hfsplus_fork_raw *fork);
483int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd);
484int hfsplus_cat_write_inode(struct inode *inode);
478int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, 485int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
479 int datasync); 486 int datasync);
480 487
@@ -482,13 +489,17 @@ int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
482long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); 489long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
483 490
484/* options.c */ 491/* options.c */
485int hfsplus_parse_options(char *, struct hfsplus_sb_info *); 492void hfsplus_fill_defaults(struct hfsplus_sb_info *opts);
486int hfsplus_parse_options_remount(char *input, int *force); 493int hfsplus_parse_options_remount(char *input, int *force);
487void hfsplus_fill_defaults(struct hfsplus_sb_info *); 494int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi);
488int hfsplus_show_options(struct seq_file *, struct dentry *); 495int hfsplus_show_options(struct seq_file *seq, struct dentry *root);
496
497/* part_tbl.c */
498int hfs_part_find(struct super_block *sb, sector_t *part_start,
499 sector_t *part_size);
489 500
490/* super.c */ 501/* super.c */
491struct inode *hfsplus_iget(struct super_block *, unsigned long); 502struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino);
492void hfsplus_mark_mdb_dirty(struct super_block *sb); 503void hfsplus_mark_mdb_dirty(struct super_block *sb);
493 504
494/* tables.c */ 505/* tables.c */
@@ -497,23 +508,23 @@ extern u16 hfsplus_decompose_table[];
497extern u16 hfsplus_compose_table[]; 508extern u16 hfsplus_compose_table[];
498 509
499/* unicode.c */ 510/* unicode.c */
500int hfsplus_strcasecmp(const struct hfsplus_unistr *, 511int hfsplus_strcasecmp(const struct hfsplus_unistr *s1,
501 const struct hfsplus_unistr *); 512 const struct hfsplus_unistr *s2);
502int hfsplus_strcmp(const struct hfsplus_unistr *, 513int hfsplus_strcmp(const struct hfsplus_unistr *s1,
503 const struct hfsplus_unistr *); 514 const struct hfsplus_unistr *s2);
504int hfsplus_uni2asc(struct super_block *, 515int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr,
505 const struct hfsplus_unistr *, char *, int *); 516 char *astr, int *len_p);
506int hfsplus_asc2uni(struct super_block *, 517int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr,
507 struct hfsplus_unistr *, int, const char *, int); 518 int max_unistr_len, const char *astr, int len);
508int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); 519int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str);
509int hfsplus_compare_dentry(const struct dentry *parent, const struct dentry *dentry, 520int hfsplus_compare_dentry(const struct dentry *parent,
510 unsigned int len, const char *str, const struct qstr *name); 521 const struct dentry *dentry, unsigned int len,
522 const char *str, const struct qstr *name);
511 523
512/* wrapper.c */ 524/* wrapper.c */
513int hfsplus_read_wrapper(struct super_block *); 525int hfsplus_submit_bio(struct super_block *sb, sector_t sector, void *buf,
514int hfs_part_find(struct super_block *, sector_t *, sector_t *); 526 void **data, int rw);
515int hfsplus_submit_bio(struct super_block *sb, sector_t sector, 527int hfsplus_read_wrapper(struct super_block *sb);
516 void *buf, void **data, int rw);
517 528
518/* time macros */ 529/* time macros */
519#define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U) 530#define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U)