plugins/nbd/nbd.c
/* Write data to the file. */
Write data to the file.
Write data to the file .
static int
nbd_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset,
            uint32_t flags)
{
  struct handle *h = handle;
  int c;
  assert (!(flags & ~NBDKIT_FLAG_FUA));
  c = nbd_request_full (h, flags & NBDKIT_FLAG_FUA ? NBD_CMD_FLAG_FUA : 0,
                        NBD_CMD_WRITE, offset, count, buf, NULL);
  return c < 0 ? c : nbd_reply (h, c);
}
static int nbd_pwrite ( void * handle , const void * buf , uint32_t count , uint64_t offset , uint32_t flags ) { struct handle * h = handle ; int c ; assert ( ! ( flags & ~ NBDKIT_FLAG_FUA ) ) ; c = nbd_request_full ( h , flags & NBDKIT_FLAG_FUA ? NBD_CMD_FLAG_FUA : 0 , NBD_CMD_WRITE , offset , count , buf , NULL ) ; return c < 0 ? c : nbd_reply ( h , c ) ; }
Write data to the file.
Write data to the file .