Re: [TEST(/review)] major/minor/devname fix

From: Andrey Chernov <ache_at_nagual.pp.ru>
Date: Thu, 10 Mar 2005 09:24:11 +0300
On Wed, Mar 09, 2005 at 10:40:18PM +0100, Poul-Henning Kamp wrote:
> +dev_t
> +dev2udev(struct cdev *x)
> +{
> +	if (x == NULL)
> +		return (NODEV);
> +	return (x->si_inode ^ devfs_random());
> +}

...

> +	dp = devfs_itod(ud ^ devfs_random());


Why you try to use randomization here instead of sequental ordering (or 
reversing/shifting it)? In such small number of bits there is a big 
probability of collisions may occurse.

-- 
http://ache.pp.ru/
Received on Thu Mar 10 2005 - 05:24:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:29 UTC