diff --git a/src/add-ons/kernel/drivers/common/dprintf.cpp b/src/add-ons/kernel/drivers/common/dprintf.cpp index f68ac3caef..612a2b1e8f 100644 --- a/src/add-ons/kernel/drivers/common/dprintf.cpp +++ b/src/add-ons/kernel/drivers/common/dprintf.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005, Haiku Inc. All rights reserved. + * Copyright 2005-2007, Haiku Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Author(s): @@ -10,13 +10,13 @@ */ -#include - #include #include #include +#include +#include #define DEVICE_NAME "dprintf" @@ -49,6 +49,12 @@ dprintf_freecookie(void *cookie) static status_t dprintf_ioctl(void *cookie, uint32 op, void *buffer, size_t length) { + if (op == TCGETA) { + // let isatty() think we are a terminal + // (this lets libroot use unbuffered I/O) + return B_OK; + } + return EPERM; }