]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/ioctl.c
Separated normal read and RTR assisted read transfer.
[lincan.git] / lincan / src / ioctl.c
index 6edca99e5ea2c1e65ca4269770ee31dd09eb95cd..63aaea10188e1495f1024a8787c60d916d82b38a 100644 (file)
@@ -84,6 +84,16 @@ int can_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
                        }
                        break;
                }
+               
+               case CANRTR_READ: {
+                       int ret;
+                       struct canmsg_t rtr_msg;
+                       
+                       copy_from_user(&rtr_msg, (void*)arg, sizeof(struct canmsg_t));
+                       ret = can_ioctl_remote_read(canuser, &rtr_msg, rtr_msg.id, 0);
+                       if(ret<0) return ret;
+                       copy_to_user((void*)arg, &rtr_msg, sizeof(struct canmsg_t));
+               }
 
                case CONF_BAUD: {
                        channel = arg & 0xff;