Superuser/jni/su/pts.c
// Ensures all the data is written out
Ensures all the data is written out
Ensures all the data is written out
static int write_blocking(int fd, char *buf, size_t bufsz) {
    ssize_t ret, written;
    written = 0;
    do {
        ret = write(fd, buf + written, bufsz - written);
        if (ret == -1) return -1;
        written += ret;
    } while (written < bufsz);
    return 0;
}
static int write_blocking ( int fd , char * buf , size_t bufsz ) { ssize_t ret , written ; written = 0 ; do { ret = write ( fd , buf + written , bufsz - written ) ; if ( ret == -1 ) return -1 ; written += ret ; } while ( written < bufsz ) ; return 0 ; }
Ensures all the data is written out
Ensures all the data is written out