static void fd_put_buffer(void *opaque, const uint8_t *buf,

                          int64_t pos, int size)

{

    QEMUFileFD *s = opaque;

    ssize_t len;



    do {

        len = write(s->fd, buf, size);

    } while (len == -1 && errno == EINTR);



    if (len == -1)

        len = -errno;



    /* When the fd becomes writable again, register a callback to do

     * a put notify */

    if (len == -EAGAIN)

        qemu_set_fd_handler2(s->fd, NULL, NULL, fd_put_notify, s);

}

static void fd_put_buffer(void *opaque, const uint8_t *buf,

                          int64_t pos, int size)

{

    QEMUFileFD *s = opaque;

    ssize_t len;



    do {

        len = write(s->fd, buf, size);

    } while (len == -1 && errno == EINTR);



    if (len == -1)

        len = -errno;



    



    if (len == -EAGAIN)

        qemu_set_fd_handler2(s->fd, NULL, NULL, fd_put_notify, s);

}

static void FUNC_0(void *VAR_0, const uint8_t *VAR_1,

                          int64_t VAR_2, int VAR_3)

{

    QEMUFileFD *s = VAR_0;

    ssize_t len;



    do {

        len = write(s->fd, VAR_1, VAR_3);

    } while (len == -1 && errno == EINTR);



    if (len == -1)

        len = -errno;



    



    if (len == -EAGAIN)

        qemu_set_fd_handler2(s->fd, NULL, NULL, fd_put_notify, s);

}

static void FUNC_0(void *VAR_0, const uint8_t *VAR_1,
int64_t VAR_2, int VAR_3)
{ QEMUFileFD *s = VAR_0; ssize_t len; do { len = write(s->fd, VAR_1, VAR_3); } while (len == -1 && errno == EINTR); if (len == -1)
len = -errno; if (len == -EAGAIN)
qemu_set_fd_handler2(s->fd, NULL, NULL, fd_put_notify, s); }