Re: proposal for generic interface to /proc text files

Daniel Quinlan (quinlan@proton.pathname.com)
Sun, 29 Sep 96 15:02 PDT


Daniel Quinlan <quinlan@pathname.com> wrote:

>> [in subfields]
>> I'd like to recommend lowercase letters (in the Unix tradition),
>> but don't feel it would be smart to prohibit uppercase letters.

Albert Cahalan <albert@ccs.neu.edu> writes:

> We can't put filenames in /proc then, unless we also prohibit all
> those characters in ext2 and NFS - oh, NFS is not our standard...

The recommendation would only be for those fields where the text is
100% programmer-defined. Data values like environment variables,
filenames, and vendor-defined strings (as in /proc/cpuinfo and
/proc/scsi/scsi) are obviously excluded.

Also, while filenames are the best example of lowercase identifiers
being traditional in Unix, they are not the only one.

The reason I made the suggestion was to encourage more uniform strings
in subfields. For example, "vendor_id" in /proc/cpuinfo and
"disk_rio" in /proc/stat rather than mixed use ("VendorId" and
"disk_rio").

> That is also to slow for some things. I suggest that _most_ files in
> /proc should be padded to 2^n bytes. For example, 31 characters plus
> a newline or 127 characters plus a null. Then the block size will be
> an exact multiple of the line size, so the code is simple and fast.

Presumably, the files in /proc that are in text format have lower
speed requirements. However, it may be worthwhile to add trailing
whitespace for improved speed where it is needed.

Dan