+/**\r
+ Take the original command line, substitute any variables, free \r
+ the original string, return the modified copy\r
+\r
+ @param[in] CmdLine pointer to the command line to update\r
+ @param[out]CmdName upon successful return the name of the command to be run\r
+\r
+ @retval EFI_SUCCESS the function was successful\r
+ @retval EFI_OUT_OF_RESOURCES a memory allocation failed\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ShellSubstituteVariables(\r
+ IN CHAR16 **CmdLine\r
+ )\r
+{\r
+ CHAR16 *NewCmdLine;\r
+ NewCmdLine = ShellConvertVariables(*CmdLine);\r
+ SHELL_FREE_NON_NULL(*CmdLine);\r
+ if (NewCmdLine == NULL) {\r
+ return (EFI_OUT_OF_RESOURCES);\r
+ }\r
+ *CmdLine = NewCmdLine;\r
+ return (EFI_SUCCESS);\r
+}\r
+\r