openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nbd/3.19-r0/nbd-3.19/nbd-server.c
int rawexpwrite_fully(off_t a, char* buf, size_t len, CLIENT* client, int fua)
{
    ssize_t ret = 0;

    while (len > 0 && (ret = rawexpwrite(a, buf, len, client, fua)) > 0)
    {
        a += ret;
        buf += ret;
        len -= ret;
    }
    return (ret < 0 || len != 0);
}
/**
 * Call rawexpwrite repeatedly until all data has been written.
 *
 * @param a The offset where the write should start
 * @param buf The buffer to write from
 * @param len The length of buf
 * @param client The client we're serving for
 * @param fua Flag to indicate 'Force Unit Access'
 * @return 0 on success, nonzero on failure
 **/
Call rawexpwrite repeatedly until all data has been written.
Call rawexpwrite repeatedly until all data has been written .
int rawexpwrite_fully(off_t a, char* buf, size_t len, CLIENT* client, int fua)
{
    ssize_t ret = 0;
    while (len > 0 && (ret = rawexpwrite(a, buf, len, client, fua)) > 0)
    {
        a += ret;
        buf += ret;
        len -= ret;
    }
    return (ret < 0 || len != 0);
}
int rawexpwrite_fully ( off_t a , char * buf , size_t len , CLIENT * client , int fua ) { ssize_t ret = 0 ; while ( len > 0 && ( ret = rawexpwrite ( a , buf , len , client , fua ) ) > 0 ) { a += ret ; buf += ret ; len -= ret ; } return ( ret < 0 || len != 0 ) ; }
Call rawexpwrite repeatedly until all data has been written.
Call rawexpwrite repeatedly until all data has been written .