1 /* system services puts()
2 *
3 * This is here because gcc converts printf() calls without actual formatting
4 * in the format string, to puts() calls. While that "feature" can be disabled
5 * with the -fno-builtin-printf gcc flag, we still don't want the resulting
6 * mayhem to occur in system servers even when that flag is forgotten.
7 */
8
9 #include <stdio.h>
10
11 /* puts() uses kputc() to print characters. */
12 void kputc(int c);
13
puts(const char * s)14 int puts(const char *s)
15 {
16
17 for (; *s; s++)
18 kputc(*s);
19
20 kputc('\n');
21 kputc('\0');
22
23 return 0;
24 }
25