diff --git a/opal/mca/db/print/db_print.c b/opal/mca/db/print/db_print.c index fa94ef35c3..fed1ad6ac9 100644 --- a/opal/mca/db/print/db_print.c +++ b/opal/mca/db/print/db_print.c @@ -120,6 +120,8 @@ static int add_log(const char *table, /* record that we have it */ vstr = strdup(table); opal_pointer_array_add(&tables, vstr); + /* start with the table name */ + opal_argv_append_nosize(&cmdargs, table); /* create and print the column headers */ for (i=0; i < nkvs; i++) { opal_argv_append_nosize(&cmdargs, kvs[i].key); @@ -131,6 +133,9 @@ static int add_log(const char *table, cmdargs = NULL; } + /* put the table at the start */ + opal_argv_append_nosize(&cmdargs, table); + /* cycle through the provided values and print them */ for (i=0; i < nkvs; i++) { switch (kvs[i].type) {