Techiio-author
Started by Bruce MccullamSep 24, 2021

Open
How to handle device with unknown minor number?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

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?

0 Replies

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance