From adf8ac8462af29787c3de5495cb0d9e93acb6044 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 9 Apr 1995 05:14:07 +0000 Subject: Before calling trivfs_modify_stat, set the st_fstype & st_fsid fields to trivfs_fstype & trivfs_fsid. But first, if trivfs_fsid is zero, set it to our process id, which should be a nice unique value. --- libtrivfs/io-stat.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 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; } -- cgit v1.2.3