[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9243.0. "Curiosity question: can app programmer use st_flags in stat.h?" by PEACHS::DALEY (Maybe I should drink more coffee...or less!) Thu Mar 20 1997 17:13

Hi,

Customer has a question:  in stat.h, the stat struct, the field

     uint_t  st_flags;               /* user defined flags for file */


sounds like something you can put "user defined" flags in, to be retrieved
for your own purposes later.

I can't find anything to support this idea, or information about how one
would store a value there.  It always seems to come back (from stat or fstat)
as 0.

I tried using fcntl F_SETFL to set it, but fstat still got back a 0 for st_flags.

The only place I've ever seen st_flags used is in vn_stat, where it's set to
vap->va_flags.

Is this a free area for app programmers, or something else altogether?  A pointer 
to information is greatly appreciated.

Regards,

John 
T.RTitleUserPersonal
Name
DateLines
9243.1SMURF::SCOTTThu Mar 20 1997 17:5211
john,

The st_flags field in the stat structure maps to the on-disk i_flags
field in the (UFS) inode.  These flags are reserved for kernel use.

A value of 1 in this field indicates a fast symbolic link.  Other
bits have meanings as well (see /usr/include/ufs/dinode.h).

A user can read, but not write (directly), these bits.

larry