On Tue, Mar 22, 2016 at 10:44:40PM +0700, Robert Elz wrote: > All that said, I offer the following patch (inspired by an earlier, > simpler, one from Martin Husemann) which makes two changes to vnconfig > (also called vndconfig in current.) > > First, it allows vnconfig -l dev... rather than just vnconfig -l dev > (ie: you can give more than one device to list), so if you really need > to get the status of all vnd devices in /dev, you can just do > > vn[d]config -l /dev/vnd*d > > And second, it adds a -m N (N is a decimal integer) that can be used > instead of device names with -l, to specify the minimum number of vnds > vn[d]condig should list (it will list more if the kernel knows more, > and with current kernels, that always means it will list some multiple of 4.) > As a special case, -m 0 causes all output of unused vnd's to be suppressed, > and suppresses error messages (but still returns a non-zero exit code) > in the case that either there is no /dev/vnd0* existing, or the kernel > does not have the vnd driver configured.) The default value for -m is 4 > for compatibility with ancient versions of vnconfig (which typically listed > 4 vnds if the kernel had the vnd driver, and /dev/vnd0d existed)
I think we should go with this and pull this all up to netbsd-7 as well. Any objections? Martin