]> git.openfabrics.org - ~adrianc/mstflint.git/commitdiff
modified device example to BDF format and tool name to mstregdump in help message
authorAdrian Chiris <adrianc@mellanox.com>
Mon, 28 Mar 2016 07:59:42 +0000 (10:59 +0300)
committerAdrian Chiris <adrianc@mellanox.com>
Mon, 28 Mar 2016 07:59:42 +0000 (10:59 +0300)
mstdump/crd_main/Makefile.am
mstdump/crd_main/mstdump.c

index dd7b32ecd159a271d6873eae240b928b1f78d7e4..89d277861611c19e40437a3fe6f2b42461cc331c 100755 (executable)
@@ -40,3 +40,5 @@ mstregdump_SOURCES = mstdump.c
 mstregdump_LDADD = ../crd_lib/libcrdump.a ../../dev_mgt/libdev_mgt.a ../../reg_access/libreg_access.a ../../tools_layouts/libtools_layouts.a \
                        ../../mtcr_ul/libmtcr_ul.a  -lm -ldl
 
+mstregdump_CFLAGS = -DMSTDUMP_NAME=\"mstregdump\" -DDEV_EXAMPLE=\"0b:00.0\"
+
index 1a431d7b92ba51e1a917a40f958a2b9129c6fae2..5b054fa4d737d1cfdb6259d83ba8d7b0cda9b91c 100755 (executable)
 
 #define CAUSE_FLAG "--cause"
 #define MAX_DEV_LEN 512
+
+#ifndef MSTDUMP_NAME
+#define MSTDUMP_NAME "mstdump"
+#endif
+
+#ifndef DEV_EXAMPLE
+#define DEV_EXAMPLE "/dev/mst/mt4099_pci_cr0"
+#endif
+
+
 // string explaining the cmd-line structure
-char correct_cmdline[] = "   Mellanox mstdump utility, dumps device internal configuration data\n\
-   Usage: mstdump [-full] <device> [i2c-slave] [-v[ersion] [-h[elp]]]\n\n\
+char correct_cmdline[] = "   Mellanox "MSTDUMP_NAME" utility, dumps device internal configuration data\n\
+   Usage: "MSTDUMP_NAME" [-full] <device> [i2c-slave] [-v[ersion] [-h[elp]]]\n\n\
    -full              :  Dump more expanded list of addresses\n\
                          Note : be careful when using this flag, None safe addresses might be read.\n\
    -v                 :  Display version info\n\
    -h                 :  Print this help message\n\
    Example :\n\
-            mstdump /dev/mst/mt4099_pci_cr0\n";
+            "MSTDUMP_NAME" "DEV_EXAMPLE"\n";
 
 
 void print_dword(crd_dword_t *dword) {