From owner-freebsd-hackers@FreeBSD.ORG Mon May 7 17:05:19 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40C2616A418 for ; Mon, 7 May 2007 17:05:19 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id C40C013C4B7 for ; Mon, 7 May 2007 17:05:18 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Hl6FV-0001d7-Ex for freebsd-hackers@freebsd.org; Mon, 07 May 2007 18:39:45 +0200 Received: from 78-1-95-82.adsl.net.t-com.hr ([78.1.95.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 May 2007 18:39:45 +0200 Received: from ivoras by 78-1-95-82.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 May 2007 18:39:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Mon, 07 May 2007 18:39:34 +0200 Lines: 75 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7CF7858D4EB10347BFBC0CF8" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 78-1-95-82.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-Enigmail-Version: 0.94.3.0 Sender: news Subject: MIME-ifying sysctl types X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2007 17:05:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7CF7858D4EB10347BFBC0CF8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In the output of sysctl -oa I see values like: kern.proc.all: Format:S,proc Length:75264 Dump:0x00030000000000002011fac380d4fec3... kern.proc.proc_td: Format:N Length:75264 Dump:0x00030000000000002011fac380d4fec3... kern.file: Format:S,xfile Length:18616 Dump:0x340000003e0c0000e803000006000000... vfs.nfs.diskless_rootaddr: Format:%Ssockaddr_in Length:16 Dump:0x00000000000000000000000000000000... debug.hashstat.rawnchash: Format:S,int Length:262144 Dump:0x00000000000000000000000000000000... , etc., and some like: kern.ipc.msqids: Format: Length:3520 Dump:0x00000000000000000000000000000000... kern.ipc.sema: Format: Length:600 Dump:0x00000000000000000000000000000000= =2E.. and even some like: machdep.consdev: Format:T,struct cdev * Length:4 Dump:0x00000000... The first group has widely nonuniform "Format" fields, the second don't have it at all, and the third just looks wrong (is that a NULL pointer being exported from the kernel, just in case the userland doesn't have it? :) ). My proposal is to MIME-ify the Format fields, best presented in examples:= "S,proc" -> "x-struct/proc" "S,xfile" -> "x-struct/xfile" Etc. GEOM tree is the easiest, it's just "text/xml", and the already present text fields would be "text/plain". If possible, the types should conform to http://www.iana.org/assignments/media-types/ - but except for text and XML types they usually won't. The next step, obviously, but of dubious benefit, would be to stop exporting binary data from the kernel and do it via XML, but that's another thing, possibly another GSoC proposal :) I can provide the patches for the format names. At this time I'm looking for input: is this idea sane? Are there any utilities that actually parse the type name? The benefit of this conversion is that MIME types are easier on the eyes and will help unfamiliar users understand what's going on. --------------enig7CF7858D4EB10347BFBC0CF8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGP1ZGldnAQVacBcgRAvZwAKCbB0K89B2a80yVfjqATZIBotZpxgCbB+Cs XS/NOYjnPeWTpm9k9XqNMdQ= =bsyG -----END PGP SIGNATURE----- --------------enig7CF7858D4EB10347BFBC0CF8--