patch-2.1.121 linux/arch/alpha/boot/bootp.c
Next file: linux/arch/alpha/defconfig
Previous file: linux/arch/alpha/boot/bootloader.lds
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Sun Sep 6 10:34:33 1998
- Orig file:
v2.1.120/linux/arch/alpha/boot/bootp.c
- Orig date:
Wed Apr 8 19:36:24 1998
diff -u --recursive --new-file v2.1.120/linux/arch/alpha/boot/bootp.c linux/arch/alpha/boot/bootp.c
@@ -27,12 +27,27 @@
struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
unsigned long vptb, unsigned long *kstk);
+extern long dispatch(long code, ...);
+
+static void
+puts(const char *str, int len)
+{
+ long written;
+
+ while (len > 0) {
+ written = dispatch(CCB_PUTS, 0, str, len);
+ if (written < 0)
+ break;
+ len -= (unsigned int) written;
+ str += (unsigned int) written;
+ }
+}
+
int printk(const char * fmt, ...)
{
va_list args;
- int i, j, written, remaining, num_nl;
+ int i, j, remaining, num_nl;
static char buf[1024];
- char * str;
va_start(args, fmt);
i = vsprintf(buf, fmt, args);
@@ -54,12 +69,7 @@
}
}
- str = buf;
- do {
- written = puts(str, remaining);
- remaining -= written;
- str += written;
- } while (remaining > 0);
+ puts(buf, remaining);
return i;
}
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]