示例#1
0
int
db_read_line()
{
	int	i;

	i = db_readline(db_line, sizeof(db_line));
	if (i == 0)
	    return (0);	/* EOI */
	db_lp = db_line;
	db_endlp = db_lp + i;
	return (i);
}
示例#2
0
UINT32
AcpiOsGetLine(NATIVE_CHAR *Buffer)
{
#ifdef DDB
    char	*cp;

    db_readline(Buffer, 80);
    for (cp = Buffer; *cp != 0; cp++)
	if (*cp == '\n')
	    *cp = 0;
    return(AE_OK);
#else
    printf("AcpiOsGetLine called but no input support");
    return(AE_NOT_EXIST);
#endif
}
ACPI_STATUS
AcpiOsGetLine(char *Buffer, UINT32 BufferLength, UINT32 *BytesRead)
{
#ifdef DDB
	char *cp;

	cp = Buffer;
	if (db_readline(Buffer, BufferLength) > 0)
		while (*cp != '\0' && *cp != '\n' && *cp != '\r')
			cp++;
	*cp = '\0';
	if (BytesRead != NULL)
		*BytesRead = cp - Buffer;
	return (AE_OK);
#else
	kprintf("AcpiOsGetLine called but no input support");
	return (AE_NOT_EXIST);
#endif /* DDB */
}