i'm trying read ioctl params sent application. in driver side cmd , arg (3rd , 4th arguments) values coming same, if send different values. both params showing argument value isent application. can 1 me solve this? here code : application : ioctl(fd,0,1). driver ioctl : cmd = 1. arg = 1.
int char_ioctl(struct inode *inode_num, struct file *fp, unsigned int cmd, unsigned long arg) { int ret = 0,i; printk("cmd : %d\n",cmd); printk("arg : %d\n",(unsigned long)arg); switch(cmd) { case getcapacity: ret = buffer_max_size; break; default : break; } return ret; }
Comments
Post a Comment