]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC nmdm driver changes, r259550 and r271350
authorgrehan <grehan@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 18 Sep 2014 19:20:08 +0000 (19:20 +0000)
committergrehan <grehan@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 18 Sep 2014 19:20:08 +0000 (19:20 +0000)
commitb76af560f363c896f5905ebef3481801f3c8fea3
treecd12cca0cb1719d2320d53982e44d0608c55043a
parent368276a335bd8b1e34955a4b022ce9cd9bb35d47
MFC nmdm driver changes, r259550 and r271350

r259550 (glebius):
 Make nmdm(4) destroy devices when both sides of a pair are disconnected.
 This makes it possible to kldunload nmdm.ko when there are no users of it.

r271350:
 Fix issue with nmdm and leading zeros in device name.

 The nmdm code enforces a number between the 'nmdm' and 'A|B' portions
 of the device name. This is then used as a unit number, and sprintf'd
 back into the tty name. If leading zeros were used in the name,
 the created device name is different than the string used for the
 clone-open (e.g. /dev/nmdm0001A will result in /dev/nmdm1A).

 Since unit numbers are no longer required with the updated tty
 code, there seems to be no reason to force the string to be a
 number. The fix is to allow an arbitrary string between
 'nmdm' and 'A|B', within the constraints of devfs names. This allows
 all existing user of numeric strings to continue to work, and also
 allows more meaningful names to be used, such as bhyve VM names.

PR: 192281
Approved by: re (glebius)

git-svn-id: svn://svn.freebsd.org/base/stable/10@271800 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/nmdm/nmdm.c