Decend the list of ioaddrs and maddrs for eisa devices and print them out

for lsdev -c.
This commit is contained in:
Justin T. Gibbs 1996-01-31 18:06:52 +00:00
parent f6f6004c29
commit 62b98eeff0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13806

View File

@ -157,16 +157,27 @@ print_isa(struct devconf *dc)
}
}
static void
print_eisa_resvaddrs(struct resvlist *list)
{
resvaddr_t *rp;
for (rp = list->lh_first; rp; rp = rp->links.le_next)
printf(" %#lx-%#lx%s", rp->addr, rp->addr + rp->size - 1,
rp->links.le_next ? "," : "");
}
static void
print_eisa(struct devconf *dc)
{
struct eisa_device *e_dev = (struct eisa_device *)dc->dc_data;
printf("%s%d\tat eisa0 slot %d # %#lx-%#lx",
dc->dc_name,
dc->dc_unit,
e_dev->ioconf.slot,
e_dev->ioconf.iobase,
e_dev->ioconf.iobase + e_dev->ioconf.iosize - 1);
printf("%s%d\tat eisa0 slot %d #",
dc->dc_name,
dc->dc_unit,
e_dev->ioconf.slot);
print_eisa_resvaddrs(&e_dev->ioconf.ioaddrs);
print_eisa_resvaddrs(&e_dev->ioconf.maddrs);
if(e_dev->ioconf.irq)
printf(" irq %d", ffs(e_dev->ioconf.irq) - 1);
}