FreeBSD/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c
/*
 * Open the specified file and return a pointer to a CTF container.  The file
 * can be either an ELF file or raw CTF file.  This is just a convenient
 * wrapper around ctf_fdopen() for callers.
 */
Open the specified file and return a pointer to a CTF container.  The file
can be either an ELF file or raw CTF file.  This is just a convenient
wrapper around ctf_fdopen() for callers.
Open the specified file and return a pointer to a CTF container . The file can be either an ELF file or raw CTF file . This is just a convenient wrapper around ctf_fdopen () for callers .
ctf_file_t *
ctf_open(const char *filename, int *errp)
{
	ctf_file_t *fp;
	int fd;
	if ((fd = open64(filename, O_RDONLY)) == -1) {
		if (errp != NULL)
			*errp = errno;
		return (NULL);
	}
	fp = ctf_fdopen(fd, errp);
	(void) close(fd);
	return (fp);
}
ctf_file_t * ctf_open ( const char * filename , int * errp ) { ctf_file_t * fp ; int fd ; if ( ( fd = open64 ( filename , O_RDONLY ) ) == -1 ) { if ( errp != NULL ) * errp = errno ; return ( NULL ) ; } fp = ctf_fdopen ( fd , errp ) ; ( void ) close ( fd ) ; return ( fp ) ; }
Open the specified file and return a pointer to a CTF container.
Open the specified file and return a pointer to a CTF container .