diff options
author | Robert Morris <[email protected]> | 2022-08-10 06:42:17 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2022-08-10 07:21:50 -0400 |
commit | 07cf0eb25518089a96e8778e6809fc88d292ea5b (patch) | |
tree | e9407a34eca8681fab2568a3477154638c017f06 /user/sh.c | |
parent | c908d2013233a6d60c2f37292dfd6ac18075d6d4 (diff) | |
download | xv6-labs-07cf0eb25518089a96e8778e6809fc88d292ea5b.tar.gz xv6-labs-07cf0eb25518089a96e8778e6809fc88d292ea5b.tar.bz2 xv6-labs-07cf0eb25518089a96e8778e6809fc88d292ea5b.zip |
have sh print prompt with write, not printf, to make
system call lecture a little clearer.
Diffstat (limited to 'user/sh.c')
-rw-r--r-- | user/sh.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |