summaryrefslogtreecommitdiff
path: root/kernel/console.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2020-08-28 05:44:09 -0400
committerRobert Morris <[email protected]>2020-08-28 05:44:09 -0400
commitdb067d24da0b6472afe9ce4165e0868772b11964 (patch)
treeee9d5d2664b572979758d8569aea2ff89fcf8193 /kernel/console.c
parent2ec9c6ed66629fd5b833f06af2080eab46c0af35 (diff)
downloadxv6-labs-db067d24da0b6472afe9ce4165e0868772b11964.tar.gz
xv6-labs-db067d24da0b6472afe9ce4165e0868772b11964.tar.bz2
xv6-labs-db067d24da0b6472afe9ce4165e0868772b11964.zip
suppress write() output after panic()
Diffstat (limited to 'kernel/console.c')
-rw-r--r--kernel/console.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/console.c b/kernel/console.c
index 2b1ed3c..1885593 100644
--- a/kernel/console.c
+++ b/kernel/console.c
@@ -66,6 +66,12 @@ int
consolewrite(int user_src, uint64 src, int n)
{
int i;
+ extern volatile int panicked; // from printf.c
+
+ if(panicked){
+ for(;;)
+ ;
+ }
acquire(&cons.lock);
for(i = 0; i < n; i++){