On Tue, Jun 30, 2009 at 06:23:43AM -0600, Matthew Wilcox wrote: > I'd be inclined to make lspci error out when trying -M with sysfs or procfs. ... here's the patch to do that: ---- Add sysfs to the list of access methods that don't work with -M. Change the warning to an error; there's no point in proceeding. diff --git a/ls-map.c b/ls-map.c index c812f50..150aeb9 100644 --- a/ls-map.c +++ b/ls-map.c @@ -164,8 +164,9 @@ void map_the_bus(void) { if (pacc->method == PCI_ACCESS_PROC_BUS_PCI || + pacc->method == PCI_ACCESS_SYS_BUS_PCI || pacc->method == PCI_ACCESS_DUMP) - printf("WARNING: Bus mapping can be reliable only with direct hardware access enabled.\n\n"); + pacc->error("Bus mapping only works with direct hardware access"); bus_info = xmalloc(sizeof(struct bus_info) * 256); memset(bus_info, 0, sizeof(struct bus_info) * 256); if (filter.bus >= 0) -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html