Lines Matching refs:fsd
507 grub_fsdesc_t *fsd = NULL; in grub_get_rootfsd() local
511 fsd = (grub_fsdesc_t *)root->gr_fs + GRBM_UFS; in grub_get_rootfsd()
513 fsd = (grub_fsdesc_t *)root->gr_fs + GRBM_ZFS_BOOTFS; in grub_get_rootfsd()
515 return (fsd); in grub_get_rootfsd()
523 grub_fsd_get_mountp(grub_fsdesc_t *fsd, char *fstyp) in grub_fsd_get_mountp() argument
530 fsd->gfs_mountp[0] = 0; in grub_fsd_get_mountp()
535 mpref.mnt_special = fsd->gfs_dev; in grub_fsd_get_mountp()
539 (void) strlcpy(fsd->gfs_mountp, mp.mnt_mountp, in grub_fsd_get_mountp()
540 sizeof (fsd->gfs_mountp)); in grub_fsd_get_mountp()
555 grub_fsd_mount_tmp(grub_fsdesc_t *fsd, const char *fstyp) in grub_fsd_mount_tmp() argument
564 assert(fsd); in grub_fsd_mount_tmp()
565 assert(!fsd->gfs_is_tmp_mounted); in grub_fsd_mount_tmp()
567 fsd->gfs_mountp[0] = 0; in grub_fsd_mount_tmp()
578 pos = strrchr(fsd->gfs_dev, '/'); in grub_fsd_mount_tmp()
579 pos = (pos == NULL) ? fsd->gfs_dev : pos + 1; in grub_fsd_mount_tmp()
581 (void) snprintf(fsd->gfs_mountp, sizeof (fsd->gfs_mountp), in grub_fsd_mount_tmp()
583 if (mkdtemp(fsd->gfs_mountp) != NULL) { in grub_fsd_mount_tmp()
584 if ((rc = mount(fsd->gfs_dev, fsd->gfs_mountp, in grub_fsd_mount_tmp()
591 (void) rmdir(fsd->gfs_mountp); in grub_fsd_mount_tmp()
598 fsd->gfs_mountp[0] = 0; in grub_fsd_mount_tmp()
606 fsd->gfs_is_tmp_mounted += (rc == 0); in grub_fsd_mount_tmp()
614 grub_fsd_umount_tmp(grub_fsdesc_t *fsd) in grub_fsd_umount_tmp() argument
616 if (fsd == NULL) in grub_fsd_umount_tmp()
619 if (fsd->gfs_is_tmp_mounted) { in grub_fsd_umount_tmp()
620 if (fsd->gfs_mountp[0] != 0) { in grub_fsd_umount_tmp()
621 (void) umount2(fsd->gfs_mountp, 0); in grub_fsd_umount_tmp()
622 (void) rmdir(fsd->gfs_mountp); in grub_fsd_umount_tmp()
623 fsd->gfs_mountp[0] = 0; in grub_fsd_umount_tmp()
625 fsd->gfs_is_tmp_mounted = 0; in grub_fsd_umount_tmp()