In message <20050310062410.GA27497_at_nagual.pp.ru>, Andrey Chernov writes: >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. There is no risk of collision, look at what devfs_random() does. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk_at_FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.Received on Thu Mar 10 2005 - 05:32:42 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:29 UTC