Pass a minor number instead of a unit number to make_dev().

Devices with the wrong major were being created for units >255.
This commit is contained in:
Tim J. Robbins 2003-02-07 23:29:57 +00:00
parent eecb384463
commit a8c8a6cbc0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110525

View File

@ -111,13 +111,14 @@ static eventhandler_tag nsmb_dev_tag;
static void
nsmb_dev_clone(void *arg, char *name, int namelen, dev_t *dev)
{
int min;
int u;
if (*dev != NODEV)
return;
if (dev_stdclone(name, NULL, NSMB_NAME, &min) != 1)
if (dev_stdclone(name, NULL, NSMB_NAME, &u) != 1)
return;
*dev = make_dev(&nsmb_cdevsw, min, 0, 0, 0600, NSMB_NAME"%d", min);
*dev = make_dev(&nsmb_cdevsw, unit2minor(u), 0, 0, 0600,
NSMB_NAME"%d", u);
}
static int