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
This commit is contained in:
@@ -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 <string.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <Drivers.h>
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user