i have a task: create a simple character device with major number = 255 and print "Hello World" every time when it is being opened. It's really simple task, but i don't know, how to handle device with unknown minor number. I can create an array of 256 elements of my device structure and bind it with (255, i) node number. But it can`t be optimal, because there is 255 unused objects of structures in memory. So, how can i handle a device with known major and unknown minor number?
Subscribe to get latest updates