Subject: Re: members of struct *fs
To: Jaromir Dolecek <jdolecek@per4mance.cz>
From: Konrad Schroder <perseant@hitl.washington.edu>
List: tech-kern
Date: 12/15/1998 15:15:27
On Sat, 12 Dec 1998, Jaromir Dolecek wrote:

> While trying to maximize code sharing between ext2fs and ffs (with
> Manuel's blessing), I found out that it seems to be common practice
> to prefix items of structs [fs|lfs|ext2fs] with
> a prefix (l for lfs, e2 for ext2fs at least), even when the items
> have same meaning.

Someone else mentioned an ancient compiler restriction that structure
names were held in a global table ... I find that my own brain tends to
work that way :^)  In particular, there are a lot of #defines that refer
what would appear to be members of, say, (struct inode), to (struct
dinode), that could be somewhat more confusing if the prefixes were left
off.  (Now if they were standardized, e.g. "ip->i_fs_mode" instead of
"ip->i_(e2|f|l)fs_mode", I would have no problem with that at all.)

In addition, and perhaps a better reason against: while making would make
e2fs and ffs share code better, would mean less (and more difficult) code
sharing between other OSes unless they also adopt the same change.

Just my $0.02,

-------------------------------------------------------------------------
Konrad Schroder           http://www.hitl.washington.edu/people/perseant/
System Administrator                         perseant@hitl.washington.edu
Human Interface Technology Lab                     Voice: +1.206.616.1478
Box 352142, University of Washington, 98195, USA     FAX: +1.206.543.5380