diff options
author | Thomas Bushnell <thomas@gnu.org> | 1996-09-04 12:47:04 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1996-09-04 12:47:04 +0000 |
commit | ad593a5f3264eeef8d8cc3dd95202d49de2e376a (patch) | |
tree | 2a58a24d0ef4e63b02f4af72155e63f899d703c5 /nfs/nfs.c | |
parent | 74751f8f52c16a07d75247cd5258e83ba5d11638 (diff) |
*** empty log message ***
Diffstat (limited to 'nfs/nfs.c')
-rw-r--r-- | nfs/nfs.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -97,6 +97,37 @@ hurd_mode_to_nfs_mode (mode_t mode) return mode & 07777; } +/* Convert a Hurd mode to an NFS type */ +int +hurd_mode_to_nfs_type (mode_t mode) +{ + switch (mode & S_IFMT) + { + case S_IFDIR: + return NFDIR; + + case S_IFCHR: + default: + return NFCHR; + + case S_IFBLK: + return NFBLK; + + case S_IFREG: + return NFREG; + + case S_IFLNK: + return NFLNK; + + case S_IFSOCK: + return NFSOCK; + + case S_IFIFO: + return protocol_version == 2 ? NF2FIFO : NF3FIFO; + } +} + + /* Each of the functions on this page copies its second arg to *P, converting it to XDR representation along the way. They then |