I need to make this user space buffer to zero before copying the string c into the buf How to initialize the buffer to zero.
static ssize_t myread(struct file *file,char __user *buf,size_t len, loff_t *fops)
{
printk(KERN_INFO"My read with length %d \n",len);
len = strlen(c);
if(copy_to_user(buf,c,len) != 0)
return -EFAULT;
else if (*fops > 0)
return 0;
else
*fops += len;
return len;
}