summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-16 22:16:54 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-16 22:16:54 +0000
commit38c57a6184c5889e93ee39272ed8ea15176f8a39 (patch)
tree9a2435e33c8b5dfd9f95ed638d3bc7f8fe518899 /libdiskfs
parentfd37dc7353e1c034d9630cb2e2ec93b6345cbe1a (diff)
Formerly dir-chg.c.~3~
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/dir-chg.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/libdiskfs/dir-chg.c b/libdiskfs/dir-chg.c
index 291ff8da..bc13846e 100644
--- a/libdiskfs/dir-chg.c
+++ b/libdiskfs/dir-chg.c
@@ -17,10 +17,33 @@
#include "priv.h"
#include "fs_S.h"
+#include "msg.h"
kern_return_t
diskfs_S_dir_notice_changes (struct protid *cred,
mach_port_t notify)
{
- return EOPNOTSUPP;
+ struct dirmod *req;
+
+ if (!cred)
+ return EOPNOTSUPP;
+
+ req = malloc (sizeof (struct dirmod));
+ mutex_lock (&cred->po->np->lock);
+ req->port = notify;
+ req->next = cred->po->np->dirmod_reqs;
+ cred->po->np->dirmod_reqs = req;
+ nowait_dir_changed (notify, DIR_CHANGED_NULL, "");
+ mutex_unlock (&cred->po->np->lock);
+ return 0;
}
+
+void
+diskfs_notice_dirchange (struct node *dp, enum dir_changed_type type,
+ char *name)
+{
+ struct dirmod *req;
+
+ for (req = dp->dirmod_reqs; req; req = req->next)
+ nowait_dir_changed (req->port, type, name);
+}