|
|
@@ -66,24 +66,13 @@ int tty_write(struct tty *tty, char *s) {
|
|
|
}
|
|
|
|
|
|
int tty_write_all(char *p) {
|
|
|
- struct tty *tty;
|
|
|
struct klist_node *n;
|
|
|
- char *s;
|
|
|
int err;
|
|
|
|
|
|
- for (n = ttys.next; n != &ttys; n = n->next) {
|
|
|
- s = p;
|
|
|
- tty = (struct tty *) n->data;
|
|
|
-
|
|
|
- while (*s) {
|
|
|
- if ((err = tty->putc(*s)))
|
|
|
- return err;
|
|
|
-
|
|
|
- s++;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
+ for (n = ttys.next; n != &ttys; n = n->next)
|
|
|
+ if ((err = tty_write((struct tty *) n->data, p)))
|
|
|
+ return err;
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
|