diff --git a/backref.h b/backref.h index fd22b99b..3d2ed458 100644 --- a/backref.h +++ b/backref.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __BTRFS_BACKREF__ -#define __BTRFS_BACKREF__ +#ifndef __BTRFS_BACKREF_H__ +#define __BTRFS_BACKREF_H__ #include "ulist.h" #include "extent_io.h" diff --git a/btrfs-list.h b/btrfs-list.h index ee2aea54..4b213008 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -16,6 +16,9 @@ * Boston, MA 021110-1307, USA. */ +#ifndef __BTRFS_LIST_H__ +#define __BTRFS_LIST_H__ + #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" #else @@ -165,3 +168,5 @@ int btrfs_list_get_default_subvolume(int fd, u64 *default_id); char *btrfs_list_path_for_root(int fd, u64 root); int btrfs_list_get_path_rootid(int fd, u64 *treeid); int btrfs_get_subvol(int fd, struct root_info *the_ri); + +#endif diff --git a/btrfsck.h b/btrfsck.h index 7a506480..e58c55ab 100644 --- a/btrfsck.h +++ b/btrfsck.h @@ -17,8 +17,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __CHUNK_CHECK_H__ -#define __CHUNK_CHECK_H__ +#ifndef __BTRFS_CHECK_H__ +#define __BTRFS_CHECK_H__ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h index a76e77bf..96cec6a7 100644 --- a/cmds-fi-disk_usage.h +++ b/cmds-fi-disk_usage.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __CMDS_FI_DISK_USAGE__ -#define __CMDS_FI_DISK_USAGE__ +#ifndef __CMDS_FI_DISK_USAGE_H__ +#define __CMDS_FI_DISK_USAGE_H__ extern const char * const cmd_filesystem_usage_usage[]; int cmd_filesystem_usage(int argc, char **argv); diff --git a/commands.h b/commands.h index 4d870f6a..bd23340d 100644 --- a/commands.h +++ b/commands.h @@ -14,6 +14,9 @@ * Boston, MA 021110-1307, USA. */ +#ifndef __BTRFS_COMMANDS_H__ +#define __BTRFS_COMMANDS_H__ + struct cmd_struct { const char *token; int (*fn)(int, char **); @@ -121,3 +124,5 @@ int test_issubvolume(char *path); /* send.c */ char *get_subvol_name(char *mnt, char *full_path); + +#endif diff --git a/ctree.h b/ctree.h index 7861940f..c069a95a 100644 --- a/ctree.h +++ b/ctree.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __BTRFS__ -#define __BTRFS__ +#ifndef __BTRFS_CTREE_H__ +#define __BTRFS_CTREE_H__ #if BTRFS_FLAT_INCLUDES #include "list.h" diff --git a/disk-io.h b/disk-io.h index e12870eb..f963a96a 100644 --- a/disk-io.h +++ b/disk-io.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __DISKIO__ -#define __DISKIO__ +#ifndef __BTRFS_DISK_IO_H__ +#define __BTRFS_DISK_IO_H__ #define BTRFS_SUPER_INFO_OFFSET (64 * 1024) #define BTRFS_SUPER_INFO_SIZE 4096 @@ -110,7 +110,8 @@ int verify_tree_block_csum_silent(struct extent_buffer *buf, u16 csum_size); int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid); int write_and_map_eb(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *eb); -#endif /* raid6.c */ void raid6_gen_syndrome(int disks, size_t bytes, void **ptrs); + +#endif diff --git a/extent-cache.h b/extent-cache.h index a9d07e18..cb1f77c2 100644 --- a/extent-cache.h +++ b/extent-cache.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __EXTENT_CACHE_H__ -#define __EXTENT_CACHE_H__ +#ifndef __BTRFS_EXTENT_CACHE_H__ +#define __BTRFS_EXTENT_CACHE_H__ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" diff --git a/extent_io.h b/extent_io.h index acc316e5..3ded4938 100644 --- a/extent_io.h +++ b/extent_io.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __EXTENTMAP__ -#define __EXTENTMAP__ +#ifndef __BTRFS_EXTENT_IO_H__ +#define __BTRFS_EXTENT_IO_H__ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" diff --git a/free-space-cache.h b/free-space-cache.h index ec213da6..f2e71a58 100644 --- a/free-space-cache.h +++ b/free-space-cache.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __BTRFS_FREE_SPACE_CACHE -#define __BTRFS_FREE_SPACE_CACHE +#ifndef __BTRFS_FREE_SPACE_CACHE_H__ +#define __BTRFS_FREE_SPACE_CACHE_H__ struct btrfs_free_space { struct rb_node offset_index; diff --git a/hash.h b/hash.h index 804fcdac..ac4c4117 100644 --- a/hash.h +++ b/hash.h @@ -16,8 +16,9 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __HASH__ -#define __HASH__ +#ifndef __BTRFS_HASH_H__ +#define __BTRFS_HASH_H__ + #include "crc32c.h" static inline u64 btrfs_name_hash(const char *name, int len) diff --git a/ioctl.h b/ioctl.h index 2c2c7c1b..d550ca6f 100644 --- a/ioctl.h +++ b/ioctl.h @@ -16,8 +16,9 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __IOCTL_ -#define __IOCTL_ +#ifndef __BTRFS_IOCTL_H__ +#define __BTRFS_IOCTL_H__ + #include #include #include diff --git a/kerncompat.h b/kerncompat.h index 314ea023..5d928565 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __KERNCOMPAT -#define __KERNCOMPAT +#ifndef __KERNCOMPAT_H__ +#define __KERNCOMPAT_H__ #include #include @@ -351,7 +351,6 @@ struct __una_u64 { __le64 x; } __attribute__((__packed__)); #define put_unaligned_le32(val,p) (((struct __una_u32 *)(p))->x = cpu_to_le32(val)) #define get_unaligned_le64(p) le64_to_cpu(((const struct __una_u64 *)(p))->x) #define put_unaligned_le64(val,p) (((struct __una_u64 *)(p))->x = cpu_to_le64(val)) -#endif #ifndef true #define true 1 @@ -361,3 +360,5 @@ struct __una_u64 { __le64 x; } __attribute__((__packed__)); #ifndef noinline #define noinline #endif + +#endif diff --git a/print-tree.h b/print-tree.h index 48dc68a1..f0153c18 100644 --- a/print-tree.h +++ b/print-tree.h @@ -16,8 +16,9 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __PRINT_TREE_ -#define __PRINT_TREE_ +#ifndef __PRINT_TREE_H__ +#define __PRINT_TREE_H__ + void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l); void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *t, int follow); void btrfs_print_key(struct btrfs_disk_key *disk_key); diff --git a/props.h b/props.h index faa4410e..a43cb253 100644 --- a/props.h +++ b/props.h @@ -14,8 +14,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef PROPS_H_ -#define PROPS_H_ +#ifndef __BTRFS_PROPS_H__ +#define __BTRFS_PROPS_H__ enum prop_object_type { prop_object_dev = (1 << 0), @@ -40,4 +40,4 @@ struct prop_handler { extern const struct prop_handler prop_handlers[]; -#endif /* PROPS_H_ */ +#endif diff --git a/qgroup-verify.h b/qgroup-verify.h index 9201407a..174ed455 100644 --- a/qgroup-verify.h +++ b/qgroup-verify.h @@ -16,12 +16,12 @@ * Boston, MA 021110-1307, USA. */ -#ifndef _BTRFS_QGROUP_VERIFY_H -#define _BTRFS_QGROUP_VERIFY_H +#ifndef __BTRFS_QGROUP_VERIFY_H__ +#define __BTRFS_QGROUP_VERIFY_H__ int qgroup_verify_all(struct btrfs_fs_info *info); void print_qgroup_report(int all); int print_extent_state(struct btrfs_fs_info *info, u64 subvol); -#endif /* _BTRFS_QGROUP_VERIFY_H */ +#endif diff --git a/qgroup.h b/qgroup.h index 653cf1c7..d9758fa8 100644 --- a/qgroup.h +++ b/qgroup.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef _BTRFS_QGROUP_H -#define _BTRFS_QGROUP_H +#ifndef __BTRFS_QGROUP_H__ +#define __BTRFS_QGROUP_H__ #include "ioctl.h" #include "kerncompat.h" diff --git a/repair.h b/repair.h index 3d0dcb90..3d04e6db 100644 --- a/repair.h +++ b/repair.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __BTRFS_REPAIR__ -#define __BTRFS_REPAIR__ +#ifndef __BTRFS_REPAIR_H__ +#define __BTRFS_REPAIR_H__ struct btrfs_corrupt_block { struct cache_extent cache; diff --git a/send-stream.h b/send-stream.h index bedff4d0..133a3105 100644 --- a/send-stream.h +++ b/send-stream.h @@ -15,8 +15,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ -#ifndef SEND_STREAM_H_ -#define SEND_STREAM_H_ + +#ifndef __BTRFS_SEND_STREAM_H__ +#define __BTRFS_SEND_STREAM_H__ /* * NOTE: this file is public API, any incompatible change has to update @@ -70,4 +71,4 @@ int btrfs_read_and_process_send_stream(int fd, } #endif -#endif /* SEND_STREAM_H_ */ +#endif diff --git a/send-utils.h b/send-utils.h index f451c1cb..0f38b5ad 100644 --- a/send-utils.h +++ b/send-utils.h @@ -15,8 +15,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ -#ifndef SEND_UTILS_H_ -#define SEND_UTILS_H_ + +#ifndef __BTRFS_SEND_UTILS_H__ +#define __BTRFS_SEND_UTILS_H__ #if BTRFS_FLAT_INCLUDES #include "ctree.h" @@ -93,4 +94,4 @@ char *path_cat3(const char *p1, const char *p2, const char *p3); } #endif -#endif /* SEND_UTILS_H_ */ +#endif diff --git a/send.h b/send.h index e8da785f..ae9aa029 100644 --- a/send.h +++ b/send.h @@ -17,6 +17,9 @@ * Boston, MA 021110-1307, USA. */ +#ifndef __BTRFS_SEND_H__ +#define __BTRFS_SEND_H__ + #include "ctree.h" #ifdef __cplusplus @@ -140,3 +143,5 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg); #ifdef __cplusplus } #endif + +#endif diff --git a/string-table.h b/string-table.h index 83c4425d..657aae4b 100644 --- a/string-table.h +++ b/string-table.h @@ -14,8 +14,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef STRING_TABLE_H -#define STRING_TABLE_H +#ifndef __STRING_TABLE_H__ +#define __STRING_TABLE_H__ struct string_table { diff --git a/task-utils.h b/task-utils.h index 3d412ddc..91d5a646 100644 --- a/task-utils.h +++ b/task-utils.h @@ -14,8 +14,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __TASK_UTILS_H_ -#define __TASK_UTILS_H_ +#ifndef __TASK_UTILS_H__ +#define __TASK_UTILS_H__ #include diff --git a/transaction.h b/transaction.h index e8610b1d..c5780bc6 100644 --- a/transaction.h +++ b/transaction.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __TRANSACTION__ -#define __TRANSACTION__ +#ifndef __BTRFS_TRANSACTION_H__ +#define __BTRFS_TRANSACTION_H__ struct btrfs_trans_handle { u64 transid; diff --git a/ulist.h b/ulist.h index 9e0e4e0d..88f5b826 100644 --- a/ulist.h +++ b/ulist.h @@ -5,8 +5,8 @@ * */ -#ifndef __ULIST__ -#define __ULIST__ +#ifndef __ULIST_H__ +#define __ULIST_H__ #include "kerncompat.h" #include "list.h" diff --git a/utils.h b/utils.h index 142f3f99..88c3a649 100644 --- a/utils.h +++ b/utils.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __UTILS__ -#define __UTILS__ +#ifndef __BTRFS_UTILS_H__ +#define __BTRFS_UTILS_H__ #include #include "ctree.h" diff --git a/volumes.h b/volumes.h index 221ef34f..40ed1239 100644 --- a/volumes.h +++ b/volumes.h @@ -16,8 +16,8 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __BTRFS_VOLUMES_ -#define __BTRFS_VOLUMES_ +#ifndef __BTRFS_VOLUMES_H__ +#define __BTRFS_VOLUMES_H__ #define BTRFS_STRIPE_LEN (64 * 1024)