summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2003-11-10 23:02:09 +0000
committerjdike <jdike>2003-11-10 23:02:09 +0000
commitda668d798d225f86270645066b153ab9d5f373be (patch)
tree069b289e7facb7c4a1c04c73c887f89687f282db
parent23ccd4096f21d1e69ddf922883758b69211db4cf (diff)
downloaduml-history-da668d798d225f86270645066b153ab9d5f373be.tar.gz
Fixed some botched error printks.
-rw-r--r--arch/um/fs/hppfs/hppfs_kern.c3
-rw-r--r--arch/um/kernel/helper.c6
-rw-r--r--arch/um/sys-i386/ptrace_user.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/arch/um/fs/hppfs/hppfs_kern.c b/arch/um/fs/hppfs/hppfs_kern.c
index 13d2234..0b01612 100644
--- a/arch/um/fs/hppfs/hppfs_kern.c
+++ b/arch/um/fs/hppfs/hppfs_kern.c
@@ -337,8 +337,7 @@ static struct hppfs_data *hppfs_get_data(int fd, int filter,
n = os_read_file(fd, data->contents, sizeof(data->contents));
if(n < 0){
err = n;
- printk("hppfs_get_data : read failed, err = %d\n",
- -err);
+ printk("hppfs_get_data : read failed, err = %d\n", -n);
goto failed_free;
}
else if(n == 0)
diff --git a/arch/um/kernel/helper.c b/arch/um/kernel/helper.c
index 0d6dd79..6d0a1f9 100644
--- a/arch/um/kernel/helper.c
+++ b/arch/um/kernel/helper.c
@@ -132,9 +132,11 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
}
if(stack_out == NULL){
pid = waitpid(pid, &status, 0);
- if(pid < 0)
+ if(pid < 0){
printk("run_helper_thread - wait failed, errno = %d\n",
- -pid);
+ errno);
+ pid = -errno;
+ }
if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
printk("run_helper_thread - thread returned status "
"0x%x\n", status);
diff --git a/arch/um/sys-i386/ptrace_user.c b/arch/um/sys-i386/ptrace_user.c
index 70da623..cbdd9f5 100644
--- a/arch/um/sys-i386/ptrace_user.c
+++ b/arch/um/sys-i386/ptrace_user.c
@@ -41,8 +41,8 @@ static void write_debugregs(int pid, unsigned long *regs)
if((i == 4) || (i == 5)) continue;
if(ptrace(PTRACE_POKEUSR, pid, &dummy->u_debugreg[i],
regs[i]) < 0)
- printk("write_debugregs - ptrace failed, "
- "errno = %d\n", errno);
+ printk("write_debugregs - ptrace failed on "
+ "register %d, errno = %d\n", errno);
}
}