summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Application/HelloWorld/HelloWorld.c
diff options
context:
space:
mode:
authorQiu Shumin <shumin.qiu@intel.com>2016-02-21 15:55:14 +0800
committerQiu Shumin <shumin.qiu@intel.com>2016-02-24 15:11:14 +0800
commit0d4a6c3dfc06d7d5769c19a3d112c5fdeae70525 (patch)
tree96f12d3f272ff081a068aafe0c8c665cac2287cd /MdeModulePkg/Application/HelloWorld/HelloWorld.c
parent8d4eec6d97db143d9568631102c2027ed594eadb (diff)
downloadedk2-platforms-0d4a6c3dfc06d7d5769c19a3d112c5fdeae70525.tar.xz
MdeModulePkg: Add sample help information for HelloWorld application.
Since Shell supports finding help information from resource section of application image. We enhance the HelloWorld to add help information string. After the HelloWorld are loaded in system the help string will be stored in resource section of the application image. Cc: Feng Tian <feng.tian@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg/Application/HelloWorld/HelloWorld.c')
-rw-r--r--MdeModulePkg/Application/HelloWorld/HelloWorld.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.c b/MdeModulePkg/Application/HelloWorld/HelloWorld.c
index 1821b2dd76..164571bfb0 100644
--- a/MdeModulePkg/Application/HelloWorld/HelloWorld.c
+++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.c
@@ -2,7 +2,7 @@
This sample application bases on HelloWorld PCD setting
to print "UEFI Hello World!" to the UEFI Console.
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -18,6 +18,15 @@
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
+//
+// String token ID of help message text.
+// Shell supports to find help message in the resource section of an application image if
+// .MAN file is not found. This global variable is added to make build tool recognizes
+// that the help string is consumed by user and then build tool will add the string into
+// the resource section. Thus the application can use '-?' option to show help message in
+// Shell.
+//
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_HELLO_WORLD_HELP_INFORMATION);
/**
The user Entry Point for Application. The user code starts with this function