From owner-svn-src-head@FreeBSD.ORG Wed Sep 10 07:33:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D92F42A3; Wed, 10 Sep 2014 07:33:50 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4508806; Wed, 10 Sep 2014 07:33:49 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id z11so6665055lbi.26 for ; Wed, 10 Sep 2014 00:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=f1F6o0qzgYlKxUKSk2MKnps76sgHKcH7reFNYBuaVRU=; b=iqAdHvv6ng/SC7ldwySZ4Dz4cfDqpMy5keD0BLhpjl+AW/E6cPbVUCQjjUph6qzQtT uI/VetYha/AB2Ub6q1Ay5SV4IsT3ByTxSq3DOUIqLFjdlInPaSFZdaXpWtYoJgx5vWCj VtADNtKV869IVPGhB5oTSPkg2KpAFjOjwXfqABoHLSbEzE2c4b8CBiNXilW2K1LHcFv7 bNzq2Jn3NvolbigYRSQpw5tk8y2DlVMkLwYPnDIoQpBFEqdNAUHgOrVluufEUzGnjUS/ qMvD0cwOomLWNUoXpOp2SfIU7I2dUEC1eBXEU6o69raIl84giKCrrjKX7tVTfQ6BSXSh 2aEA== MIME-Version: 1.0 X-Received: by 10.112.114.202 with SMTP id ji10mr1019684lbb.92.1410334427212; Wed, 10 Sep 2014 00:33:47 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.22.72 with HTTP; Wed, 10 Sep 2014 00:33:47 -0700 (PDT) In-Reply-To: <201409100544.s8A5iGQD035135@svn.freebsd.org> References: <201409100544.s8A5iGQD035135@svn.freebsd.org> Date: Wed, 10 Sep 2014 00:33:47 -0700 X-Google-Sender-Auth: Gn1qc672T05q139Jzd0WRwCu5hA Message-ID: Subject: Re: svn commit: r271350 - head/sys/dev/nmdm From: Craig Rodrigues To: Peter Grehan Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 07:33:51 -0000 On Tue, Sep 9, 2014 at 10:44 PM, Peter Grehan wrote: > Author: grehan > Date: Wed Sep 10 05:44:15 2014 > New Revision: 271350 > URL: http://svnweb.freebsd.org/changeset/base/271350 > > Log: > 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. > > Tested on amd64, i386 and ppc64. > > Reported by: Dave Smith > PR: 192281 > Reviewed by: neel, glebius > Phabric: D729 > MFC after: 3 days > > This works quite well. I've created this nmdm device: crw------- 1 root wheel 0x87 Sep 10 07:30 /dev/nmdmscan-ci.FreeBSD.orgB and it works. This is very handy for encoding the name of the bhyve VM in the nmdm device entry. Thanks! -- Craig