aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/oslib-posix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 1c23fd2..3ae4987 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -467,7 +467,8 @@ int qemu_read_password(char *buf, int buf_size)
ret = -1;
break;
} else {
- if (ch == '\r') {
+ if (ch == '\r' ||
+ ch == '\n') {
ret = 0;
break;
}