Lines Matching refs:mnt
347 cd9660_mnt_t *mnt; in cd9660_open() local
357 STAILQ_FOREACH(mnt, &mnt_list, cd_link) { in cd9660_open()
358 if (dev->d_dev->dv_type == mnt->cd_dev->d_dev->dv_type && in cd9660_open()
359 dev->d_unit == mnt->cd_dev->d_unit) in cd9660_open()
364 if (mnt == NULL) in cd9660_open()
367 rec = mnt->cd_rec; in cd9660_open()
679 cd9660_mnt_t *mnt; in cd9660_mount() local
684 mnt = calloc(1, sizeof(*mnt)); in cd9660_mount()
685 if (mnt == NULL) in cd9660_mount()
687 mnt->cd_fd = -1; in cd9660_mount()
692 mnt->cd_fd = open(fs, O_RDONLY); in cd9660_mount()
694 if (mnt->cd_fd == -1) in cd9660_mount()
697 f = fd2open_file(mnt->cd_fd); in cd9660_mount()
700 mnt->cd_dev = f->f_devdata; in cd9660_mount()
701 errno = cd9660_read_dr(f, &mnt->cd_rec); in cd9660_mount()
702 STAILQ_INSERT_TAIL(&mnt_list, mnt, cd_link); in cd9660_mount()
709 free(mnt->cd_dev); in cd9660_mount()
710 if (mnt->cd_fd >= 0) in cd9660_mount()
711 close(mnt->cd_fd); in cd9660_mount()
712 free(mnt); in cd9660_mount()
714 *data = mnt; in cd9660_mount()
722 cd9660_mnt_t *mnt = data; in cd9660_unmount() local
724 STAILQ_REMOVE(&mnt_list, mnt, cd9660_mnt, cd_link); in cd9660_unmount()
725 close(mnt->cd_fd); in cd9660_unmount()
726 free(mnt); in cd9660_unmount()