avoid echo on pty devices (David Decotigny) - fixes in the command line help
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1719 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
2c6cadd49e
commit
91fc211974
12
vl.c
12
vl.c
|
@ -1398,6 +1398,7 @@ CharDriverState *qemu_chr_open_stdio(void)
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
CharDriverState *qemu_chr_open_pty(void)
|
CharDriverState *qemu_chr_open_pty(void)
|
||||||
{
|
{
|
||||||
|
struct termios tty;
|
||||||
char slave_name[1024];
|
char slave_name[1024];
|
||||||
int master_fd, slave_fd;
|
int master_fd, slave_fd;
|
||||||
|
|
||||||
|
@ -1405,6 +1406,14 @@ CharDriverState *qemu_chr_open_pty(void)
|
||||||
if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) {
|
if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disabling local echo and line-buffered output */
|
||||||
|
tcgetattr (master_fd, &tty);
|
||||||
|
tty.c_lflag &= ~(ECHO|ICANON|ISIG);
|
||||||
|
tty.c_cc[VMIN] = 1;
|
||||||
|
tty.c_cc[VTIME] = 0;
|
||||||
|
tcsetattr (master_fd, TCSAFLUSH, &tty);
|
||||||
|
|
||||||
fprintf(stderr, "char device redirected to %s\n", slave_name);
|
fprintf(stderr, "char device redirected to %s\n", slave_name);
|
||||||
return qemu_chr_open_fd(master_fd, master_fd);
|
return qemu_chr_open_fd(master_fd, master_fd);
|
||||||
}
|
}
|
||||||
|
@ -3962,12 +3971,13 @@ void help(void)
|
||||||
"-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n"
|
"-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n"
|
||||||
"-snapshot write to temporary files instead of disk image files\n"
|
"-snapshot write to temporary files instead of disk image files\n"
|
||||||
"-m megs set virtual RAM size to megs MB [default=%d]\n"
|
"-m megs set virtual RAM size to megs MB [default=%d]\n"
|
||||||
|
"-smp n set the number of CPUs to 'n' [default=1]\n"
|
||||||
"-nographic disable graphical output and redirect serial I/Os to console\n"
|
"-nographic disable graphical output and redirect serial I/Os to console\n"
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
"-k language use keyboard layout (for example \"fr\" for French)\n"
|
"-k language use keyboard layout (for example \"fr\" for French)\n"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_AUDIO
|
#ifdef HAS_AUDIO
|
||||||
"-enable-audio enable audio support, and all the sound cars\n"
|
"-enable-audio enable audio support, and all the sound cards\n"
|
||||||
"-audio-help print list of audio drivers and their options\n"
|
"-audio-help print list of audio drivers and their options\n"
|
||||||
"-soundhw c1,... enable audio support\n"
|
"-soundhw c1,... enable audio support\n"
|
||||||
" and only specified sound cards (comma separated list)\n"
|
" and only specified sound cards (comma separated list)\n"
|
||||||
|
|
Loading…
Reference in New Issue