static int raw_create(const char *filename, QEMUOptionParameter *options)

{

    int fd;

    int64_t total_size = 0;



    /* Read out options */

    while (options && options->name) {

        if (!strcmp(options->name, BLOCK_OPT_SIZE)) {

            total_size = options->value.n / 512;

        }

        options++;

    }



    fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,

              0644);

    if (fd < 0)

        return -EIO;

    ftruncate(fd, total_size * 512);

    close(fd);

    return 0;

}

static int raw_create(const char *filename, QEMUOptionParameter *options)

{

    int fd;

    int64_t total_size = 0;



    

    while (options && options->name) {

        if (!strcmp(options->name, BLOCK_OPT_SIZE)) {

            total_size = options->value.n / 512;

        }

        options++;

    }



    fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,

              0644);

    if (fd < 0)

        return -EIO;

    ftruncate(fd, total_size * 512);

    close(fd);

    return 0;

}

    if (fd < 0)         return -EIO;     ftruncate(fd, total_size * 512);     close(fd);     return 0;
static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1)

{

    int VAR_2;

    int64_t total_size = 0;



    

    while (VAR_1 && VAR_1->name) {

        if (!strcmp(VAR_1->name, BLOCK_OPT_SIZE)) {

            total_size = VAR_1->value.n / 512;

        }

        VAR_1++;

    }



    VAR_2 = open(VAR_0, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,

              0644);

    if (VAR_2 < 0)

        return -EIO;

    ftruncate(VAR_2, total_size * 512);

    close(VAR_2);

    return 0;

}

static int FUNC_0(const char *VAR_0, QEMUOptionParameter *VAR_1)
{ int VAR_2; int64_t total_size = 0; while (VAR_1 && VAR_1->name) { if (!strcmp(VAR_1->name, BLOCK_OPT_SIZE)) { total_size = VAR_1->value.n / 512; } VAR_1++; } VAR_2 = open(VAR_0, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
0644); if (VAR_2 < 0)
return -EIO; ftruncate(VAR_2, total_size * 512); close(VAR_2); return 0; }