From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 25 20:58:49 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6BFF5238; Mon, 25 Mar 2013 20:58:49 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) by mx1.freebsd.org (Postfix) with ESMTP id B5208D9; Mon, 25 Mar 2013 20:58:48 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id t11so3467387wey.34 for ; Mon, 25 Mar 2013 13:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=NjV7IsSndrzfxsxeWH9SrUdQiCmqSO2rPRRuaQqUldU=; b=m+5wQNwR7LOH4/+spcnWTMnSTnUDEhAsnyfxFsIjT1gLv0+msk8Gcbio0o9Ltc2onG s4v55o4sHgkqA0VNTD10kVWTJSPTs2OYZojAXdVfMdpp0tE7o6Mt+b8cs7TnnYRGYji8 k+l+Mb+JNG+vsmZGgTCf/GJlsU21V+5XCkuITzRRVoHs8wuSgj4bU8ew/Il786ZgIaPZ PX0dCFo08Ng6zjPLUKz5LESx33FrLPkDykxi5Jh5RiUY11JHzOh1ytPgwuZIC/24xmBA TGOXfIqvgHcqCcjhKebx8zBhippyHRU7kSmaY9zeE90s0H9Q+EzftrZ79Wi0/tdnk+1S NmwA== MIME-Version: 1.0 X-Received: by 10.180.73.6 with SMTP id h6mr4359094wiv.27.1364245127844; Mon, 25 Mar 2013 13:58:47 -0700 (PDT) Received: by 10.216.139.72 with HTTP; Mon, 25 Mar 2013 13:58:47 -0700 (PDT) In-Reply-To: <5150B71B.6060106@FreeBSD.org> References: <5150B598.7050700@FreeBSD.org> <5150B71B.6060106@FreeBSD.org> Date: Mon, 25 Mar 2013 22:58:47 +0200 Message-ID: Subject: Re: kern/122838: [devfs] devfs doesn't handle complex paths (like zvol/pool/vms) good From: Kimmo Paasiala To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Mon, 25 Mar 2013 21:22:34 +0000 Cc: freebsd-hackers@freebsd.org, FreeBSD Current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2013 20:58:49 -0000 On Mon, Mar 25, 2013 at 10:44 PM, Andriy Gapon wrote: > > Would like to ask for opinions on this topic... > Please read this PR for context: > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/122838 > Especially Jaakko's insightful description of the problem. > > > -------- Original Message -------- > Message-ID: <5150B598.7050700@FreeBSD.org> > Date: Mon, 25 Mar 2013 22:37:44 +0200 > From: Andriy Gapon > Subject: Re: kern/122838: [devfs] devfs doesn't handle complex paths (like > zvol/pool/vms) good > > > Can't believe that we are still where we were more than two years ago... > > I think that we have to make this change even if it _might_ break some existing > rulesets. > > Rationale: > - current behavior is contrary to any documentation > - current behavior is contrary to common sense > - current behavior is very hard to describe and account for > - I presume that very few people actually fully understand the current behavior > - I presume that even fewer people made a conscious choice to depend or make use > of its non-trivial features of the current behavior > > So, we should make the behavior of devfs pattern consistent with the > documentation and the common sense. > > In addition to Jaakko's patch I propose that we pass FNM_PATHNAME to fnmatch(9), > so that the matching is indeed consistent with glob(3) / shell glob-ing rules > for filesystem paths. > > -- > Andriy Gapon > > > Absolutely yes. Any kind of rule based matching should default to matching full strings. The rule syntax should then offer options to narrow down the matching to a specific part(s) of the matched strings. -Kimmo