Commit 91fc2119745dd3cdd70570c65f05296958da1542
1 parent
2c6cadd4
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
Showing
1 changed file
with
11 additions
and
1 deletions
vl.c
... | ... | @@ -1398,6 +1398,7 @@ CharDriverState *qemu_chr_open_stdio(void) |
1398 | 1398 | #if defined(__linux__) |
1399 | 1399 | CharDriverState *qemu_chr_open_pty(void) |
1400 | 1400 | { |
1401 | + struct termios tty; | |
1401 | 1402 | char slave_name[1024]; |
1402 | 1403 | int master_fd, slave_fd; |
1403 | 1404 | |
... | ... | @@ -1405,6 +1406,14 @@ CharDriverState *qemu_chr_open_pty(void) |
1405 | 1406 | if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) { |
1406 | 1407 | return NULL; |
1407 | 1408 | } |
1409 | + | |
1410 | + /* Disabling local echo and line-buffered output */ | |
1411 | + tcgetattr (master_fd, &tty); | |
1412 | + tty.c_lflag &= ~(ECHO|ICANON|ISIG); | |
1413 | + tty.c_cc[VMIN] = 1; | |
1414 | + tty.c_cc[VTIME] = 0; | |
1415 | + tcsetattr (master_fd, TCSAFLUSH, &tty); | |
1416 | + | |
1408 | 1417 | fprintf(stderr, "char device redirected to %s\n", slave_name); |
1409 | 1418 | return qemu_chr_open_fd(master_fd, master_fd); |
1410 | 1419 | } |
... | ... | @@ -3962,12 +3971,13 @@ void help(void) |
3962 | 3971 | "-boot [a|c|d] boot on floppy (a), hard disk (c) or CD-ROM (d)\n" |
3963 | 3972 | "-snapshot write to temporary files instead of disk image files\n" |
3964 | 3973 | "-m megs set virtual RAM size to megs MB [default=%d]\n" |
3974 | + "-smp n set the number of CPUs to 'n' [default=1]\n" | |
3965 | 3975 | "-nographic disable graphical output and redirect serial I/Os to console\n" |
3966 | 3976 | #ifndef _WIN32 |
3967 | 3977 | "-k language use keyboard layout (for example \"fr\" for French)\n" |
3968 | 3978 | #endif |
3969 | 3979 | #ifdef HAS_AUDIO |
3970 | - "-enable-audio enable audio support, and all the sound cars\n" | |
3980 | + "-enable-audio enable audio support, and all the sound cards\n" | |
3971 | 3981 | "-audio-help print list of audio drivers and their options\n" |
3972 | 3982 | "-soundhw c1,... enable audio support\n" |
3973 | 3983 | " and only specified sound cards (comma separated list)\n" | ... | ... |