mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-30 06:57:55 +00:00
btrfs-progs: unify header file inclusion protections
There are missing ifdefs or defines with very generic names. Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
39568fa417
commit
07ce7005fc
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BTRFS_BACKREF__
|
#ifndef __BTRFS_BACKREF_H__
|
||||||
#define __BTRFS_BACKREF__
|
#define __BTRFS_BACKREF_H__
|
||||||
|
|
||||||
#include "ulist.h"
|
#include "ulist.h"
|
||||||
#include "extent_io.h"
|
#include "extent_io.h"
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __BTRFS_LIST_H__
|
||||||
|
#define __BTRFS_LIST_H__
|
||||||
|
|
||||||
#if BTRFS_FLAT_INCLUDES
|
#if BTRFS_FLAT_INCLUDES
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
#else
|
#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);
|
char *btrfs_list_path_for_root(int fd, u64 root);
|
||||||
int btrfs_list_get_path_rootid(int fd, u64 *treeid);
|
int btrfs_list_get_path_rootid(int fd, u64 *treeid);
|
||||||
int btrfs_get_subvol(int fd, struct root_info *the_ri);
|
int btrfs_get_subvol(int fd, struct root_info *the_ri);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CHUNK_CHECK_H__
|
#ifndef __BTRFS_CHECK_H__
|
||||||
#define __CHUNK_CHECK_H__
|
#define __BTRFS_CHECK_H__
|
||||||
|
|
||||||
#if BTRFS_FLAT_INCLUDES
|
#if BTRFS_FLAT_INCLUDES
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CMDS_FI_DISK_USAGE__
|
#ifndef __CMDS_FI_DISK_USAGE_H__
|
||||||
#define __CMDS_FI_DISK_USAGE__
|
#define __CMDS_FI_DISK_USAGE_H__
|
||||||
|
|
||||||
extern const char * const cmd_filesystem_usage_usage[];
|
extern const char * const cmd_filesystem_usage_usage[];
|
||||||
int cmd_filesystem_usage(int argc, char **argv);
|
int cmd_filesystem_usage(int argc, char **argv);
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __BTRFS_COMMANDS_H__
|
||||||
|
#define __BTRFS_COMMANDS_H__
|
||||||
|
|
||||||
struct cmd_struct {
|
struct cmd_struct {
|
||||||
const char *token;
|
const char *token;
|
||||||
int (*fn)(int, char **);
|
int (*fn)(int, char **);
|
||||||
@ -121,3 +124,5 @@ int test_issubvolume(char *path);
|
|||||||
|
|
||||||
/* send.c */
|
/* send.c */
|
||||||
char *get_subvol_name(char *mnt, char *full_path);
|
char *get_subvol_name(char *mnt, char *full_path);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
4
ctree.h
4
ctree.h
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BTRFS__
|
#ifndef __BTRFS_CTREE_H__
|
||||||
#define __BTRFS__
|
#define __BTRFS_CTREE_H__
|
||||||
|
|
||||||
#if BTRFS_FLAT_INCLUDES
|
#if BTRFS_FLAT_INCLUDES
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DISKIO__
|
#ifndef __BTRFS_DISK_IO_H__
|
||||||
#define __DISKIO__
|
#define __BTRFS_DISK_IO_H__
|
||||||
|
|
||||||
#define BTRFS_SUPER_INFO_OFFSET (64 * 1024)
|
#define BTRFS_SUPER_INFO_OFFSET (64 * 1024)
|
||||||
#define BTRFS_SUPER_INFO_SIZE 4096
|
#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 btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid);
|
||||||
int write_and_map_eb(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
int write_and_map_eb(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
||||||
struct extent_buffer *eb);
|
struct extent_buffer *eb);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* raid6.c */
|
/* raid6.c */
|
||||||
void raid6_gen_syndrome(int disks, size_t bytes, void **ptrs);
|
void raid6_gen_syndrome(int disks, size_t bytes, void **ptrs);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __EXTENT_CACHE_H__
|
#ifndef __BTRFS_EXTENT_CACHE_H__
|
||||||
#define __EXTENT_CACHE_H__
|
#define __BTRFS_EXTENT_CACHE_H__
|
||||||
|
|
||||||
#if BTRFS_FLAT_INCLUDES
|
#if BTRFS_FLAT_INCLUDES
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __EXTENTMAP__
|
#ifndef __BTRFS_EXTENT_IO_H__
|
||||||
#define __EXTENTMAP__
|
#define __BTRFS_EXTENT_IO_H__
|
||||||
|
|
||||||
#if BTRFS_FLAT_INCLUDES
|
#if BTRFS_FLAT_INCLUDES
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BTRFS_FREE_SPACE_CACHE
|
#ifndef __BTRFS_FREE_SPACE_CACHE_H__
|
||||||
#define __BTRFS_FREE_SPACE_CACHE
|
#define __BTRFS_FREE_SPACE_CACHE_H__
|
||||||
|
|
||||||
struct btrfs_free_space {
|
struct btrfs_free_space {
|
||||||
struct rb_node offset_index;
|
struct rb_node offset_index;
|
||||||
|
5
hash.h
5
hash.h
@ -16,8 +16,9 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __HASH__
|
#ifndef __BTRFS_HASH_H__
|
||||||
#define __HASH__
|
#define __BTRFS_HASH_H__
|
||||||
|
|
||||||
#include "crc32c.h"
|
#include "crc32c.h"
|
||||||
|
|
||||||
static inline u64 btrfs_name_hash(const char *name, int len)
|
static inline u64 btrfs_name_hash(const char *name, int len)
|
||||||
|
5
ioctl.h
5
ioctl.h
@ -16,8 +16,9 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IOCTL_
|
#ifndef __BTRFS_IOCTL_H__
|
||||||
#define __IOCTL_
|
#define __BTRFS_IOCTL_H__
|
||||||
|
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
#include <linux/ioctl.h>
|
#include <linux/ioctl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __KERNCOMPAT
|
#ifndef __KERNCOMPAT_H__
|
||||||
#define __KERNCOMPAT
|
#define __KERNCOMPAT_H__
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -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 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 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))
|
#define put_unaligned_le64(val,p) (((struct __una_u64 *)(p))->x = cpu_to_le64(val))
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef true
|
#ifndef true
|
||||||
#define true 1
|
#define true 1
|
||||||
@ -361,3 +360,5 @@ struct __una_u64 { __le64 x; } __attribute__((__packed__));
|
|||||||
#ifndef noinline
|
#ifndef noinline
|
||||||
#define noinline
|
#define noinline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PRINT_TREE_
|
#ifndef __PRINT_TREE_H__
|
||||||
#define __PRINT_TREE_
|
#define __PRINT_TREE_H__
|
||||||
|
|
||||||
void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l);
|
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_tree(struct btrfs_root *root, struct extent_buffer *t, int follow);
|
||||||
void btrfs_print_key(struct btrfs_disk_key *disk_key);
|
void btrfs_print_key(struct btrfs_disk_key *disk_key);
|
||||||
|
6
props.h
6
props.h
@ -14,8 +14,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PROPS_H_
|
#ifndef __BTRFS_PROPS_H__
|
||||||
#define PROPS_H_
|
#define __BTRFS_PROPS_H__
|
||||||
|
|
||||||
enum prop_object_type {
|
enum prop_object_type {
|
||||||
prop_object_dev = (1 << 0),
|
prop_object_dev = (1 << 0),
|
||||||
@ -40,4 +40,4 @@ struct prop_handler {
|
|||||||
|
|
||||||
extern const struct prop_handler prop_handlers[];
|
extern const struct prop_handler prop_handlers[];
|
||||||
|
|
||||||
#endif /* PROPS_H_ */
|
#endif
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _BTRFS_QGROUP_VERIFY_H
|
#ifndef __BTRFS_QGROUP_VERIFY_H__
|
||||||
#define _BTRFS_QGROUP_VERIFY_H
|
#define __BTRFS_QGROUP_VERIFY_H__
|
||||||
|
|
||||||
int qgroup_verify_all(struct btrfs_fs_info *info);
|
int qgroup_verify_all(struct btrfs_fs_info *info);
|
||||||
void print_qgroup_report(int all);
|
void print_qgroup_report(int all);
|
||||||
|
|
||||||
int print_extent_state(struct btrfs_fs_info *info, u64 subvol);
|
int print_extent_state(struct btrfs_fs_info *info, u64 subvol);
|
||||||
|
|
||||||
#endif /* _BTRFS_QGROUP_VERIFY_H */
|
#endif
|
||||||
|
4
qgroup.h
4
qgroup.h
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _BTRFS_QGROUP_H
|
#ifndef __BTRFS_QGROUP_H__
|
||||||
#define _BTRFS_QGROUP_H
|
#define __BTRFS_QGROUP_H__
|
||||||
|
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
|
4
repair.h
4
repair.h
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BTRFS_REPAIR__
|
#ifndef __BTRFS_REPAIR_H__
|
||||||
#define __BTRFS_REPAIR__
|
#define __BTRFS_REPAIR_H__
|
||||||
|
|
||||||
struct btrfs_corrupt_block {
|
struct btrfs_corrupt_block {
|
||||||
struct cache_extent cache;
|
struct cache_extent cache;
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 021110-1307, USA.
|
* 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
|
* 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
|
||||||
|
|
||||||
#endif /* SEND_STREAM_H_ */
|
#endif
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 021110-1307, USA.
|
* 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
|
#if BTRFS_FLAT_INCLUDES
|
||||||
#include "ctree.h"
|
#include "ctree.h"
|
||||||
@ -93,4 +94,4 @@ char *path_cat3(const char *p1, const char *p2, const char *p3);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SEND_UTILS_H_ */
|
#endif
|
||||||
|
5
send.h
5
send.h
@ -17,6 +17,9 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __BTRFS_SEND_H__
|
||||||
|
#define __BTRFS_SEND_H__
|
||||||
|
|
||||||
#include "ctree.h"
|
#include "ctree.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -140,3 +143,5 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg);
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRING_TABLE_H
|
#ifndef __STRING_TABLE_H__
|
||||||
#define STRING_TABLE_H
|
#define __STRING_TABLE_H__
|
||||||
|
|
||||||
struct string_table {
|
struct string_table {
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TASK_UTILS_H_
|
#ifndef __TASK_UTILS_H__
|
||||||
#define __TASK_UTILS_H_
|
#define __TASK_UTILS_H__
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TRANSACTION__
|
#ifndef __BTRFS_TRANSACTION_H__
|
||||||
#define __TRANSACTION__
|
#define __BTRFS_TRANSACTION_H__
|
||||||
|
|
||||||
struct btrfs_trans_handle {
|
struct btrfs_trans_handle {
|
||||||
u64 transid;
|
u64 transid;
|
||||||
|
4
ulist.h
4
ulist.h
@ -5,8 +5,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ULIST__
|
#ifndef __ULIST_H__
|
||||||
#define __ULIST__
|
#define __ULIST_H__
|
||||||
|
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
4
utils.h
4
utils.h
@ -16,8 +16,8 @@
|
|||||||
* Boston, MA 021110-1307, USA.
|
* Boston, MA 021110-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __UTILS__
|
#ifndef __BTRFS_UTILS_H__
|
||||||
#define __UTILS__
|
#define __BTRFS_UTILS_H__
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "ctree.h"
|
#include "ctree.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user