@@ -161,11 +161,15 @@ map_bridges(void)
}
void
-map_the_bus(void)
+map_the_bus(int map_mode)
{
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");
+ if (map_mode > 1)
+ pacc->warning("Bus mapping only works properly with direct hardware access");
+ else
+ 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)
@@ -1005,7 +1005,7 @@ main(int argc, char **argv)
pci_init(pacc);
if (opt_map_mode)
- map_the_bus();
+ map_the_bus(opt_map_mode);
else
{
scan_devices();
@@ -77,4 +77,4 @@ void show_forest(void);
/* ls-map.c */
-void map_the_bus(void);
+void map_the_bus(int map_mode);
@@ -157,11 +157,14 @@ as the map of PCI ID's handled by kernel modules. By default, lspci uses
Applies only to Linux systems with recent enough module tools.
.TP
.B -M
-Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
-those behind misconfigured bridges etc. This option is available only to root and it
-gives meaningful results only if combined with direct hardware access mode (otherwise
-the results are identical to normal listing modes, modulo bugs in lspci). Please note
-that the bus mapper doesn't support PCI domains and scans only domain 0.
+Invoke bus mapping mode which performs a thorough scan of all PCI devices,
+including those behind misconfigured bridges, etc. This option only works
+with a direct hardware access mode, which usually requires root privileges.
+Please note that the bus mapper only scans PCI domain 0.
+.TP
+.B -MM
+Forces bus mapping mode to try even without a direct hardware access mode.
+The results may not be very useful.
.TP
.B --version
Shows