From 7f61f501cf64ee47a05d846d38437f671d0a7918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 8 May 2007 00:01:51 +0000 Subject: [PATCH] We now respond to TCGETA to let isatty() think we're a terminal which caused our libroot to use unbuffered I/O. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21065 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/common/dprintf.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; }