From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9242 invoked from network); 24 Jun 2020 05:34:27 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 24 Jun 2020 05:34:27 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 794A39459C; Wed, 24 Jun 2020 15:34:24 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id E13099459A; Wed, 24 Jun 2020 15:34:03 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=iitbombay-org.20150623.gappssmtp.com header.i=@iitbombay-org.20150623.gappssmtp.com header.b="KbMOd4bR"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 69A559459A; Wed, 24 Jun 2020 15:34:01 +1000 (AEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by minnie.tuhs.org (Postfix) with ESMTPS id EB0AC94599 for ; Wed, 24 Jun 2020 15:34:00 +1000 (AEST) Received: by mail-pl1-f193.google.com with SMTP id f2so565740plr.8 for ; Tue, 23 Jun 2020 22:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=udl7sFguABpSmVT+xtlX/Ofl9nJ58O1fGpQR5E/Kmj8=; b=KbMOd4bRe6jced8HAOpocaTrkVTAhyIzgNimWL8LwcCSex09G16gg5aAtZHQ80/zF8 aUwqJyO+vfS24falhhWN1M4QfPsPqUUZy7rWF33YeWwKanmVJ1wH7JFsCUrRS2SiTdLo vpYnplfbKU2edAklFwmdxDG2igN9oiXUJXl1HSTcYP6B1ILjJ8dgb5icJ8fwkEW3ghgm 5wnsRQCrP7kdt8G6umbPEHtVrfcDGj1ijQCvNa5OkPd4Pj8abPTEEz6BRTKR8nycVY7F dMety4gnEcSVx/KUsindRVXPNYzNNuv3mbhlhxMPxIEtH2ZNmqgZFRCCivZLO67JVcsH ND9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=udl7sFguABpSmVT+xtlX/Ofl9nJ58O1fGpQR5E/Kmj8=; b=TQVxzY15MGA6O9wMF+Hix07U3DWKM2I7zPdZQ0n5VnbbOSftUsRIEq44XeQKGF9dtO ZxEok21QVIF8XDNBvW8VDR7kqjIuhEKWYDaSppUKL5WVf9PI1wdNOb8z8QrkNEXIQov/ QkwkyJWj0Sq71n60tOVgerDbGitmdh3qedvG+AhztFBpg0u5O6/M8XOsR2HCm4PJx6x4 PA3SctycQc1A+S3OWbzHYj3RpiNNwUn1joyfA7YKc8uqHSVxpWFeD75yzp1amows0Bx3 YPZiRLjRzLA1DNslArosuvQjK400nWIDFNGPDVQw9hBYcf2TDEBL3l8DZ5nbzMSH1mZE 9Hxg== X-Gm-Message-State: AOAM531JH1/XhAz1W2icrsPwdjY/WbbvObS7vZJm8vv2XtPYaElERvx5 3wCofWlhEdB9Uvfk9iDXiD+lswQM/XSQ/g== X-Google-Smtp-Source: ABdhPJx8TPu7dOZafAOrVuPnozv5FNmHU1oAwl+IDhdxm+GwbFlVboMFVjWt+M14LmpJFJb41hE+hQ== X-Received: by 2002:a17:90a:20e9:: with SMTP id f96mr5593642pjg.13.1592976839663; Tue, 23 Jun 2020 22:33:59 -0700 (PDT) Received: from 107-215-223-226.lightspeed.sntcca.sbcglobal.net (107-215-223-226.lightspeed.sntcca.sbcglobal.net. [107.215.223.226]) by smtp.gmail.com with ESMTPSA id f3sm4217484pjw.57.2020.06.23.22.33.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2020 22:33:58 -0700 (PDT) From: Bakul Shah Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Date: Tue, 23 Jun 2020 22:33:56 -0700 References: <1592950638.2831.for-standards-violators@oclsc.org> To: The Eunuchs Hysterical Society In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.104.14) Subject: Re: [TUHS] VFS prior to 1984 X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Jun 23, 2020, at 10:10 PM, Dave Horsfall wrote: >=20 > On Tue, 23 Jun 2020, Warner Losh wrote: >=20 >> > Ioctl: the Swiss Army knife of system calls. I thought it was a = neat > idea when it arrived (much better then those primitive stty/gtty = > calls) but now... >> More like the swiss army chainsaw with engine trouble and a dull = blade.... >=20 > (Slowly drifting off-topic (as all mailing lists do) so perhaps a new = thread would be better.) >=20 > Love it! On the other hand though, if an extra service is required of = the OS and you don't want to extend ioctl(), then that means Yet Another = System Call (tm). I really like the idea of /proc, so if there's an = equivalent for ioctl() then I'd love to see it; /sys would be an obvious = choice, but it's already taken (Harris' Lament). >=20 > No doubt, someone will now chime in and say that there's an existing = mechanism involving shared memory or something... My Unix-fu is getting = rather long in the tooth now (just like me). plan9 has ctl devices that accept commands as ascii strings and mostly return results as ascii strings too. Very handy. For example if you have a optical disk drive you can send commands via its ctl device. There is no technical reason why this model can't be adapted in Unix. The fact is that the Unix byte/block read/write model goes only so far. Every device has its own peculiarities that need to be queried or controlled. And then there are controllers or USB device treees where you can hang useful devices at varius places. Bottom line: while dealing with real devices you can push this complexity around. You can't make it disappear. At one point a friend and I were looking at building a product using plan9 and one of the things I wanted to do was to make sure that the "ctl" file for every device responded to a "help" message that yielded one line per command and "help " for more details. That way you can discover their capabilities at runtime.=