openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nbd/3.19-r0/nbd-3.19/cliserv.c
int writeit(int f, void* buf, size_t len)
{
    ssize_t res;
    while (len > 0)
    {
        DEBUG("+");
        if ((res = write(f, buf, len)) <= 0)
        {
            switch (errno)
            {
                case EAGAIN:
                    break;
                default:
                    err_nonfatal("Send failed: %m");
                    return -1;
            }
        }
        len -= res;
        buf += res;
    }
    return 0;
}
/**
 * Write data from a buffer into a filedescriptor
 *
 * @param f a file descriptor
 * @param buf a buffer containing data
 * @param len the number of bytes to be written
 * @return 0 on success, or -1 if the socket was closed
 **/
Write data from a buffer into a filedescriptor
@param f a file descriptor
@param buf a buffer containing data
@param len the number of bytes to be written
@return 0 on success, or -1 if the socket was closed
Write data from a buffer into a filedescriptor @param f a file descriptor @param buf a buffer containing data @param len the number of bytes to be written @return 0 on success or - 1 if the socket was closed
int writeit(int f, void* buf, size_t len)
{
    ssize_t res;
    while (len > 0)
    {
        DEBUG("+");
        if ((res = write(f, buf, len)) <= 0)
        {
            switch (errno)
            {
                case EAGAIN:
                    break;
                default:
                    err_nonfatal("Send failed: %m");
                    return -1;
            }
        }
        len -= res;
        buf += res;
    }
    return 0;
}
int writeit ( int f , void * buf , size_t len ) { ssize_t res ; while ( len > 0 ) { DEBUG ( " " ) ; if ( ( res = write ( f , buf , len ) ) <= 0 ) { switch ( errno ) { case EAGAIN : break ; default : err_nonfatal ( " " ) ; return -1 ; } } len -= res ; buf += res ; } return 0 ; }
Write data from a buffer into a filedescriptor
 @param f a file descriptor
 @param buf a buffer containing data
 @param len the number of bytes to be written
 @return 0 on success, or -1 if the socket was closed
Write data from a buffer into a filedescriptor @param f a file descriptor @param buf a buffer containing data @param len the number of bytes to be written @return 0 on success or - 1 if the socket was closed