FreeBSD/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c
/*
 * Write the uncompressed CTF data stream to the specified file descriptor.
 * This is useful for saving the results of dynamic CTF containers.
 */
Write the uncompressed CTF data stream to the specified file descriptor.
This is useful for saving the results of dynamic CTF containers.
Write the uncompressed CTF data stream to the specified file descriptor . This is useful for saving the results of dynamic CTF containers .
int
ctf_write(ctf_file_t *fp, int fd)
{
	const uchar_t *buf = fp->ctf_base;
	ssize_t resid = fp->ctf_size;
	ssize_t len;
	while (resid != 0) {
		if ((len = write(fd, buf, resid)) <= 0)
			return (ctf_set_errno(fp, errno));
		resid -= len;
		buf += len;
	}
	return (0);
}
int ctf_write ( ctf_file_t * fp , int fd ) { const uchar_t * buf = fp -> ctf_base ; ssize_t resid = fp -> ctf_size ; ssize_t len ; while ( resid != 0 ) { if ( ( len = write ( fd , buf , resid ) ) <= 0 ) return ( ctf_set_errno ( fp , errno ) ) ; resid -= len ; buf += len ; } return ( 0 ) ; }
Write the uncompressed CTF data stream to the specified file descriptor.
Write the uncompressed CTF data stream to the specified file descriptor .