Re: Is /proc ASCII or Binary?

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Tue, 27 Oct 1998 20:08:28 -0500


In message <Pine.LNX.3.96.981027163252.483H-100000@red.prv>, "Mike A.
Harris" writes:
+-----
| I don't know what the original design goals were behind /proc,
| but I must say that I agree. I love the information that proc
| provides, but I've tried writing some programs to parse some of
| the stuff and it is a nightmare. IMHO, it should be easy to
+--->8

/proc is text because the people who developed Linux /proc had experience
with the R.E.8 / System V variety, which is binary. And which broke binary
compatibility on every bloody little change to the kernel, requiring all
/proc-using programs to be recompiled.

| It seems every new kernel that comes out, /proc/cpuinfo changes
| the way it displays and scripts I've written break. Other
+--->8

That is quite simply a bug: changes to /proc should whenever possible be
backwards-compatible. And compatible between architectures, whenever
possible. And conversely, /proc parsers should be robust in the face of
format changes (i.e. fscanf() is right out).

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering					 KF8NH
carnegie mellon university

--TAA15857.909536148/hilfy.ece.cmu.edu Content-Type: text/plain

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering KF8NH carnegie mellon university

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/