errcode_t ext2fs_get_free_blocks2(ext2_filsys fs, blk64_t start, blk64_t finish,
int num, ext2fs_block_bitmap map, blk64_t *ret)
{
- blk64_t b = start, c = 0;
+ blk64_t b = start;
int c_ratio;
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
{
int count, free_buf = 0;
errcode_t err;
- blk64_t offset;
if (!blocksize)
return;
static void write_header(int fd, void *hdr, int hdr_size, int wrt_size)
{
char *header_buf;
- int actual, ret;
+ int ret;
/* Sanity check */
if (hdr_size > wrt_size) {
static void free_qcow2_image(struct ext2_qcow2_image *img)
{
- unsigned int i;
-
if (!img)
return;
static void output_qcow2_meta_data_blocks(ext2_filsys fs, int fd)
{
errcode_t retval;
- blk64_t blk, datablk, offset, size, actual, end;
+ blk64_t blk, offset, size, end;
char *buf;
- int sparse = 0;
struct ext2_qcow2_image *img;
- unsigned int header_size, i;
- blk64_t l1_index, l2_offset, l2_index;
- char *buffer;
- __u64 *l2_table;
+ unsigned int header_size;
/* allocate struct ext2_qcow2_image */
retval = ext2fs_get_mem(sizeof(struct ext2_qcow2_image), &img);
return retval;
}
-static fix_cluster_bg_counts(ext2_filsys fs)
+static void fix_cluster_bg_counts(ext2_filsys fs)
{
blk64_t cluster, num_clusters, tot_free;
int grp_free, num_free, group, num;