public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Kegel <dank@kegel.com>
To: Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil>
Cc: tim@tjansen.de, linux-kernel@vger.kernel.org,
	"lsb-discuss@lists.linuxbase.org"
	<lsb-discuss@lists.linuxbase.org>
Subject: Re: /proc format (was Device Registry (DevReg) Patch 0.2.0)
Date: Wed, 25 Apr 2001 13:08:21 -0700	[thread overview]
Message-ID: <3AE72EB5.8E521240@kegel.com> (raw)
In-Reply-To: <200104251937.OAA27702@tomcat.admin.navo.hpc.mil>

Jesse Pollard wrote:
> Personally, I think
>         proc_printf(fragment, "%d %d",get_portnum(usbdev), usbdev->maxchild);
> (or the string "dddd ddd" with d representing a digit)
> 
> is shorter (and faster) to parse with
>         fscanf(input,"%d %d",&usbdev,&maxchild);
> 
> Than it would be to try parsing
>         <usb:topology port="ddddd" portnum="dddd">
> with an XML parser.
> 
> Sorry - XML is good for some things. It is not designed to be a
> interface language between a kernel and user space.
> 
> I am NOT in favor of "one file per value", but structured data needs
> to be written in a reasonable, concise manner. XML is intended for
> communication between disparate systems in an exreemly precise manner
> to allow some self documentation to be included when the communication
> fails.

Agreed.  

But one thing XML provides (potentially) is a DTD that defines meanings and formats.  
IMHO the kernel needs something like this for /proc (though not in DTD format!).

Has anyone ever tried to write a formal syntax for all the entries
in /proc?   We have bits and pieces of /proc documentation in 
/usr/src/linux/Documentation, but nothing you could feed directly 
into a parser generator.  It'd be neat to have a good definition for /proc
in the LSB, and have an LSB conformance test that could look in
/proc and say "Yup, all the entries there conform to the spec and can
be parsed properly."

(http://www.pathname.com/fhs/2.2-beta/fhs-2.2-beta.txt mentions /proc,
but doesn't standardize any of it, except to suggest that /etc/mtab
can be a symbolic link to /proc/mounts.)
- Dan

  reply	other threads:[~2001-04-25 20:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-25 17:10 Device Registry (DevReg) Patch 0.2.0 Dan Kegel
2001-04-25 18:09 ` H. Peter Anvin
2001-04-25 18:55 ` /proc format (was Device Registry (DevReg) Patch 0.2.0) Tim Jansen
2001-04-25 19:19   ` Dan Kegel
2001-04-25 23:09     ` Tim Jansen
2001-04-25 19:37   ` Jesse Pollard
2001-04-25 20:08     ` Dan Kegel [this message]
2001-04-25 20:40     ` Tim Jansen
2001-04-25 21:16       ` Jesse Pollard
2001-04-25 21:50         ` J . A . Magallon
2001-04-25 21:58           ` Doug McNaught
2001-04-25 22:03             ` J . A . Magallon
2001-04-25 22:24               ` Marko Kreen
2001-04-25 22:42               ` Alexander Viro
2001-04-25 22:24             ` Mark Hahn
2001-04-26 14:06               ` Tim Jansen
2001-04-25 22:46         ` Tim Jansen
     [not found] <200104252056.PAA44995@tomcat.admin.navo.hpc.mil>
2001-04-25 21:10 ` Dan Kegel
  -- strict thread matches above, loose matches on Subject: below --
2001-04-26  1:09 Dan Kegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AE72EB5.8E521240@kegel.com \
    --to=dank@kegel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsb-discuss@lists.linuxbase.org \
    --cc=pollard@tomcat.admin.navo.hpc.mil \
    --cc=tim@tjansen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox