exit(ret);
}
-static u64 parse_profile(char *s)
+static u64 parse_profile(const char *s)
{
if (strcasecmp(s, "raid0") == 0) {
return BTRFS_BLOCK_GROUP_RAID0;
return 0;
}
-static char *parse_label(char *input)
+static char *parse_label(const char *input)
{
int len = strlen(input);
free(files);
}
-static u64 calculate_dir_inode_size(char *dirname)
+static u64 calculate_dir_inode_size(const char *dirname)
{
int count, i;
struct direct **files, *cur_file;
static int add_inode_items(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
- struct stat *st, char *name,
+ struct stat *st, const char *name,
u64 self_objectid, ino_t parent_inum,
int dir_index_cnt, struct btrfs_inode_item *inode_ret)
{
return ret;
}
-static char *make_path(char *dir, char *name)
+static char *make_path(const char *dir, const char *name)
{
char *path;
}
static int traverse_directory(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, char *dir_name,
+ struct btrfs_root *root, const char *dir_name,
struct directory_name_entry *dir_head, int out_fd)
{
int ret = 0;
struct direct *cur_file;
ino_t parent_inum, cur_inum;
ino_t highest_inum = 0;
- char *parent_dir_name;
+ const char *parent_dir_name;
char real_path[PATH_MAX];
struct btrfs_path path;
struct extent_buffer *leaf;
return ret;
}
-static int make_image(char *source_dir, struct btrfs_root *root, int out_fd)
+static int make_image(const char *source_dir, struct btrfs_root *root,
+ int out_fd)
{
int ret;
struct btrfs_trans_handle *trans;
return 0;
}
-static u64 size_sourcedir(char *dir_name, u64 sectorsize,
+static u64 size_sourcedir(const char *dir_name, u64 sectorsize,
u64 *num_of_meta_chunks_ret, u64 *size_of_data_ret)
{
u64 dir_size = 0;