From 07cf0eb25518089a96e8778e6809fc88d292ea5b Mon Sep 17 00:00:00 2001
From: Robert Morris <rtm@csail.mit.edu>
Date: Wed, 10 Aug 2022 06:42:17 -0400
Subject: have sh print prompt with write, not printf, to make system call
 lecture a little clearer.

---
 user/sh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/user/sh.c b/user/sh.c
index 36245b3..864405d 100644
--- a/user/sh.c
+++ b/user/sh.c
@@ -134,7 +134,7 @@ runcmd(struct cmd *cmd)
 int
 getcmd(char *buf, int nbuf)
 {
-  fprintf(2, "$ ");
+  write(1, "$ ", 2);
   memset(buf, 0, nbuf);
   gets(buf, nbuf);
   if(buf[0] == 0) // EOF
-- 
cgit v1.2.3