Skip to content
Snippets Groups Projects
Commit f463479b authored by Christian Löpke's avatar Christian Löpke
Browse files

Fixed broken indention whitespace -> tab

parent f15221c9
Branches
No related tags found
No related merge requests found
Pipeline #
......@@ -189,16 +189,16 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off)
DEVICE_NAME,
USERBUF_LEN);
return -ENOMEM; //Return not enaugh memory
}
else {
}
else {
int i;
for(i = 0; i < len; i++) {//Save the given string
if(get_user(msg_username[i], buff + i) < 0) { //If returning error code
printk(KERN_WARNING "%s: You want to play a trick on me! This memory does not belong to you!\n",
DEVICE_NAME);
return -EFAULT; //Stop reading from userspace.
}
for(i = 0; i < len; i++) {//Save the given string
if(get_user(msg_username[i], buff + i) < 0) { //If returning error code
printk(KERN_WARNING
"%s: This memory does not belong to you!\n",
DEVICE_NAME);
return -EFAULT; //Stop reading from userspace.
}
//msg_username[i] = buff[i]; //Heres was the CRASH
//printk(KERN_INFO "Got %c at %d from %d bytes.\n", buff[i], i, len);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment