<div dir="ltr">Ignore this one. It is just a wrapper command for debug. There is <div>discussion before to consider this.</div><div><br></div><div>--joel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 9, 2016 at 4:25 PM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Joel Sherrill <<a href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>><br>
<br>
---<br>
 testsuites/samples/fileio/Makefile.am  |  2 +-<br>
 testsuites/samples/fileio/init.c       |  5 +++-<br>
 testsuites/samples/fileio/main_lspci.c | 43 ++++++++++++++++++++++++++++++++++<br>
 3 files changed, 48 insertions(+), 2 deletions(-)<br>
 create mode 100644 testsuites/samples/fileio/main_lspci.c<br>
<br>
diff --git a/testsuites/samples/fileio/Makefile.am b/testsuites/samples/fileio/Makefile.am<br>
index bf88273..6e67e42 100644<br>
--- a/testsuites/samples/fileio/Makefile.am<br>
+++ b/testsuites/samples/fileio/Makefile.am<br>
@@ -1,5 +1,5 @@<br>
 rtems_tests_PROGRAMS = fileio<br>
-fileio_SOURCES = init.c system.h<br>
+fileio_SOURCES = init.c system.h main_lspci.c<br>
<br>
 dist_rtems_tests_DATA = fileio.doc<br>
<br>
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c<br>
index 07ec2c6..ca3527d 100644<br>
--- a/testsuites/samples/fileio/init.c<br>
+++ b/testsuites/samples/fileio/init.c<br>
@@ -1291,8 +1291,11 @@ static rtems_shell_alias_t Shell_USERECHO_Alias = {<br>
   "userecho"                 /* alias */<br>
 };<br>
<br>
+extern rtems_shell_cmd_t Shell_LSPCI_Command;<br>
<br>
-#define CONFIGURE_SHELL_USER_COMMANDS &Shell_USERCMD_Command<br>
+#define CONFIGURE_SHELL_USER_COMMANDS \<br>
+    &Shell_USERCMD_Command, \<br>
+    &Shell_LSPCI_Command<br>
 #define CONFIGURE_SHELL_USER_ALIASES &Shell_USERECHO_Alias<br>
 #define CONFIGURE_SHELL_COMMANDS_INIT<br>
 #define CONFIGURE_SHELL_COMMANDS_ALL<br>
diff --git a/testsuites/samples/fileio/main_lspci.c b/testsuites/samples/fileio/main_lspci.c<br>
new file mode 100644<br>
index 0000000..564b701<br>
--- /dev/null<br>
+++ b/testsuites/samples/fileio/main_lspci.c<br>
@@ -0,0 +1,43 @@<br>
+/**<br>
+ * @brief lspci command<br>
+ *<br>
+ * This file is a simple wrapper for the pci_dump() method and provides<br>
+ * a simple lspci command.<br>
+ */<br>
+<br>
+/*  COPYRIGHT (c) 2016.<br>
+ *  On-Line Applications Research Corporation (OAR).<br>
+ *<br>
+ *  The license and distribution terms for this file may be<br>
+ *  found in the file LICENSE in this distribution or at<br>
+ *  <a href="http://www.rtems.org/license/LICENSE" rel="noreferrer" target="_blank">http://www.rtems.org/license/LICENSE</a>.<br>
+ */<br>
+<br>
+#include <rtems.h><br>
+#include <rtems/shell.h><br>
+<br>
+extern void pci_dump(FILE *f);<br>
+<br>
+int main_lspci(<br>
+  int    argc,<br>
+  char **argv<br>
+);<br>
+<br>
+int main_lspci(<br>
+  int    argc,<br>
+  char **argv<br>
+)<br>
+{<br>
+  pci_dump( NULL );<br>
+<br>
+  return 0;<br>
+}<br>
+<br>
+rtems_shell_cmd_t Shell_LSPCI_Command = {<br>
+  "lspci",                                         /* name */<br>
+  "lspci",                                         /* usage */<br>
+  "user",                                          /* topic */<br>
+  main_lspci,                                      /* command */<br>
+  NULL,                                            /* alias */<br>
+  NULL                                             /* next */<br>
+};<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</font></span></blockquote></div><br></div>