vvfat.c (b3d6ca770dd916bceaa7a421252734f86dc07e38) vvfat.c (eba25057b9a5e19d10ace2bc7716667a31297169)
1/* vim:set shiftwidth=4 ts=8: */
2/*
3 * QEMU Block driver for virtual VFAT (shadows a local directory)
4 *
5 * Copyright (c) 2004,2005 Johannes E. Schindelin
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

--- 2794 unchanged lines hidden (view full) ---

2803 QEMUOptionParameter *options;
2804 int ret;
2805 int size = sector2cluster(s, s->sector_count);
2806 s->used_clusters = calloc(size, 1);
2807
2808 array_init(&(s->commits), sizeof(commit_t));
2809
2810 s->qcow_filename = g_malloc(1024);
1/* vim:set shiftwidth=4 ts=8: */
2/*
3 * QEMU Block driver for virtual VFAT (shadows a local directory)
4 *
5 * Copyright (c) 2004,2005 Johannes E. Schindelin
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

--- 2794 unchanged lines hidden (view full) ---

2803 QEMUOptionParameter *options;
2804 int ret;
2805 int size = sector2cluster(s, s->sector_count);
2806 s->used_clusters = calloc(size, 1);
2807
2808 array_init(&(s->commits), sizeof(commit_t));
2809
2810 s->qcow_filename = g_malloc(1024);
2811 get_tmp_filename(s->qcow_filename, 1024);
2811 ret = get_tmp_filename(s->qcow_filename, 1024);
2812 if (ret < 0) {
2813 g_free(s->qcow_filename);
2814 s->qcow_filename = NULL;
2815 return ret;
2816 }
2812
2813 bdrv_qcow = bdrv_find_format("qcow");
2814 options = parse_option_parameters("", bdrv_qcow->create_options, NULL);
2815 set_option_parameter_int(options, BLOCK_OPT_SIZE, s->sector_count * 512);
2816 set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
2817
2818 if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0)
2819 return -1;

--- 81 unchanged lines hidden ---
2817
2818 bdrv_qcow = bdrv_find_format("qcow");
2819 options = parse_option_parameters("", bdrv_qcow->create_options, NULL);
2820 set_option_parameter_int(options, BLOCK_OPT_SIZE, s->sector_count * 512);
2821 set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
2822
2823 if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0)
2824 return -1;

--- 81 unchanged lines hidden ---