From owner-freebsd-drivers@freebsd.org Tue Feb 19 16:29:25 2019 Return-Path: Delivered-To: freebsd-drivers@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 B87B614F50C1 for ; Tue, 19 Feb 2019 16:29:25 +0000 (UTC) (envelope-from demetrioussharpe@netscape.net) Received: from sonic303-21.consmr.mail.ne1.yahoo.com (sonic303-21.consmr.mail.ne1.yahoo.com [66.163.188.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC70E8D312 for ; Tue, 19 Feb 2019 16:29:23 +0000 (UTC) (envelope-from demetrioussharpe@netscape.net) X-YMail-OSG: u7q9B3QVM1mtsKxTX6VpbnBD47P3JOqTtEZw.wACuWyz3EGq6gUpFm4iYghaJ0n blRC_M7woFikt6HFo5jkFFpbzjR4qkAJWBI9FOtVJbCeMrPBAo7g9TPe3aaXFZZwViw6K8g9L6Vu wav9PFPi_9hnmc9WxJzaifXo8ZtZfsBl0qfWE.M.bFE7oXW1H1h.ajVMsSgurlBReyhtulubCUs2 tkguuKiiWPq2YnJQwMtPbGjAqqFxA4JoV1Bny7mJHtJWCD7qAIPbQtGV9gSUf49BtesjGnztfApT 0ooQrVcg_SMta0sC47x0Gkda3_ATkl8m1aimZ5FDEem.ezDDyr_AeZZ0v8WOLIYdikDXfqt3H0lZ WhBz97K9QvvdTvRLOq13JTc4G.c9K._ep5BcNxYr5RprTv8E_Jtrff50YGjPiJS9bGKi0na2DIYq lv4J4m7DC9d8uO18knfVOTUCGZLgc.Pfdzz_csUVNi8ii2tt97dh0BLJHYRJTkFBhX0PGbkeSZp5 xSgjRGqWami0k15mpYrVpztaJzLRCXtnlki11hLstFKBWyWkXWcyp89GD9oxo90316_lNoqNfRKG ItZTwdeKa0uIzO2fi7rMTTMCmSrGv0QhB7AVTXJhakpjYZwrlzbpPmPqVWeWOYHu74Z20IUhNAix XZIzu.SEwgRCi3SXVscO4P75ujMHh7v6EmXa9H73N5tcAghXvGZXevcLEmH7g8g99ayxP1oQVa8r 8rJD1y2Skq_5pg4MKzLn5Bn17rrkyHOznpbCQlTakwrIZ1vXEdETBzAcEKyFFymdhlniDw8y6J6S zQW9q3_jnQ0jGBlL4BucVXZrgk0ctZiLE7SQU2n9jk05B8XIBRfajoiDBM4KpS6OSGm0uv89_YTT PRFYLhwAgGWVz5yEQhQJVuP.6x2Js4fZJoBXfji2VPcrDUDLC8kKcBn09sRDtof6nHMINsk.3XOI oXiCmnQO3JwwvEYDA4YBvtzO7fQLQ7MRMCLww7_eIr2bl.jEQFTfmqCpDN67P5tTT1nzeVThfIjK MjfdasZF_HoC6TgNju5uGyxdvyMuapwE- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Tue, 19 Feb 2019 16:29:16 +0000 Received: from 75.3.110.170 (EHLO [192.168.10.40]) ([75.3.110.170]) by smtp415.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c55f9a72f1b3f98a48774639399110c4 for ; Tue, 19 Feb 2019 16:29:15 +0000 (UTC) To: freebsd-drivers@freebsd.org From: "A. D. Sharpe" Subject: Subdirectories for devfs Message-ID: <6b0fda65-edca-c250-4bd4-8a5f56a2ddba@netscape.net> Date: Tue, 19 Feb 2019 10:29:13 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: DC70E8D312 X-Spamd-Bar: +++++ X-Spamd-Result: default: False [5.06 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:66.163.184.0/21]; FREEMAIL_FROM(0.00)[netscape.net]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[cached: mx-aol.mail.gm0.yahoodns.net]; DKIM_TRACE(0.00)[netscape.net:+]; DMARC_POLICY_ALLOW(0.00)[netscape.net,reject]; RBL_SEM(1.00)[147.188.163.66.bl.spameatingmonkey.net]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[netscape.net]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[netscape.net:s=a2048]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.89)[0.889,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-drivers@freebsd.org]; NEURAL_SPAM_MEDIUM(0.99)[0.990,0]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; IP_SCORE(1.20)[ip: (4.02), ipnet: 66.163.184.0/21(1.13), asn: 36646(0.91), country: US(-0.07)]; NEURAL_SPAM_LONG(1.00)[0.996,0]; RCVD_IN_DNSWL_NONE(0.00)[147.188.163.66.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 16:29:26 -0000 Hello all, Does anyone know of a simple way to reorganize /dev contents into subdirectories based on the category of the device by manipulating devfs.rules & devfs.conf? I'd like to remove device nodes from /dev & reorganize it to look something like this: /dev/audio /dev/bus /dev/graphics /dev/input ...and so on. Or is this something that would require extensive changes to the driver sources? -- Regards, Apollo D. Sharpe, Sr. From owner-freebsd-drivers@freebsd.org Tue Feb 19 19:10:54 2019 Return-Path: Delivered-To: freebsd-drivers@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 24FA514F9D83 for ; Tue, 19 Feb 2019 19:10:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2836DE1F for ; Tue, 19 Feb 2019 19:10:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id n32so24400245qte.11 for ; Tue, 19 Feb 2019 11:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xat7CYDd8uO/cOba5Imja5Jxbq6XSdDJa5/xaXr2M5A=; b=zs0+kzg/St6c56V5V9HgMJCPSdAat/cGyEUSYfA+RIGwVlOq9nPMy1Gs/ig+iN0N4p SrcwfACqtvizpgnQO8rGEnNfPBhoM9sO/PyUZzwSLgC8QStwRW8tEuHyRx43rGG3PSRK UdajA7E1rq/g9rKJEgDqz6ztZc/fPnWFvG7ZH79e6XV7cpvJq97PHrpyEvE86+flHDZ7 2yGORNdRiTEcfgTDDFvdjzzvNJGhL9+C/qNwS1mQ2Ju+DUdDqL6rE30m3MFyydwgTWRu JqibP5IatudR+113GQF8nOilAsVjiynAn74qg0UbC9sjhEnO1wk46xWYxcpYVTK43juk QVRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xat7CYDd8uO/cOba5Imja5Jxbq6XSdDJa5/xaXr2M5A=; b=PQsy617pZlcbM4ohlwOJC5n2+kGUvEUepB2OhYGCwoVAaBA4Wa0odNGnf95TjJiYiV 2CDxOv9AWno9RcK8nQlQzPSCD1OU2XvHRAVlntcOOcRgzxHjC2S2xrbJLH4INsBdOrZB z2tNjFq9dmAwZsFGqC7WIruqu0qq8uxXIVBo4nx7RGaU2FcIYxWGFBPcao3FCLuVI+YH bSFCohJOfpkasjcbOn9vC71FyVtPJvWmR6XYbB6tFVh5ArpuVOLZPiKvyo6qbRySL+Zo QH7ZXAlOGIW9dZi8n+vxxqgB+nKzPWkIOU7BbFg7XPg3Vvyturad7Sv33Y+Ghz0V2rKa F+dA== X-Gm-Message-State: AHQUAuZVunSN1ZKlQMkp4PY7+X4BebCcimd2GWxmw1emnsLra1YjfccC c/mlZxFL7WfjtEPoVI0xkmL+EOZA6whWsxKDWn0NbQPb X-Google-Smtp-Source: AHgI3IaIzVDBuOPZtVK1xngCZD2Kqu4WZ8+XZleub72x8WAGKMJ/lEZ9UdA3GcXtNcRSWpTTmgh2fHNkKZXCjgJqaPs= X-Received: by 2002:ac8:35f8:: with SMTP id l53mr24474970qtb.15.1550603452231; Tue, 19 Feb 2019 11:10:52 -0800 (PST) MIME-Version: 1.0 References: <6b0fda65-edca-c250-4bd4-8a5f56a2ddba@netscape.net> In-Reply-To: <6b0fda65-edca-c250-4bd4-8a5f56a2ddba@netscape.net> From: Warner Losh Date: Tue, 19 Feb 2019 12:10:41 -0700 Message-ID: Subject: Re: Subdirectories for devfs To: "A. D. Sharpe" Cc: freebsd-drivers@freebsd.org X-Rspamd-Queue-Id: 3F2836DE1F X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=zs0+kzg/ X-Spamd-Result: default: False [-5.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.82)[-0.817,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-drivers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[3.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[netscape.net]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.67)[ip: (-8.68), ipnet: 2607:f8b0::/32(-2.60), asn: 15169(-1.98), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 19:10:54 -0000 On Tue, Feb 19, 2019 at 9:30 AM A. D. Sharpe via freebsd-drivers < freebsd-drivers@freebsd.org> wrote: > Hello all, > > Does anyone know of a simple way to reorganize /dev contents into > subdirectories based on the category of the device by manipulating > devfs.rules & devfs.conf? I'd like to remove device nodes from /dev & > reorganize it to look something like this: > > /dev/audio > /dev/bus > /dev/graphics > /dev/input > > ...and so on. > > Or is this something that would require extensive changes to the driver > sources? > Would require changes to both driver sources as well as to the programs that use the driver nodes for different things. The effect of that will vary from "hack one place in the code" to "extensive changes are needed in dozens or hundreds of locations, many out of the tree". What's the motivation? Warner From owner-freebsd-drivers@freebsd.org Tue Feb 19 20:48:37 2019 Return-Path: Delivered-To: freebsd-drivers@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 1282814D7FBD for ; Tue, 19 Feb 2019 20:48:37 +0000 (UTC) (envelope-from demetrioussharpe@netscape.net) Received: from sonic307-11.consmr.mail.ne1.yahoo.com (sonic307-11.consmr.mail.ne1.yahoo.com [66.163.190.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E39FE72EB1 for ; Tue, 19 Feb 2019 20:48:33 +0000 (UTC) (envelope-from demetrioussharpe@netscape.net) X-YMail-OSG: 2.XqDYUVM1lDc8zHxSf2FuGYciH1_w7e0Xhws3bEWhSAYcXpYGWnyjKJZMYd10w eAulNA5WyWuaylb3gJceCtx85DrGckuaKeGnL76Z37wY2gApQAPz_Ub27Km7zWkPswRPQz6tU0ER hJmuD8Ea0vLgAbEyEE8CCqTOUqc6fW6wyH6NE0BGFldmEZcPUnOyofZTScUQLdHLGeTrpQh_x65i Ec0..IRAQFCvK1qmFDLlqUhFnnuWYROgExhMS7J5UuKa2o_pgkq1XIvxlerZlaHW28t_ZdSmiMaY Lg92uiqniPhgJMSNXT3Hi07uecNm7XvzMsU5UoPyfwkKpEEQZXPcbfWvkAZVibWngv75XYmNemo2 FWMDE5ZaHgRzt_1OifyUyUynTUkRxFfZmlzyD8zcrMqvtTDoLtuDgQYze4o6Nt9zpxjilnTMNiJ3 6Q2_VURBx8PCXP_BbU.53DSUkRozfUll.ToohOeFWpzZkeYaYcodIdB.1nJCClj41tjApqT6eErO s1zdANMAu9ducFFfNdt985Lor0wvj69GA9hrUYNV40qis6_X.wR._wtlVBWJwbFD5QxnZw52LeQB Uc3XYh8CV8udlybJi5g834vnAVdoY2y9rxH_fOrQhZaYHW30bhYs5VRET060iQCNWkVo1V5AoOWM NMft4_Gv620.htUdTV2sW7M3So4KMy1UV.Quvx8Pyz5I_RKwkqx3msMqzDgRmHhCj9M_yVPxxjcR B9xUXok4stOlugLyARQbIDv_uIrl2bEbdnhwG7Cg2G.iUvNJUa6puoLGW2YaDVa2SjVtvwy2pYEv iauadA7tIMyxJsOHmtGuISqqB8nLjDxfzuCtBX.H04qkQYvx0_d0opBa_9X4Woh1uHbFK9ju6KVn TcxRSOZbIdPFMbQzTlApd1lRb7SjLbxsZM8V.7mSEgLjEihAPYYD9SQLsQfGYqPZM3Mjxp1cezTL 5XgpJlHY3u6udQmPj_b5F1WW_21_OlXTXQLENOmX15IcESItZy3UXNkrpmjOjsT4wGzAI6u.paU6 QC6T5.TRnCVS5XH8u4m4vxHdC1xl5Mu_AourdDmckwMkhMzEAblTt Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Tue, 19 Feb 2019 20:48:26 +0000 Received: from 75.3.110.170 (EHLO [192.168.10.101]) ([75.3.110.170]) by smtp409.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e3a1c70bd9149193560cfafd9b4839f2; Tue, 19 Feb 2019 20:48:24 +0000 (UTC) Subject: Re: Subdirectories for devfs To: Warner Losh Cc: freebsd-drivers@freebsd.org References: <6b0fda65-edca-c250-4bd4-8a5f56a2ddba@netscape.net> From: "Apollo D. Sharpe, Sr." Message-ID: <3a05792c-0e40-b661-6362-fe6d0b7e4a03@netscape.net> Date: Tue, 19 Feb 2019 14:48:17 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: E39FE72EB1 X-Spamd-Bar: + X-Spamd-Result: default: False [1.59 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[netscape.net:s=a2048]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.163.184.0/21]; FREEMAIL_FROM(0.00)[netscape.net]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-0.25)[-0.249,0]; NEURAL_SPAM_MEDIUM(0.63)[0.625,0]; NEURAL_SPAM_SHORT(0.92)[0.924,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx-aol.mail.gm0.yahoodns.net]; DKIM_TRACE(0.00)[netscape.net:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[34.190.163.66.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[netscape.net,reject]; IP_SCORE(1.30)[ip: (4.53), ipnet: 66.163.184.0/21(1.13), asn: 36646(0.90), country: US(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[netscape.net]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 20:48:37 -0000 On 2/19/19 1:10 PM, Warner Losh wrote: > Would require changes to both driver sources as well as to the > programs that use the driver nodes for different things. The effect of > that will vary from "hack one place in the code" to "extensive changes > are needed in dozens or hundreds of locations, many out of the tree". > > What's the motivation? My personal motivation is that I believe that making /dev more organized, with a hierarchical standard, could help streamline the system a bit. I also believe that it could make the development of user-space systems a bit easier in the long run. For instance, I consider it the beginnings of a maintenance nightmare to have to look into multiple spots for input devices. I think that it would be much more simple to have the capability of iterating through a specific path that only contains input devices. I feel the same way about each category of device. Which brings the benefit of one less thing to worry about when building subsystems that specifically communicate with a specific set of devices. Also, I think a more hierarchical /dev makes it easier to tell exactly what kind of device you're looking at when you're using the terminal or the file browser. Now, I realize that this most likely doesn't matter one way or the other for server usage cases. I also understand that both ways may amount to a null sum. However, I do think that this could definitely go a long ways towards: a). Giving us a better foundation for creating our own solutions rather than being forced to accept the current trend of being cornered into implementing Linux interfaces. I believe that FreeBSD is often an afterthought simply because a lot of developers simply don't want to muck about with certain parts of the kernel's infrastructure. b). Slightly lowering the bar for the creation of new solutions for/using BSD technology. Personally, finding information required to do certain things seems to be hit or miss when it comes to internals of FreeBSD. It almost always ends in me asking for info in multiple places, because the info isn't really in the man pages & the documentation for the kernel's code leaves a lot to be desired. c). Bringing order to a part of the system that seems to be a free-for-all. As told to me on the FreeBSD USB mailing list: "From the kernel side, some subsystems do create a hierarchy (or at least a subdir for a set of related devices), and others don't. There is no system-wide policy about it either way." Yes, I realize that I may be the only one who feels this way. No, this isn't a push for the overall BSD community to throw caution to the wind & jump head-first into this idea. I'm really trying to understand the magnitude of what it would take to do this privately. This is an area of FreeBSD that I think could be improved on. Obviously, there's a lot more work required before FreeBSD really becomes an outstanding desktop system, but I do think that a lot of the foundational work would have to come from organizing /dev. -- Regards, Apollo D. Sharpe, Sr.