aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-11-15 12:18:18 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-11-18 14:58:37 +0100
commitacc70aa8d175b62847dc9a43db56e47011d24ec3 (patch)
treec355e2cc4576ffaa0ef63030eb964c23aadc8291 /src
parent48f7843e3021162a66fed91ddc0809446a679be0 (diff)
downloadseabios-hppa-acc70aa8d175b62847dc9a43db56e47011d24ec3.zip
seabios-hppa-acc70aa8d175b62847dc9a43db56e47011d24ec3.tar.gz
seabios-hppa-acc70aa8d175b62847dc9a43db56e47011d24ec3.tar.bz2
Revert "geometry: Add boot_lchs_find_*() utility functions"
This reverts commit ad2910949b1886deba24f574cee76cdc75e7cabe.
Diffstat (limited to 'src')
-rw-r--r--src/boot.c82
-rw-r--r--src/util.h6
2 files changed, 0 insertions, 88 deletions
diff --git a/src/boot.c b/src/boot.c
index 9248fab..b3d4930 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -157,88 +157,6 @@ loadBootDevices(void)
}
}
-// Search the bootdevices list for the given glob pattern.
-static BootDevice *
-bootdevice_find(const char *glob)
-{
- dprintf(1, "Searching bootdevices for: %s\n", glob);
- int i;
- for (i = 0; i < BootDeviceCount; i++)
- if (glob_prefix(glob, BootDevices[i].name))
- return &BootDevices[i];
- return NULL;
-}
-
-static BootDevice *
-bootdevice_find_pci_device(struct pci_device *pci)
-{
- // Find pci device - for example: /pci@i0cf8/ethernet@5
- char desc[256];
- build_pci_path(desc, sizeof(desc), "*", pci);
- return bootdevice_find(desc);
-}
-
-static BootDevice *
-bootdevice_find_scsi_device(struct pci_device *pci, int target, int lun)
-{
- if (!pci)
- // support only pci machine for now
- return NULL;
- // Find scsi drive - for example: /pci@i0cf8/scsi@5/channel@0/disk@1,0
- char desc[256], *p;
- p = build_pci_path(desc, sizeof(desc), "*", pci);
- snprintf(p, desc+sizeof(desc)-p, "/*@0/*@%x,%x", target, lun);
- return bootdevice_find(desc);
-}
-
-static BootDevice *
-bootdevice_find_ata_device(struct pci_device *pci, int chanid, int slave)
-{
- if (!pci)
- // support only pci machine for now
- return NULL;
- // Find ata drive - for example: /pci@i0cf8/ide@1,1/drive@1/disk@0
- char desc[256], *p;
- p = build_pci_path(desc, sizeof(desc), "*", pci);
- snprintf(p, desc+sizeof(desc)-p, "/drive@%x/disk@%x", chanid, slave);
- return bootdevice_find(desc);
-}
-
-int boot_lchs_find_pci_device(struct pci_device *pci, struct chs_s *chs)
-{
- BootDevice *b = bootdevice_find_pci_device(pci);
- if (!b)
- return -1;
- chs->cylinder = (u16)b->lcyls;
- chs->head = (u16)b->lheads;
- chs->sector = (u16)b->lsecs;
- return 0;
-}
-
-int boot_lchs_find_scsi_device(struct pci_device *pci, int target, int lun,
- struct chs_s *chs)
-{
- BootDevice *b = bootdevice_find_scsi_device(pci, target, lun);
- if (!b)
- return -1;
- chs->cylinder = (u16)b->lcyls;
- chs->head = (u16)b->lheads;
- chs->sector = (u16)b->lsecs;
- return 0;
-}
-
-int boot_lchs_find_ata_device(struct pci_device *pci, int chanid, int slave,
- struct chs_s *chs)
-{
- BootDevice *b = bootdevice_find_ata_device(pci, chanid, slave);
- if (!b)
- return -1;
- chs->cylinder = (u16)b->lcyls;
- chs->head = (u16)b->lheads;
- chs->sector = (u16)b->lsecs;
- return 0;
-}
-
/****************************************************************
* Boot priority ordering
diff --git a/src/util.h b/src/util.h
index b173fa8..e2afc80 100644
--- a/src/util.h
+++ b/src/util.h
@@ -38,12 +38,6 @@ struct usbdevice_s;
int bootprio_find_usb(struct usbdevice_s *usbdev, int lun);
int get_keystroke_full(int msec);
int get_keystroke(int msec);
-struct chs_s;
-int boot_lchs_find_pci_device(struct pci_device *pci, struct chs_s *chs);
-int boot_lchs_find_scsi_device(struct pci_device *pci, int target, int lun,
- struct chs_s *chs);
-int boot_lchs_find_ata_device(struct pci_device *pci, int chanid, int slave,
- struct chs_s *chs);
// bootsplash.c
void enable_vga_console(void);