49 ssize_t complete_write (struct file *filp, const char __user *buf, size_t
count,
50 loff_t *pos)
51 {
52 void *temp;
53 printk(KERN_DEBUG "process %i (%s) awakening the readers...\n",
54 current->pid, current->comm);
55
56 int a = copy_from_user(temp,buf,count);
57 printk("String is = %s\n",(char *)temp);
58 printk("a is = %d\n",a);
59
60 printk("conut = %d\n",count);
61
62
63 return count; /* succeed, to avoid retrial */
64 }
65
我只是想要 echo "any string " > /dev/mydevice
然後在dmesg中 看到我的string 但是沒有辦法看到 只看的到count = string的長度
但是a=0 且 string 會是null 求救了