]> mj.ucw.cz Git - pciutils.git/blobdiff - lspci.c
lspci: Remove unnecessary !verbose check in show_range()
[pciutils.git] / lspci.c
diff --git a/lspci.c b/lspci.c
index 3dabbdeda711560049ccd677c6e59998c4e379ba..7418b072c0c23783e5763a4b8091b9cc24d6f793 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -41,7 +41,7 @@ static char help_msg[] =
 "-t\t\tShow bus tree\n"
 "\n"
 "Display options:\n"
-"-v\t\tBe verbose (-vv for very verbose)\n"
+"-v\t\tBe verbose (-vv or -vvv for higher verbosity)\n"
 #ifdef PCI_OS_LINUX
 "-k\t\tShow kernel drivers handling each device\n"
 #endif
@@ -376,17 +376,11 @@ show_size(u64 x)
 static void
 show_range(char *prefix, u64 base, u64 limit, int is_64bit)
 {
-  if (base > limit)
+  if (base > limit && verbose < 3)
     {
-      if (!verbose)
-       return;
-      else if (verbose < 3)
-       {
-         printf("%s: None\n", prefix);
-         return;
-       }
+      printf("%s: None\n", prefix);
+      return;
     }
-
   printf("%s: ", prefix);
   if (is_64bit)
     printf("%016" PCI_U64_FMT_X "-%016" PCI_U64_FMT_X, base, limit);
@@ -1077,9 +1071,6 @@ main(int argc, char **argv)
   if (optind < argc)
     goto bad;
 
-  if (opt_tree && opt_filter)
-    die("Tree mode does not support filtering");
-
   if (opt_query_dns)
     {
       pacc->id_lookup_mode |= PCI_LOOKUP_NETWORK;
@@ -1103,7 +1094,7 @@ main(int argc, char **argv)
       if (need_topology)
        grow_tree();
       if (opt_tree)
-       show_forest();
+       show_forest(opt_filter ? &filter : NULL);
       else
        show();
     }