提交 851c6518 编写于 作者: R Richard W.M. Jones

Mon Nov 26 12:12:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>

	* configure.in, src/console.c: Replace cfmakeraw if not in
	  standard library.
上级 b7641686
Mon Nov 26 12:12:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, src/console.c: Replace cfmakeraw if not in
standard library.
Mon Nov 26 12:03:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* tests/Makefile.am, tests/nodeinfotest.c, tests/qemuxml2argvtest.c,
......
......@@ -61,7 +61,7 @@ AM_PROG_CC_C_O
LIBVIRT_COMPILE_WARNINGS(maximum)
dnl Availability of various common functions (non-fatal if missing).
AC_CHECK_FUNCS([regexec])
AC_CHECK_FUNCS([regexec cfmakeraw])
dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([paths.h sys/syslimits.h])
......
......@@ -20,6 +20,8 @@
* Daniel Berrange <berrange@redhat.com>
*/
#include "config.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
......@@ -42,6 +44,19 @@ static void do_signal(int sig ATTRIBUTE_UNUSED) {
got_signal = 1;
}
#ifndef HAVE_CFMAKERAW
static void
cfmakeraw (struct termios *attr)
{
attr->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
| INLCR | IGNCR | ICRNL | IXON);
attr->c_oflag &= ~OPOST;
attr->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
attr->c_cflag &= ~(CSIZE | PARENB);
attr->c_cflag |= CS8;
}
#endif /* !HAVE_CFMAKERAW */
int vshRunConsole(const char *tty) {
int ttyfd, ret = -1;
struct termios ttyattr, rawattr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册