Subject: Our fcntl(F_[GS]ETFL) calls & struct file
To: None <tech-kern@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 06/30/1999 14:36:29
I posted these on tech-userlevel, but they are also kernel related. Well
the fix is. :-)

In summary, we store these flags in a short in struct file, and are
defining flags which won't fit in a short. Thus we need to grow the
struct.

I can easily do this, a kernel version bump will cover it. thw question is
what to grow in addition to f_flag....

Take care,

Bill

***** Other messages *****

In response to suggestions on tech-kern to change how I approach a
problem, I started looking at adding extra flags to the file descriptor.

I discovered that the flags we added for POSIX compatabilty don't work.
We:

#define O_DSYNC         0x00010000      /* write: I/O data completion */
#define O_RSYNC         0x00020000      /* read: I/O completion as for write */

Unfortunatly we throw these values into a short! Thus these two get lost.

Also, does POSIX require we get & set O_ values? If so, then I guess I'll
need to define my flags as O_foo.

Take care,

Bill




On Wed, 30 Jun 1999, Bill Studenmund wrote:

> In response to suggestions on tech-kern to change how I approach a
> problem, I started looking at adding extra flags to the file descriptor.
> 
> I discovered that the flags we added for POSIX compatabilty don't work.
> We:
> 
> #define O_DSYNC         0x00010000      /* write: I/O data completion */
> #define O_RSYNC         0x00020000      /* read: I/O completion as for write */
> 
> Unfortunatly we throw these values into a short! Thus these two get lost.

To follow up my own note, my recomended solution is to make f_flag and
f_msg_count ints. Obviously f_flag has to grow, and one other field should
grow to keep the struct nicly aligned. Or we can add a spare field.

Take care,

Bill