]> git.hungrycats.org Git - linux/commitdiff
[PATCH] mpparse printk fix
authorAndrew Morton <akpm@osdl.org>
Tue, 18 Nov 2003 16:16:51 +0000 (08:16 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 18 Nov 2003 16:16:51 +0000 (08:16 -0800)
From: Herbert Xu <herbert@gondor.apana.org.au>

The recent patch produces a message with no terminating newline on the
machine in question.  This is because one of the four bytes that you're
printing out is NUL.  The following patch avoids that problem.

arch/i386/kernel/mpparse.c

index b0500b084f5ed7bf7e5eb5aef541acdb4dbfc78b..771a9f553a77acdeeba9245522271d38fc2f3eaf 100644 (file)
@@ -361,15 +361,12 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
        unsigned char *mpt=((unsigned char *)mpc)+count;
 
        if (memcmp(mpc->mpc_signature,MPC_SIGNATURE,4)) {
-               printk("SMP mptable: bad signature [%c%c%c%c]!\n",
-                       mpc->mpc_signature[0],
-                       mpc->mpc_signature[1],
-                       mpc->mpc_signature[2],
-                       mpc->mpc_signature[3]);
+               printk(KERN_ERR "SMP mptable: bad signature [0x%x]!\n",
+                       *(u32 *)mpc->mpc_signature);
                return 0;
        }
        if (mpf_checksum((unsigned char *)mpc,mpc->mpc_length)) {
-               printk("SMP mptable: checksum error!\n");
+               printk(KERN_ERR "SMP mptable: checksum error!\n");
                return 0;
        }
        if (mpc->mpc_spec!=0x01 && mpc->mpc_spec!=0x04) {