]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VolInfo/VolInfo.c
BaseTools/VolInfo: Add definitions for command format strings
[mirror_edk2.git] / BaseTools / Source / C / VolInfo / VolInfo.c
index 5285acdb97f9ebe4cbfd1ed06fc13a5da983225e..46c72123c87538f8457b4d8fd835c4a9a70edef1 100644 (file)
@@ -1599,7 +1599,6 @@ Returns:
   CHAR8               *ExtractionTool;\r
   CHAR8               *ToolInputFile;\r
   CHAR8               *ToolOutputFile;\r
-  CHAR8               *SystemCommandFormatString;\r
   CHAR8               *SystemCommand;\r
   EFI_GUID            *EfiGuid;\r
   UINT16              DataOffset;\r
@@ -1659,9 +1658,8 @@ Returns:
           SectionLength - SectionHeaderLen\r
           );\r
 \r
-        SystemCommandFormatString = "%s sha1 -out %s %s";\r
         SystemCommand = malloc (\r
-          strlen (SystemCommandFormatString) +\r
+          strlen (OPENSSL_COMMAND_FORMAT_STRING) +\r
           strlen (OpenSslPath) +\r
           strlen (ToolInputFileName) +\r
           strlen (ToolOutputFileName) +\r
@@ -1673,7 +1671,7 @@ Returns:
         }\r
         sprintf (\r
           SystemCommand,\r
-          SystemCommandFormatString,\r
+          OPENSSL_COMMAND_FORMAT_STRING,\r
           OpenSslPath,\r
           ToolOutputFileName,\r
           ToolInputFileName\r
@@ -1891,9 +1889,8 @@ Returns:
         //\r
         // Construction 'system' command string\r
         //\r
-        SystemCommandFormatString = "%s -d -o %s %s";\r
         SystemCommand = malloc (\r
-          strlen (SystemCommandFormatString) +\r
+          strlen (EXTRACT_COMMAND_FORMAT_STRING) +\r
           strlen (ExtractionTool) +\r
           strlen (ToolInputFile) +\r
           strlen (ToolOutputFile) +\r
@@ -1909,7 +1906,7 @@ Returns:
         }\r
         sprintf (\r
           SystemCommand,\r
-          SystemCommandFormatString,\r
+          EXTRACT_COMMAND_FORMAT_STRING,\r
           ExtractionTool,\r
           ToolOutputFile,\r
           ToolInputFile\r