projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
590f912
)
Improve implementation of puts().
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 25 Oct 2004 00:13:24 +0000
(
00:13
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 25 Oct 2004 00:13:24 +0000
(
00:13
+0000)
src/lib/user/console.c
patch
|
blob
|
history
diff --git
a/src/lib/user/console.c
b/src/lib/user/console.c
index d2b9dc72f44899704d14fc48f113e269cea5b0fc..22bdc8c8b23dbd4a4b70df662738cb7c282ce7a1 100644
(file)
--- a/
src/lib/user/console.c
+++ b/
src/lib/user/console.c
@@
-1,4
+1,5
@@
#include <stdio.h>
+#include <string.h>
#include <syscall.h>
#include <syscall-nr.h>
@@
-29,8
+30,7
@@
hprintf (int handle, const char *format, ...)
int
puts (const char *s)
{
- while (*s != '\0')
- putchar (*s++);
+ write (STDOUT_FILENO, s, strlen (s));
putchar ('\n');
return 0;