summaryrefslogtreecommitdiff
path: root/libtrivfs/file-statfs.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-04-09 05:15:46 +0000
committerMiles Bader <miles@gnu.org>1995-04-09 05:15:46 +0000
commitd0f49ed70521d736b16389f1bf9345b75d0677ad (patch)
treec86871443d2b7df50901eeca953fb5ca62f985ae /libtrivfs/file-statfs.c
parentadf8ac8462af29787c3de5495cb0d9e93acb6044 (diff)
If trivfs_fsid is zero, set it to our process id, which should be a nice
unique value.
Diffstat (limited to 'libtrivfs/file-statfs.c')
-rw-r--r--libtrivfs/file-statfs.c5
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;
}