simple_dev.c #include #include #include #include #include #include #include dev_t id; struct cdev cdev; struct class *class; struct device *dev; char temp[100]; #define DEVICE_NAME "simple" int simple_open (struct inode *inode, struct file *filp) { printk( "open\n" ); memset( temp, 0, 0 ); return 0; } int simple_close (struct inode *inode, struct file *filp) { printk( "close\n" ); return 0; } ss..
실행결과 응용 프로그램 simpleApp.c디바이스 드라이버 simple_dev.cdevice file open[13895.005913] openApp : write something life is good 12bytes[13895.009107] simple_write [13895.013561] DEV : read something [13895.018762] life is good 12bytesApp : read something life is good 12bytes[13895.023354] simple_read [13895.027854] DEV : write something [13895.033086] life is good 12bytesioctl function call ret = 0[13895.03..