Lines Matching refs:cdev
68 struct cuse_dev *cdev; member
369 struct cuse_dev *cdev; in cuse_dev_create() local
376 cdev = malloc(sizeof(*cdev)); in cuse_dev_create()
377 if (cdev == NULL) in cuse_dev_create()
380 memset(cdev, 0, sizeof(*cdev)); in cuse_dev_create()
382 cdev->mtod = mtod; in cuse_dev_create()
383 cdev->priv0 = priv0; in cuse_dev_create()
384 cdev->priv1 = priv1; in cuse_dev_create()
388 info.dev = cdev; in cuse_dev_create()
399 free(cdev); in cuse_dev_create()
403 TAILQ_INSERT_TAIL(&h_cuse, cdev, entry); in cuse_dev_create()
406 return (cdev); in cuse_dev_create()
411 cuse_dev_destroy(struct cuse_dev *cdev) in cuse_dev_destroy() argument
419 TAILQ_REMOVE(&h_cuse, cdev, entry); in cuse_dev_destroy()
422 error = ioctl(f_cuse, CUSE_IOCTL_DESTROY_DEV, &cdev); in cuse_dev_destroy()
426 free(cdev); in cuse_dev_destroy()
430 cuse_dev_get_priv0(struct cuse_dev *cdev) in cuse_dev_get_priv0() argument
432 return (cdev->priv0); in cuse_dev_get_priv0()
436 cuse_dev_get_priv1(struct cuse_dev *cdev) in cuse_dev_get_priv1() argument
438 return (cdev->priv1); in cuse_dev_get_priv1()
442 cuse_dev_set_priv0(struct cuse_dev *cdev, void *priv) in cuse_dev_set_priv0() argument
444 cdev->priv0 = priv; in cuse_dev_set_priv0()
448 cuse_dev_set_priv1(struct cuse_dev *cdev, void *priv) in cuse_dev_set_priv1() argument
450 cdev->priv1 = priv; in cuse_dev_set_priv1()
460 struct cuse_dev *cdev; in cuse_wait_and_process() local
470 cdev = info.dev; in cuse_wait_and_process()
478 enter.cdev = cdev; in cuse_wait_and_process()
488 if (cdev->mtod->cm_open != NULL) in cuse_wait_and_process()
489 error = (cdev->mtod->cm_open) (cdev, (int)info.fflags); in cuse_wait_and_process()
504 if (pe->cdev != cdev) in cuse_wait_and_process()
523 if (cdev->mtod->cm_close != NULL) in cuse_wait_and_process()
524 error = (cdev->mtod->cm_close) (cdev, (int)info.fflags); in cuse_wait_and_process()
530 if (cdev->mtod->cm_read != NULL) { in cuse_wait_and_process()
531 error = (cdev->mtod->cm_read) (cdev, (int)info.fflags, in cuse_wait_and_process()
539 if (cdev->mtod->cm_write != NULL) { in cuse_wait_and_process()
540 error = (cdev->mtod->cm_write) (cdev, (int)info.fflags, in cuse_wait_and_process()
548 if (cdev->mtod->cm_ioctl != NULL) { in cuse_wait_and_process()
549 error = (cdev->mtod->cm_ioctl) (cdev, (int)info.fflags, in cuse_wait_and_process()
557 if (cdev->mtod->cm_poll != NULL) { in cuse_wait_and_process()
558 error = (cdev->mtod->cm_poll) (cdev, (int)info.fflags, in cuse_wait_and_process()
568 if (pe->cdev != cdev) in cuse_wait_and_process()
615 cuse_dev_set_per_file_handle(struct cuse_dev *cdev, void *handle) in cuse_dev_set_per_file_handle() argument
620 if (pe == NULL || pe->cdev != cdev) in cuse_dev_set_per_file_handle()
628 cuse_dev_get_per_file_handle(struct cuse_dev *cdev) in cuse_dev_get_per_file_handle() argument
633 if (pe == NULL || pe->cdev != cdev) in cuse_dev_get_per_file_handle()
767 return (pe->cdev); in cuse_dev_get_current()