summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libtrivfs/io-stat.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libtrivfs/io-stat.c b/libtrivfs/io-stat.c
index e7eab9c6..7fed3fbb 100644
--- a/libtrivfs/io-stat.c
+++ b/libtrivfs/io-stat.c
@@ -21,6 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "priv.h"
#include "io_S.h"
+#include <unistd.h>
kern_return_t
trivfs_S_io_stat (struct trivfs_protid *cred,
@@ -33,8 +34,18 @@ trivfs_S_io_stat (struct trivfs_protid *cred,
return EOPNOTSUPP;
err = io_stat (cred->realnode, st);
+
if (!err)
- trivfs_modify_stat (st);
+ {
+ if (!trivfs_fsid)
+ trivfs_fsid = getpid();
+
+ st->st_fstype = trivfs_fstype;
+ st->st_fsid = trivfs_fsid;
+
+ trivfs_modify_stat (st);
+ }
+
return err;
}