diff options
author | Miles Bader <miles@gnu.org> | 1995-04-09 05:15:46 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-04-09 05:15:46 +0000 |
commit | d0f49ed70521d736b16389f1bf9345b75d0677ad (patch) | |
tree | c86871443d2b7df50901eeca953fb5ca62f985ae /libtrivfs | |
parent | adf8ac8462af29787c3de5495cb0d9e93acb6044 (diff) |
If trivfs_fsid is zero, set it to our process id, which should be a nice
unique value.
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/file-statfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libtrivfs/file-statfs.c b/libtrivfs/file-statfs.c index 6385b7f7..6d86748b 100644 --- a/libtrivfs/file-statfs.c +++ b/libtrivfs/file-statfs.c @@ -18,13 +18,18 @@ #include "priv.h" #include "fs_S.h" #include <string.h> +#include <unistd.h> kern_return_t trivfs_S_file_statfs (struct trivfs_protid *cred, struct fsys_statfsbuf *stb) { + if (!trivfs_fsid) + trivfs_fsid = getpid(); + bzero (stb, sizeof (struct fsys_statfsbuf)); stb->fsys_stb_type = trivfs_fstype; stb->fsys_stb_fsid = trivfs_fsid; + return 0; } |