From owner-svn-src-all@freebsd.org Sat Feb 17 15:19:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7158DF17DEC; Sat, 17 Feb 2018 15:19:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13E5E849E7; Sat, 17 Feb 2018 15:19:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0067326027E; Sat, 17 Feb 2018 16:19:56 +0100 (CET) Subject: Re: svn commit: r329458 - head/sbin/devmatch To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201802171434.w1HEYl8I063603@repo.freebsd.org> <5b49c102-ad07-cfdb-2e45-e27cee99ee81@selasky.org> From: Hans Petter Selasky Message-ID: Date: Sat, 17 Feb 2018 16:17:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 15:19:58 -0000 On 02/17/18 16:07, Warner Losh wrote: > It would be more helpful if you could turn on devd's logging (by adding > !devd > *.>=info /var/log/devd.log > to /etc/syslog.conf, restarting syslog and then giving me the exact > scenario that's failing so I can add it to a test suite I'm writing. The > data will be in /var/log/devd.log. I can't possibly test all the crazy USB > scenarios with the hardware I have (there's too many of them), but I can > test it in simulation and make sure we're good. It wasn't a problem with devd. It was a problem with /etc/rc.d/devmatch . In your initial devmatch rc.d, look at this: one_nomatch="-p '$2'" devmatch ${one_nomatch} Try this (your initial devmatch): #!/bin/sh test='? at bus=0 hubaddr=1 port=6 devaddr=8 interface=1 ugen=ugen0.8 vendor=0x8087 product=0x0a2b devclass=0xe0 devsubclass=0x01 devproto=0x01 release=0x0001 mode=host intclass=0xe0 intsubclass=0x01 intprotocol=0x01 on uhub0' one_nomatch="-p '$test'" devmatch ${one_nomatch} I fixed it to this, which works: #!/bin/sh test='? at bus=0 hubaddr=1 port=6 devaddr=8 interface=1 ugen=ugen0.8 vendor=0x8087 product=0x0a2b devclass=0xe0 devsubclass=0x01 devproto=0x01 release=0x0001 mode=host intclass=0xe0 intsubclass=0x01 intprotocol=0x01 on uhub0' one_nomatch="$test" devmatch -p "${one_nomatch}" Because the $2 variable already contains ''s from devd, the variable expansion then makes devmatch receive the whole devd generated variable list like a separate arguments. Which leads me to believe you are not using /bin/sh or you tested something different than was committed ?? --HPS