I'm currently working with a custom device driver that I installed. I'm very new to this and having trouble understanding how to get the data that I write into it from the command line.
For example, I write data to the file like so:
echo -n "test" > /dev/custom
And then I merely want to get the string here, so I can use the characters within:
static ssize_t custom_write (struct file *f, const char *buf, size_t len, loff_t *offset)
{
printk(KERN_ALERT "Test\n");
return len;
}
buf?