drivers: advertise kmod dependencies in pmdinfo
[dpdk.git] / buildtools / pmdinfogen / pmdinfogen.c
index beb06f1..5129c57 100644 (file)
@@ -15,6 +15,8 @@
 #include <limits.h>
 #include <stdbool.h>
 #include <errno.h>
+#include <libgen.h>
+
 #include <rte_common.h>
 #include "pmdinfogen.h"
 
@@ -267,6 +269,7 @@ struct opt_tag {
 
 static const struct opt_tag opt_tags[] = {
        {"_param_string_export", "params"},
+       {"_kmod_dep_export", "kmod"},
 };
 
 static int complete_pmd_entry(struct elf_info *info, struct pmd_driver *drv)
@@ -384,7 +387,7 @@ static void output_pmd_info_string(struct elf_info *info, char *outfile)
                        else
                                fprintf(ofd, " ");
                }
-               fprintf(ofd, "]}\";");
+               fprintf(ofd, "]}\";\n");
                drv = drv->next;
        }
 
@@ -398,7 +401,8 @@ int main(int argc, char **argv)
 
        if (argc < 3) {
                fprintf(stderr,
-                       "usage: pmdinfo <object file> <c output file>\n");
+                       "usage: %s <object file> <c output file>\n",
+                       basename(argv[0]));
                exit(127);
        }
        parse_elf(&info, argv[1]);