FreeBSD/sys/fs/fuse/fuse_device.c
/*
 * Resources are set up on a per-open basis
 */
Resources are set up on a per-open basis
Resources are set up on a per - open basis
static int
fuse_device_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
	struct fuse_data *fdata;
	int error;
	FS_DEBUG("device %p\n", dev);
	fdata = fdata_alloc(dev, td->td_ucred);
	error = devfs_set_cdevpriv(fdata, fdata_dtor);
	if (error != 0)
		fdata_trydestroy(fdata);
	else
		FS_DEBUG("%s: device opened by thread %d.\n", dev->si_name,
		    td->td_tid);
	return (error);
}
static int fuse_device_open ( struct cdev * dev , int oflags , int devtype , struct thread * td ) { struct fuse_data * fdata ; int error ; FS_DEBUG ( " \n " , dev ) ; fdata = fdata_alloc ( dev , td -> td_ucred ) ; error = devfs_set_cdevpriv ( fdata , fdata_dtor ) ; if ( error != 0 ) fdata_trydestroy ( fdata ) ; else FS_DEBUG ( " \n " , dev -> si_name , td -> td_tid ) ; return ( error ) ; }
Resources are set up on a per-open basis
Resources are set up on a per - open basis