[PATCH] uml: fix format errors
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Tue, 11 Apr 2006 05:53:32 +0000 (22:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:36 +0000 (06:18 -0700)
Now that GCC warns about format errors, fix them.  Nothing able to cause a
crash, however.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/slirp_user.c
arch/um/os-Linux/drivers/ethertap_user.c
arch/um/os-Linux/skas/mem.c
arch/um/os-Linux/skas/process.c
arch/um/sys-i386/ptrace_user.c

index b94c66114bc85d7a56fe4d9f6d29d4d31a633c13..33c5f6e625e83eecc26a97b774dffa6fe1bbb750 100644 (file)
@@ -104,7 +104,7 @@ static void slirp_close(int fd, void *data)
        }
 
        if(err == 0) {
-               printk("slirp_close: process %d has not exited\n");
+               printk("slirp_close: process %d has not exited\n", pri->pid);
                return;
        }
 
index 901b85e8a1c65c4df84ae87018b3d55cefd45698..8f49507e64ef5ac0091fe22189bea6413e427469 100644 (file)
@@ -40,7 +40,7 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask,
                        int fd)
 {
        struct addr_change change;
-       void *output;
+       char *output;
        int n;
 
        change.what = op;
index fbb080c2fc261afdf70640e7a00e0c6a951d31ac..b3c11cfa995a7464a991978efdc3388bf9713389 100644 (file)
@@ -82,8 +82,8 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
        if (offset) {
                data = (unsigned long *)(mm_idp->stack +
                                         offset - UML_CONFIG_STUB_DATA);
-               printk("do_syscall_stub : ret = %d, offset = %d, "
-                      "data = 0x%x\n", ret, offset, data);
+               printk("do_syscall_stub : ret = %ld, offset = %ld, "
+                      "data = %p\n", ret, offset, data);
                syscall = (unsigned long *)((unsigned long)data + data[0]);
                printk("do_syscall_stub: syscall %ld failed, return value = "
                       "0x%lx, expected return value = 0x%lx\n",
index bbf34cb91ce18cbea3e088aea56fe6d6edffdff4..045ae0037456a3a723e5d58fdb9858af64349a61 100644 (file)
@@ -265,7 +265,7 @@ void userspace(union uml_pt_regs *regs)
                if(err)
                        panic("userspace - could not resume userspace process, "
                              "pid=%d, ptrace operation = %d, errno = %d\n",
-                             op, errno);
+                             pid, op, errno);
 
                CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
                if(err < 0)
@@ -369,7 +369,7 @@ int copy_context_skas0(unsigned long new_stack, int pid)
         */
        wait_stub_done(pid, -1, "copy_context_skas0");
        if (child_data->err != UML_CONFIG_STUB_DATA)
-               panic("copy_context_skas0 - stub-child reports error %d\n",
+               panic("copy_context_skas0 - stub-child reports error %ld\n",
                      child_data->err);
 
        if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL,
index 9f3bd8ed78f5b2d7cc47380227051327aad98e3b..40aa885314469f40bee2ee2a3ae171becbc0840c 100644 (file)
@@ -57,7 +57,7 @@ static void write_debugregs(int pid, unsigned long *regs)
                if(ptrace(PTRACE_POKEUSR, pid, &dummy->u_debugreg[i],
                          regs[i]) < 0)
                        printk("write_debugregs - ptrace failed on "
-                              "register %d, value = 0x%x, errno = %d\n", i,
+                              "register %d, value = 0x%lx, errno = %d\n", i,
                               regs[i], errno);
        }
 }