Fixed swid_generator interface
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 30 May 2014 07:29:56 +0000 (09:29 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 31 May 2014 18:37:57 +0000 (20:37 +0200)
src/libpts/swid/swid_inventory.c

index c1e2844..4b1f7fb 100644 (file)
@@ -162,10 +162,9 @@ static status_t generate_tags(private_swid_inventory_t *this, char *generator,
                /* Assemble the SWID generator command */
                if (this->full_tags)
                {
-                       snprintf(command, BUF_LEN, "%s swid --entity-name \"%s\" %s%s",
-                                        generator, entity_name,
-                                        pretty ? "--pretty" : "--doc-separator $'\n\n'",
-                                        full   ? " --full" : "");
+                       snprintf(command, BUF_LEN, "%s swid --entity-name \"%s\" "
+                                        "--doc-separator $'\n\n'%s%s", generator, entity_name,
+                                        pretty ? " --pretty" : "", full ? " --full" : "");
                }
                else
                {
@@ -182,12 +181,12 @@ static status_t generate_tags(private_swid_inventory_t *this, char *generator,
 
                if (this->full_tags)
                {
-                       DBG2(DBG_IMC, "SWID tags generated by package manager:");
+                       DBG2(DBG_IMC, "SWID tag generation by package manager");
                        status = read_swid_tags(this, file);
                }
                else
                {
-                       DBG2(DBG_IMC, "SWID tag IDs generated by package manager:");
+                       DBG2(DBG_IMC, "SWID tag ID generation by package manager");
                        status = read_swid_tag_ids(this, file);
                }
                pclose(file);