File mode: char/block special files and permission bits GÃ¶ran Weinholt 31 Jul 2019 14:20 UTC
The file-info records in the proposed SRFI 170 do not fully correspond
to the stat structure in POSIX. The current proposal does not provide
the full st_mode field. Only the permission bits are kept, but the
st_mode field originally contains more information.
This matches Scsh, but Scsh also provides a type field. The current
proposal has no file-info:type field, so we lose some information. In
particular, the distinction between block and character special devices
POSIX says "The file permission bits are defined to be those
corresponding to the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and
S_IRWXO". If this is the mask used for file-info:mode, then we also lose
the setuid, setgid and sticky bits (and any implementation-defined
What's the harm in letting file-info:mode return st_mode unmasked?