>>> Don't cloner instances differ in minor number? [...] >> Not that I?m aware of. [...] > Well, as noted in this thread, traditionally you can tell when two > files are the same by examining stat results.
Maybe that should be a hint. See below. > And the cloner mechanism replaced an older scheme where you had to > pick the number of instances you wanted, and unless I'm > misremembering badly in that world each had to have its own minor > number. That's my understanding as well. > That said, it almost certainly isn't important... Well, if it means that with a minor tweak NetBSD could have kcmp(3) instead of kcmp(2), it could be. It occurs to me that, if you give each device_t a unique-per-boot serial number and return that in structs stat, writing a kcmp(3) would border on trivial. (The _implementation_ would be NetBSD-specific, in that it would depend on st_serial or whatever you call it, but the _interface_ wouldn't.) Except, hmm. The above covers only DTYPE_VNODE. I'm not sure what could be done about other DTYPEs. If you really want to support Linuxisms - IMO that way lies madness, but it's ben somewhere between a long time and forever since NetBSD cared about MO - it might have to be kcmp(2) in order to DTRT for all DTYPEs. Or else each DTYPE would need its own analog of st_serial. Perhaps st_serial could be done in a way that's common across all DTYPEs? It'd probably need to be 64-bit to avoid running out in the face of extreme use cases, but that's hardly impossible. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B