diff options
author | jkim <jkim@FreeBSD.org> | 2011-05-31 19:45:58 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2011-05-31 19:45:58 +0000 |
commit | dad6aab353f85a0e9219979a0dcbb062fdcb7d29 (patch) | |
tree | 996d9e217d68c8478ac37145a783803c81ddb373 /sys/dev/acpica | |
parent | aafd4acbe269dfc8d327a76e9fc41a8aa628cccf (diff) | |
download | FreeBSD-src-dad6aab353f85a0e9219979a0dcbb062fdcb7d29.zip FreeBSD-src-dad6aab353f85a0e9219979a0dcbb062fdcb7d29.tar.gz |
Merge ACPICA 20110527.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/Osd/OsdDebug.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/dev/acpica/Osd/OsdDebug.c b/sys/dev/acpica/Osd/OsdDebug.c index 8425357..0547f75 100644 --- a/sys/dev/acpica/Osd/OsdDebug.c +++ b/sys/dev/acpica/Osd/OsdDebug.c @@ -47,20 +47,23 @@ __FBSDID("$FreeBSD$"); #include <dev/acpica/acpivar.h> -UINT32 -AcpiOsGetLine(char *Buffer) +ACPI_STATUS +AcpiOsGetLine(char *Buffer, UINT32 BufferLength, UINT32 *BytesRead) { #ifdef DDB - char *cp; + char *cp; - db_readline(Buffer, 80); - for (cp = Buffer; *cp != 0; cp++) - if (*cp == '\n') - *cp = 0; - return (AE_OK); + 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 - printf("AcpiOsGetLine called but no input support"); - return (AE_NOT_EXIST); + printf("AcpiOsGetLine called but no input support"); + return (AE_NOT_EXIST); #endif /* DDB */ } |