On Thursday, October 25, 2018 12:48 AM ruiyu...@intel.com wrote: >On 10/25/2018 12:35 AM, jim.dai...@dell.com wrote: >> Add a function to return the fully-qualified version of some path. >> >> ... >> +CHAR16* >> +EFIAPI >> +FullyQualifyPath( >> + IN OUT CHAR16 **Path >This API assumes *Path is allocated in heap which may bring unnecessary >restriction. How about we accept a CONST CHAR16 * Path, quality and >return a new allocated string? >The parameter can be "IN CONST CHAR16 *Path".
In the context it is currently used, *Path is allocated in heap. But, it might be better to handle other types of input too. >> + if (StrStr(*Path, L":") == NULL) { > >Do we need to handle path like "fs0:a.txt"? >In Windows, it is expanded to <Current Directory of FS0> + a.txt. Good catch. >> + *Path = FullyQualifiedPath; > >We can just return the FullQualifiedPath without changing Path. Agreed. >Thanks, >Ray I'll take a cut at version 2 soon. Regards, Jim _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel