]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/Strip/strip.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Strip / strip.c
index 03e1831ca7c8156f5fc1bbf223b513d10c897c4a..03d3c3e5dd4dcdac9276eb3d130ccda5a84009d2 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>                                                         \r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>                                                         \r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -24,6 +24,50 @@ Abstract:
 #include <string.h>\r
 #include <malloc.h>\r
 \r
+#define UTILITY_NAME      "Strip"\r
+#define UTILITY_VERSION   "v1.0"\r
+\r
+static\r
+void\r
+Usage (\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Print usage information for this utility.\r
+  \r
+Arguments:\r
+\r
+  None.\r
+\r
+Returns:\r
+\r
+  Nothing.\r
+  \r
+--*/\r
+{\r
+  int         Index;\r
+  const char  *Str[] = {\r
+    UTILITY_NAME" "UTILITY_VERSION" - Intel Strip Utility",\r
+    "  Copyright (C), 2006 - 2008 Intel Corporation",\r
+    \r
+#if ( defined(UTILITY_BUILD) && defined(UTILITY_VENDOR) )\r
+    "  Built from "UTILITY_BUILD", project of "UTILITY_VENDOR,\r
+#endif\r
+    "",\r
+    "Usage:",\r
+    "  "UTILITY_NAME" SOURCE DEST",\r
+    "Description:",\r
+    "  Convert executable files to binary files.",\r
+    NULL\r
+  };\r
+\r
+  for (Index = 0; Str[Index] != NULL; Index++) {\r
+    fprintf (stdout, "%s\n", Str[Index]);\r
+  }\r
+}\r
+\r
 int\r
 main (\r
   int  argc,\r
@@ -55,7 +99,7 @@ Returns:
   char  *Ptrx;\r
 \r
   if (argc < 3) {\r
-    printf ("Need more args, such as file name to convert and output name\n");\r
+    Usage ();\r
     return -1;\r
   }\r
 \r