bc: convert to "G trick" - this returns bc to zero bss increase
[oweals/busybox.git] / util-linux / lspci.c
index 514c3a4e0e8566a7e66ff73187fe9cbe184d71dd..0000fbfda456d1a556eca60d99a68fef18b988e6 100644 (file)
@@ -4,8 +4,30 @@
  *
  * Copyright (C) 2009  Malek Degachi <malek-degachi@laposte.net>
  *
- * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+//config:config LSPCI
+//config:      bool "lspci (5.7 kb)"
+//config:      default y
+//config:      #select PLATFORM_LINUX
+//config:      help
+//config:      lspci is a utility for displaying information about PCI buses in the
+//config:      system and devices connected to them.
+//config:
+//config:      This version uses sysfs (/sys/bus/pci/devices) only.
+
+//applet:IF_LSPCI(APPLET_NOEXEC(lspci, lspci, BB_DIR_USR_BIN, BB_SUID_DROP, lspci))
+
+//kbuild:lib-$(CONFIG_LSPCI) += lspci.o
+
+//usage:#define lspci_trivial_usage
+//usage:       "[-mk]"
+//usage:#define lspci_full_usage "\n\n"
+//usage:       "List all PCI devices"
+//usage:     "\n"
+//usage:     "\n       -m      Parsable output"
+//usage:     "\n       -k      Show driver"
+
 #include "libbb.h"
 
 enum {
@@ -65,11 +87,11 @@ static int FAST_FUNC fileAction(
 
        if (option_mask32 & OPT_m) {
                printf("%s \"Class %04x\" \"%04x\" \"%04x\" \"%04x\" \"%04x\"",
-                      pci_slot_name, pci_class, pci_vid, pci_did,
-                      pci_subsys_vid, pci_subsys_did);
+                       pci_slot_name, pci_class, pci_vid, pci_did,
+                       pci_subsys_vid, pci_subsys_did);
        } else {
                printf("%s Class %04x: %04x:%04x",
-                      pci_slot_name, pci_class, pci_vid, pci_did);
+                       pci_slot_name, pci_class, pci_vid, pci_did);
        }
 
        if ((option_mask32 & OPT_k) && driver) {