On 8/18/20 10:10 AM, Pino Toscano wrote:
What about stat()ing /dev/mapper/control? That should give you the major/minor of that special character device.
That won't help. We need to get the major of devmapper targets. For instance, if there is /dev/dm-0 node, it's going to be a block device with major of devmapper targets. All devmapper targets will have the same major number. And this number can be defined when loading the module. Then, /dev/mapper/control is a character device with completely different major:minor numbers.
Michal