示例#1
0
文件: ppc64.c 项目: nikunjad/SLOF
/**
 * Standard write function for the libc.
 *
 * @param fd    file descriptor (should always be 1 or 2)
 * @param buf   pointer to the array with the output characters
 * @param count number of bytes to be written
 * @return      the number of bytes that have been written successfully
 */
ssize_t write(int fd, const void *buf, size_t count)
{
	int i;
	char *ptr = (char *)buf;

	if (fd != 1 && fd != 2)
		return 0;

	for (i = 0; i < count; i++) {
		if (*ptr == '\n')
			io_putchar('\r');
		io_putchar(*ptr++);
	}

	return i;
}
示例#2
0
文件: ppc64.c 项目: nikunjad/SLOF
/* This should probably be temporary until a better solution is found */
void
asm_cout(long Character, long UART, long NVRAM __attribute__((unused)))
{
	if (UART)
		io_putchar(Character);
}
示例#3
0
/* This should probably be temporary until a better solution is found */
void
asm_cout(long Character, long UART, long NVRAM ATTRIBUTE_UNUSED)
{
	if (UART)
		io_putchar(Character);
}