diff options
author | Miles Bader <miles@gnu.org> | 1995-04-09 05:14:07 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-04-09 05:14:07 +0000 |
commit | adf8ac8462af29787c3de5495cb0d9e93acb6044 (patch) | |
tree | 270271c072c955d8fc043d13b92e5ae4b161bb33 | |
parent | f7353db4b82394b34825a8781f11e63f239fa05f (diff) |
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.
-rw-r--r-- | libtrivfs/io-stat.c | 13 |
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; } |