@@ -174,20 +174,6 @@ void __init load_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name,
++mbi.mods_count;
}
-/* Truncate string at first space, and return pointer
- * to remainder of string.
- */
-char * __init truncate_string(char *s)
-{
- while ( *s && !isspace(*s) )
- ++s;
- if (*s)
- {
- *s = 0;
- return(s + 1);
- }
- return(NULL);
-}
static void __init edd_put_string(u8 *dst, size_t n, const char *src)
{
@@ -185,6 +185,21 @@ void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode)
blexit(mesg);
}
+/* Truncate string at first space, and return pointer
+ * to remainder of string.
+ */
+char * __init truncate_string(char *s)
+{
+ while ( *s && !isspace(*s) )
+ ++s;
+ if (*s)
+ {
+ *s = 0;
+ return(s + 1);
+ }
+ return(NULL);
+}
+
EFI_FILE_HANDLE __init get_parent_handle(EFI_LOADED_IMAGE *loaded_image,
CHAR16 **leaf)
{
@@ -56,4 +56,5 @@ void __init noreturn blexit(const CHAR16 *str);
bool_t __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name,
struct file *file);
+char * __init truncate_string(char *s);
#endif
Move the newly created truncate_string() function to efi-shared.c so it can be shared with the ARM EFI stub. Signed-off-by: Roy Franz <roy.franz@linaro.org> --- xen/arch/x86/efi/boot.c | 14 -------------- xen/arch/x86/efi/efi-shared.c | 15 +++++++++++++++ xen/include/efi/efi-shared.h | 1 + 3 files changed, 16 insertions(+), 14 deletions(-)