HEADS UP: device name checking on device registration

Matthew Jacob mj at feral.com
Wed Oct 13 16:53:57 UTC 2010


  I think this seems good. Perhaps you could also fix devfs to not panic 
when somebody tries to make a device that already exists and just return 
an error with a diagnostic while you're at it?

On 10/13/2010 1:50 AM, Jaakko Heinonen wrote:
> [Posting a patch to -geom for comments.]
>
> On 2010-10-07, Jaakko Heinonen wrote:
>> Currently several GEOM classes (notably geom_label) allow to create
>> devices with invalid names. Below is a link to a patch which converts
>> g_dev_taste() to use make_dev_p() with MAKEDEV_CHECKNAME flag. It's not
>> a complete solution and essentially changes the panic to a printf.
> What do you think about this patch?
>
> 	http://people.freebsd.org/~jh/patches/geom_dev-checkname.2.diff
>
> Any better ideas how to handle this in GEOM? It doesn't seem to be
> trivial to propagate an error from g_dev_taste() due to asynchronous
> nature of the device registration in GEOM.
>


More information about the freebsd-geom mailing list