bool GetInfo_IO_Ports(QTreeWidget* tree) { #ifdef HAVE_DEVINFO_H /* Oh neat, current now has a neat little utility called devinfo */ if (devinfo_init()) return false; devinfo_foreach_rman(print_ioports, tree); return true; #else return false; #endif }
bool GetInfo_DMA (QListView *lbox) { #ifdef HAVE_DEVINFO_H /* Oh neat, current now has a neat little utility called devinfo */ if (devinfo_init()) return false; devinfo_foreach_rman(print_dma, lbox); return true; #else return false; #endif }
int main(int argc, char **argv) { int ch; while ((ch = getopt_long(argc, argv, "adh:p:uv", longopts, NULL)) != -1) { switch (ch) { case 'a': all_flag++; break; case 'd': dump_flag++; break; case 'h': linker_hints = optarg; break; case 'p': nomatch_str = optarg; break; case 'u': unbound_flag++; break; case 'v': verbose_flag++; break; default: usage(); } } argc -= optind; argv += optind; if (argc >= 1) usage(); read_linker_hints(); if (dump_flag) { search_hints(NULL, NULL, NULL); exit(0); } if (devinfo_init()) err(1, "devinfo_init"); if ((root = devinfo_handle_to_device(DEVINFO_ROOT_DEVICE)) == NULL) errx(1, "can't find root device"); if (nomatch_str != NULL) find_nomatch(nomatch_str); else devinfo_foreach_device_child(root, find_unmatched, (void *)0); devinfo_free(); }
static int acpi0_present(void) { struct devinfo_dev *root; int found; found = 0; devinfo_init(); root = devinfo_handle_to_device(DEVINFO_ROOT_DEVICE); if (root != NULL) found = devinfo_foreach_device_child(root, acpi0_check, NULL); devinfo_free(); return found; }
bool GetInfo_IRQ(QTreeWidget* tree) { #ifdef HAVE_DEVINFO_H /* systat lists the interrupts assigned to devices as well as how many were generated. Parsing its output however is about as fun as a sandpaper enema. The best idea would probably be to rip out the guts of systat. Too bad it's not very well commented */ /* Oh neat, current now has a neat little utility called devinfo */ if (devinfo_init()) return false; devinfo_foreach_rman(print_irq, tree); return true; #else return false; #endif }