summaryrefslogtreecommitdiff
path: root/kernel/console.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2022-08-12 12:59:33 -0400
committerFrans Kaashoek <[email protected]>2022-08-12 12:59:33 -0400
commit8f58cc7df99e9f697ca3843886802ecab5cb8991 (patch)
treed138ff370318701340fa32502304275f634c813c /kernel/console.c
parent62bc610424314d8bcebdbe5e331e63835df1a13f (diff)
downloadxv6-labs-8f58cc7df99e9f697ca3843886802ecab5cb8991.tar.gz
xv6-labs-8f58cc7df99e9f697ca3843886802ecab5cb8991.tar.bz2
xv6-labs-8f58cc7df99e9f697ca3843886802ecab5cb8991.zip
Cosmetic change (thanks Harry Porter)
Diffstat (limited to 'kernel/console.c')
-rw-r--r--kernel/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/console.c b/kernel/console.c
index 1e8d355..39415d6 100644
--- a/kernel/console.c
+++ b/kernel/console.c
@@ -165,7 +165,7 @@ consoleintr(int c)
// store for consumption by consoleread().
cons.buf[cons.e++ % INPUT_BUF_SIZE] = c;
- if(c == '\n' || c == C('D') || cons.e == cons.r+INPUT_BUF_SIZE){
+ if(c == '\n' || c == C('D') || cons.e-cons.r == INPUT_BUF_SIZE){
// wake up consoleread() if a whole line (or end-of-file)
// has arrived.
cons.w = cons.e;