plugins/nbd/nbd.c
static int
write_full (int fd, const void *buf, size_t len)
{
  ssize_t r;

  while (len) {
    r = write (fd, buf, len);
    if (r < 0) {
      if (errno == EINTR || errno == EAGAIN)
        continue;
      return -1;
    }
    buf += r;
    len -= r;
  }
  return 0;
}
/* Write an entire buffer, returning 0 on success or -1 with errno set. */
Write an entire buffer, returning 0 on success or -1 with errno set.
Write an entire buffer returning 0 on success or - 1 with errno set .
static int
write_full (int fd, const void *buf, size_t len)
{
  ssize_t r;
  while (len) {
    r = write (fd, buf, len);
    if (r < 0) {
      if (errno == EINTR || errno == EAGAIN)
        continue;
      return -1;
    }
    buf += r;
    len -= r;
  }
  return 0;
}
static int write_full ( int fd , const void * buf , size_t len ) { ssize_t r ; while ( len ) { r = write ( fd , buf , len ) ; if ( r < 0 ) { if ( errno == EINTR || errno == EAGAIN ) continue ; return -1 ; } buf += r ; len -= r ; } return 0 ; }
Write an entire buffer, returning 0 on success or -1 with errno set.
Write an entire buffer returning 0 on success or - 1 with errno set .