static int qed_write_header_sync(BDRVQEDState *s)

{

    QEDHeader le;

    int ret;



    qed_header_cpu_to_le(&s->header, &le);

    ret = bdrv_pwrite(s->bs->file, 0, &le, sizeof(le));

    if (ret != sizeof(le)) {

        return ret;

    }

    return 0;

}

static int qed_write_header_sync(BDRVQEDState *s)

{

    QEDHeader le;

    int ret;



    qed_header_cpu_to_le(&s->header, &le);

    ret = bdrv_pwrite(s->bs->file, 0, &le, sizeof(le));

    if (ret != sizeof(le)) {

        return ret;

    }

    return 0;

}

static int FUNC_0(BDRVQEDState *VAR_0)

{

    QEDHeader le;

    int VAR_1;



    qed_header_cpu_to_le(&VAR_0->header, &le);

    VAR_1 = bdrv_pwrite(VAR_0->bs->file, 0, &le, sizeof(le));

    if (VAR_1 != sizeof(le)) {

        return VAR_1;

    }

    return 0;

}

static int FUNC_0(BDRVQEDState *VAR_0)
{ QEDHeader le; int VAR_1; qed_header_cpu_to_le(&VAR_0->header, &le); VAR_1 = bdrv_pwrite(VAR_0->bs->file, 0, &le, sizeof(le)); if (VAR_1 != sizeof(le)) { return VAR_1; } return 0; }