]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/Tool.java
Modify GenFfsTask to make it don't create ORG file.
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / Tool.java
index c784a50107e6ee3088bc3b80eff3870edb423755..4cc4d374c43136b7a3a6eaaf0de712d62fd57c1e 100644 (file)
@@ -39,7 +39,7 @@ public class Tool implements EfiDefine, Section {
 \r
      @param     buffer  The buffer to put the result with alignment\r
      **/\r
-    public void toBuffer (DataOutputStream buffer, DataOutputStream orgBuffer){\r
+    public void toBuffer (DataOutputStream buffer){\r
         File           OutputFile;\r
         byte           data;\r
 \r
@@ -49,7 +49,7 @@ public class Tool implements EfiDefine, Section {
         try {\r
             executeTool ();\r
         } catch (Exception e) {\r
-            throw new BuildException("Call tools failed!\n");\r
+            throw new BuildException("Call to executeTool failed!\n");\r
         }\r
 \r
         ///\r
@@ -58,7 +58,7 @@ public class Tool implements EfiDefine, Section {
         OutputFile = new File (this.outPutFileName);\r
         long fileLen = OutputFile.length();\r
         if (!OutputFile.exists()) {\r
-            throw new BuildException("The file " + outPutFileName + " is not exist!\n");\r
+            throw new BuildException("The file " + outPutFileName + " does not exist!\n");\r
         }\r
 \r
         ///\r
@@ -72,10 +72,6 @@ public class Tool implements EfiDefine, Section {
             while (i < fileLen) {\r
                 data = In.readByte();\r
                 buffer.writeByte(data);\r
-                //\r
-                // Add data to org file\r
-                //\r
-                orgBuffer.writeByte(data);\r
                 i ++;\r
             }\r
 \r
@@ -85,13 +81,12 @@ public class Tool implements EfiDefine, Section {
             while ((fileLen & 0x03) != 0) {\r
                 fileLen++;\r
                 buffer.writeByte(0);\r
-                orgBuffer.writeByte(0);\r
             }\r
             In.close();\r
 \r
         } catch (Exception e) {\r
             System.out.print(e.getMessage());\r
-            throw new BuildException("Call tool2buffer failed!\n");\r
+            throw new BuildException("Tool call, toBuffer failed!\n");\r
         }\r
     }\r
 \r
@@ -137,7 +132,7 @@ public class Tool implements EfiDefine, Section {
             crcProcess.waitFor();\r
         } catch (Exception e) {\r
             System.out.print (e.getMessage());\r
-            throw new BuildException("Execute tools fails!\n");\r
+            throw new BuildException("Execution of externalTool task failed!\n");\r
         }\r
     }\r
 \r