Lines Matching refs:hd
615 efipart_hdinfo_add_node(pdinfo_t *hd, EFI_DEVICE_PATH *node)
622 parent = hd->pd_parent;
631 hd->pd_unit = ptr->pd_unit + 1;
633 hd->pd_unit = 0;
635 hd->pd_unit = ((HARDDRIVE_DEVICE_PATH *)node)->PartitionNumber;
638 hd->pd_devsw = &efipart_hddev;
639 STAILQ_INSERT_TAIL(&parent->pd_part, hd, pd_link);
649 efipart_hdinfo_add_filepath(pdinfo_t *hd, FILEPATH_DEVICE_PATH *node)
657 hd->pd_unit = last->pd_unit + 1;
659 hd->pd_unit = 0;
665 free(hd);
677 hd->pd_devsw = &efipart_hddev;
678 STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link);
684 hd->pd_unit = (int)strtol(p, NULL, 0);
688 free(hd);
701 free(hd);
705 hd->pd_parent = last;
706 hd->pd_devsw = &efipart_hddev;
707 STAILQ_INSERT_TAIL(&last->pd_part, hd, pd_link);
712 efipart_hdinfo_add(pdinfo_t *hd)
717 if (hd == NULL)
720 parent = hd->pd_parent;
725 if (efi_devpath_match(pd->pd_devpath, hd->pd_devpath)) {
726 STAILQ_REMOVE(&pdinfo, hd, pdinfo, pd_link);
735 if ((node = efi_devpath_last_node(hd->pd_devpath)) == NULL)
740 efipart_hdinfo_add_filepath(hd,
746 efipart_hdinfo_add_node(hd, node);
752 hd->pd_unit = last->pd_unit + 1;
754 hd->pd_unit = 0;
757 hd->pd_devsw = &efipart_hddev;
758 STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link);
762 efipart_testhd(pdinfo_t *hd, pdinfo_t *data __unused)
764 if (efipart_testfd(hd, NULL))
767 if (efipart_testcd(hd, NULL))
777 pdinfo_t *hd;
779 while ((hd = efipart_get_pd(&pdinfo, efipart_testhd, NULL)) != NULL)
780 efipart_hdinfo_add(hd);