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=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2386 invoked from network); 5 Jun 2021 22:52:55 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 5 Jun 2021 22:52:55 -0000 Received: from mx.sdf.org ([205.166.94.24]) by 1ess; Sat Jun 5 18:21:42 -0400 2021 Received: from sdf.org (IDENT:nicolagi@rie.sdf.org [205.166.94.4]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 155Lw8w0003313 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for <9front@9front.org>; Sat, 5 Jun 2021 21:58:08 GMT Received: (from nicolagi@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 155Lw8e2017054 for 9front@9front.org; Sat, 5 Jun 2021 21:58:08 GMT Date: Sat, 5 Jun 2021 21:58:08 +0000 From: nicolagi@sdf.org To: 9front@9front.org Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: private stateless ACPI over YAML method table firewall pipelining-aware interface Subject: Re: [9front] /proc/n/fd format clarification Reply-To: 9front@9front.org Precedence: bulk On Sat, Jun 05, 2021 at 09:26:16AM -0400, binary cat wrote: [snip] > So this mentions 3 things, a path, a version, and a type. This > checks out, until you look at the supposed lengths. The path is > supposed to be 8 bytes, which would be 16 hex digits, that's ok, > but it says 4 bytes for the version, which would be 8 hex digits, > and we don't see anything like that here. What's going on here? It's just that the version isn't written in full, leading zeros are removed. I'm not looking at 9front right now, but devproc.c in sys/src/9/port in 4e. Grep for procqidwidth. (I was a bit curious so I looked this up!) I suspect version numbers never go up much in practice. Paths are sometimes hashes of pathnames in implementations I've seen, they're not counters, so I guess that's why they're not trimmed. I'll let the experts set me straight now. :-) HTH, Nic