3 ms·
... as long as you don't want to do fancy IOCTL() work. basically, its the jump table model from 1980s with a few extra twists like templating. "here, steal th
by ggm 5y ago
... as long as you don't want to do fancy IOCTL() work. basically, its the jump table model from 1980s with a few extra twists like templating.
"here, steal this mknod number" is dangerous. It pays to check nothing else is using that value. Thats what registries are for in the end.
- trasz 5y agoThat's why FreeBSD doesn't use mknod(8) - or device numbers - at all. You can kind of work around this obsolete idea instead - that's what Linux is doing - but it's not optimal.
- yjftsjthsd-h 5y agoWait, how can you do it without any device numbers? Are they binding drivers directly to file names?
- trasz 5y agoPrecisely. That's one of the reasons devfs isn't optional in FreeBSD. (Note that FreeBSD devfs is very different from the one that's been there in Linux years ago, and doesn't have its deficiencies.)