/* * Print resource information for this device and resource manager. */ int print_device_rman_resources(struct devinfo_rman *rman, void *arg) { struct indent_arg *ia = (struct indent_arg *)arg; int indent, i; indent = ia->indent; /* check whether there are any resources matching this device */ ia->indent = 0; if (devinfo_foreach_rman_resource(rman, print_device_matching_resource, ia) != 0) { /* XXX: Resources should have types... */ if (iflag && !rflag && strncmp("Interrupt", rman->dm_desc, 9) != 0) goto skip; /* there are, print header */ for (i = 0; i < indent; i++) printf(" "); printf("%s:\n", rman->dm_desc); /* print resources */ ia->indent = indent + 4; devinfo_foreach_rman_resource(rman, print_device_matching_resource, ia); } skip: ia->indent = indent; return(0); }
/* * Print resource information for this device and resource manager. */ int print_device_rman_resources(struct devinfo_rman *rman, void *arg) { struct indent_arg *ia = (struct indent_arg *)arg; int indent, i; indent = ia->indent; /* check whether there are any resources matching this device */ ia->indent = 0; if (devinfo_foreach_rman_resource(rman, print_device_matching_resource, ia) != 0) { /* there are, print header */ for (i = 0; i < indent; i++) printf(" "); printf("%s:\n", rman->dm_desc); /* print resources */ ia->indent = indent + 4; devinfo_foreach_rman_resource(rman, print_device_matching_resource, ia); } ia->indent = indent; return(0); }
int print_ioports(struct devinfo_rman *rman, void *arg) { QListView *lbox = (QListView *)arg; if (strcmp(rman->dm_desc, "I/O ports")==0) { (void)new QListViewItem(lbox, lbox->lastItem(), rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } else if (strcmp(rman->dm_desc, "I/O memory addresses")==0) { (void)new QListViewItem(lbox, lbox->lastItem(), rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); }
int print_dma(struct devinfo_rman *rman, void *arg) { QListView *lbox = (QListView *)arg; if (strcmp(rman->dm_desc, "DMA request lines")==0) { (void)new QListViewItem(lbox, lbox->lastItem(), rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); }
int print_irq(struct devinfo_rman *rman, void *arg) { QListView *lbox = (QListView *)arg; if (strcmp(rman->dm_desc, "Interrupt request lines")==0) { (void)new QListViewItem(lbox, 0, rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); }
int print_ioports(struct devinfo_rman *rman, void *arg) { QTreeWidget* tree = (QTreeWidget*) arg; if (strcmp(rman->dm_desc, "I/O ports")==0) { QStringList list; list << rman->dm_desc; new QTreeWidgetItem(tree, list); devinfo_foreach_rman_resource(rman, print_resource, arg); } else if (strcmp(rman->dm_desc, "I/O memory addresses")==0) { QStringList list; list << rman->dm_desc; new QTreeWidgetItem(tree, list); devinfo_foreach_rman_resource(rman, print_resource, arg); } return 0; }
int print_dma(struct devinfo_rman *rman, void *arg) { QTreeWidget* tree = (QTreeWidget *)arg; if (strcmp(rman->dm_desc, "DMA request lines")==0) { QStringList list; list << rman->dm_desc; new QTreeWidgetItem(tree, list); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); }