mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
pc-bios/s390-ccw: Move libc functions to separate header
The upcoming netboot code will use the libc from SLOF. To be able to still use s390-ccw.h there, the libc related functions in this header have to be moved to a different location. And while we're at it, remove the duplicate memcpy() function from sclp.c. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1499863793-18627-2-git-send-email-thuth@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
b5f5a3afb6
commit
90806fec99
7 changed files with 51 additions and 37 deletions
|
@ -8,6 +8,7 @@
|
|||
* directory.
|
||||
*/
|
||||
|
||||
#include "libc.h"
|
||||
#include "s390-ccw.h"
|
||||
#include "sclp.h"
|
||||
|
||||
|
@ -59,13 +60,6 @@ static int _strlen(const char *str)
|
|||
return i;
|
||||
}
|
||||
|
||||
static void _memcpy(char *dest, const char *src, int len)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < len; i++)
|
||||
dest[i] = src[i];
|
||||
}
|
||||
|
||||
void sclp_print(const char *str)
|
||||
{
|
||||
int len = _strlen(str);
|
||||
|
@ -76,7 +70,7 @@ void sclp_print(const char *str)
|
|||
sccb->ebh.length = sizeof(EventBufferHeader) + len;
|
||||
sccb->ebh.type = SCLP_EVENT_ASCII_CONSOLE_DATA;
|
||||
sccb->ebh.flags = 0;
|
||||
_memcpy(sccb->data, str, len);
|
||||
memcpy(sccb->data, str, len);
|
||||
|
||||
sclp_service_call(SCLP_CMD_WRITE_EVENT_DATA, sccb);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue