Use make_dev_alias_p() added in r221397 to create alias dev entry.
It removes panic in case if alias name is already busy for some reason.
This commit is contained in:
parent
7f98cbc876
commit
19fa03535a
@ -148,7 +148,8 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
|
||||
snprintf(buf, sizeof(buf), "%s%s",
|
||||
val, gp->name + len);
|
||||
freeenv(val);
|
||||
adev = make_dev_alias(dev, buf);
|
||||
make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK,
|
||||
&adev, dev, "%s", buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user