static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)

{

    int ret = 0;

    int64_t total_size = 0;

    NFSClient *client = g_new0(NFSClient, 1);

    QDict *options = NULL;



    client->aio_context = qemu_get_aio_context();



    /* Read out options */

    total_size = ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0),

                          BDRV_SECTOR_SIZE);



    options = qdict_new();

    ret = nfs_parse_uri(url, options, errp);

    if (ret < 0) {

        goto out;

    }



    ret = nfs_client_open(client, options, O_CREAT, errp, 0);

    if (ret < 0) {

        goto out;

    }

    ret = nfs_ftruncate(client->context, client->fh, total_size);

    nfs_client_close(client);

out:


    g_free(client);

    return ret;

}
static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)

{

    int ret = 0;

    int64_t total_size = 0;

    NFSClient *client = g_new0(NFSClient, 1);

    QDict *options = NULL;



    client->aio_context = qemu_get_aio_context();



    

    total_size = ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0),

                          BDRV_SECTOR_SIZE);



    options = qdict_new();

    ret = nfs_parse_uri(url, options, errp);

    if (ret < 0) {

        goto out;

    }



    ret = nfs_client_open(client, options, O_CREAT, errp, 0);

    if (ret < 0) {

        goto out;

    }

    ret = nfs_ftruncate(client->context, client->fh, total_size);

    nfs_client_close(client);

out:


    g_free(client);

    return ret;

}
static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)

{

    int VAR_3 = 0;

    int64_t total_size = 0;

    NFSClient *client = g_new0(NFSClient, 1);

    QDict *options = NULL;



    client->aio_context = qemu_get_aio_context();



    

    total_size = ROUND_UP(qemu_opt_get_size_del(VAR_1, BLOCK_OPT_SIZE, 0),

                          BDRV_SECTOR_SIZE);



    options = qdict_new();

    VAR_3 = nfs_parse_uri(VAR_0, options, VAR_2);

    if (VAR_3 < 0) {

        goto out;

    }



    VAR_3 = nfs_client_open(client, options, O_CREAT, VAR_2, 0);

    if (VAR_3 < 0) {

        goto out;

    }

    VAR_3 = nfs_ftruncate(client->context, client->fh, total_size);

    nfs_client_close(client);

out:


    g_free(client);

    return VAR_3;

}
static int FUNC_0(const char *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{ int VAR_3 = 0; int64_t total_size = 0; NFSClient *client = g_new0(NFSClient, 1); QDict *options = NULL; client->aio_context = qemu_get_aio_context(); total_size = ROUND_UP(qemu_opt_get_size_del(VAR_1, BLOCK_OPT_SIZE, 0),
BDRV_SECTOR_SIZE); options = qdict_new(); VAR_3 = nfs_parse_uri(VAR_0, options, VAR_2); if (VAR_3 < 0) { goto out; } VAR_3 = nfs_client_open(client, options, O_CREAT, VAR_2, 0); if (VAR_3 < 0) { goto out; } VAR_3 = nfs_ftruncate(client->context, client->fh, total_size); nfs_client_close(client); out:
g_free(client); return VAR_3; }