summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhunt <hunt>2007-07-09 16:21:45 +0000
committerhunt <hunt>2007-07-09 16:21:45 +0000
commit398fc5050760c1c5104d2a53fabdf978dd25daa5 (patch)
tree1ee5aeccf959fdc322da165e240d2dc7fb400af3
parent5215930b23d7924dd3e297796a0a6ba1c4886daa (diff)
downloadsystemtap-steved-398fc5050760c1c5104d2a53fabdf978dd25daa5.tar.gz
systemtap-steved-398fc5050760c1c5104d2a53fabdf978dd25daa5.tar.xz
systemtap-steved-398fc5050760c1c5104d2a53fabdf978dd25daa5.zip
2007-07-09 Martin Hunt <hunt@redhat.com>
* systemtap.context/systemtap_test_module1.c (stm_write_cmd): Set pointer type to "char *" so get_user() fetches a char.
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/systemtap.context/systemtap_test_module1.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 2e83a8ce..e4e46c4f 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-09 Martin Hunt <hunt@redhat.com>
+
+ * systemtap.context/systemtap_test_module1.c (stm_write_cmd):
+ Set pointer type to "char *" so get_user() fetches a char.
+
2007-07-06 Martin Hunt <hunt@redhat.com>
* systemtap.maps/linear*: New tests of linear histograms.
diff --git a/testsuite/systemtap.context/systemtap_test_module1.c b/testsuite/systemtap.context/systemtap_test_module1.c
index cfa76cf0..4d8c2522 100644
--- a/testsuite/systemtap.context/systemtap_test_module1.c
+++ b/testsuite/systemtap.context/systemtap_test_module1.c
@@ -41,7 +41,7 @@ static ssize_t stm_write_cmd (struct file *file, const char __user *buf,
{
char type;
- if (get_user(type, (int __user *)buf))
+ if (get_user(type, (char __user *)buf))
return -EFAULT;
switch (type) {
@@ -67,7 +67,7 @@ static ssize_t stm_write_cmd (struct file *file, const char __user *buf,
yyy_str("Hello", "System", "Tap");
break;
default:
- printk ("systemtap_bt_test_module: invalid command type %d\n", type);
+ printk ("systemtap_test_module1: invalid command type %d\n", (int)type);
return -EINVAL;
}