inode types on BSD 4.2.

Ron McDaniels ron at celerity.UUCP
Tue May 15 09:27:54 AEST 1984


<>
Here's one that will test your wizard status. Take a look at inode.h in BSD 4.2,
in particular the lines following the comment, "/* modes */". Note that the mask
for the file-type field is 4 bits wide. Now look at the following lines which
#define the valid bit combinations for file-type. As you can see, there seems
to be a deliberate attempt not to use the least significant bit position in the
field. I have perused the source for "ls.c" in an attempt to find an not-so-
obvious use for this bit, alas, to no avail. 

By way of explanation, three possible scenarios occur to me.

1. There is a hidden use for the bit (if not hidden, will you give me "not
   obvious"?).

2. There used to be a use for the bit or there is currently a use for the bit
   in Ma Bell's version of unix, and the bit is left unused in 4.2 to maintain
   compatibility.

3. The primal inode definition defined the first few fields as even and all the
   subsequent additions were made even for the same reason that I am asking the
   question, ignorance and inadequate documentation.

Whatever the reason, I'd like to know what's going on. Opinions will be
appreciated. . . but not nearly as much as facts.



	R. L. McDaniels
	CELERITY COMPUTING
	9692 Via Excelencia
	San Diego, California 92126
	(619) 566-0416
	{decvax!ucbvax || ihnp4 || philabs}!sdcsvax!celerity!ron



More information about the Comp.unix.wizards mailing list