From 5afbd29256a136116fb2b4758d8940f2a484d7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 18 Jan 2003 14:14:07 +0000 Subject: [PATCH] Added new files to the build. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2483 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/Jamfile | 3 +++ src/kernel/core/fs/rootfs.c | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/kernel/core/fs/Jamfile b/src/kernel/core/fs/Jamfile index a1f2c1e4a1..433b0b002a 100644 --- a/src/kernel/core/fs/Jamfile +++ b/src/kernel/core/fs/Jamfile @@ -1,6 +1,7 @@ SubDir OBOS_TOP src kernel core fs ; UsePublicHeaders storage ; +UsePublicHeaders app ; KernelMergeObject kernel_fs.o : <$(SOURCE_GRIST)>bootfs.c @@ -8,6 +9,8 @@ KernelMergeObject kernel_fs.o : <$(SOURCE_GRIST)>rootfs.c <$(SOURCE_GRIST)>vfs.c <$(SOURCE_GRIST)>vfs_select.c + <$(SOURCE_GRIST)>message.c + <$(SOURCE_GRIST)>node_monitor.c : -fno-pic -Wno-unused -D_KERNEL_MODE ; diff --git a/src/kernel/core/fs/rootfs.c b/src/kernel/core/fs/rootfs.c index fe78c4e289..92bdee9792 100755 --- a/src/kernel/core/fs/rootfs.c +++ b/src/kernel/core/fs/rootfs.c @@ -13,7 +13,9 @@ #include #include #include + #include +#include #include #include @@ -24,9 +26,9 @@ #define ROOTFS_TRACE 0 #if ROOTFS_TRACE -#define TRACE(x) dprintf x +# define TRACE(x) dprintf x #else -#define TRACE(x) +# define TRACE(x) #endif typedef enum { @@ -251,6 +253,7 @@ rootfs_remove(struct rootfs *fs, struct rootfs_vnode *dir, const char *name, boo goto err; rootfs_remove_from_dir(dir, vnode); + notify_listener(B_ENTRY_REMOVED, fs->id, dir->id, 0, vnode->id, name); // schedule this vnode to be removed when it's ref goes to zero vfs_remove_vnode(fs->id, vnode->id); @@ -554,7 +557,7 @@ rootfs_seek(fs_volume _fs, fs_vnode _v, fs_cookie _cookie, off_t pos, int st) static status_t -rootfs_create_dir(fs_volume _fs, fs_vnode _dir, const char *name, int perms, vnode_id *new_vnid) +rootfs_create_dir(fs_volume _fs, fs_vnode _dir, const char *name, int perms, vnode_id *_newID) { struct rootfs *fs = _fs; struct rootfs_vnode *dir = _dir; @@ -593,7 +596,9 @@ rootfs_create_dir(fs_volume _fs, fs_vnode _dir, const char *name, int perms, vno vnode->stream.dir.dir_head = NULL; vnode->stream.dir.jar_head = NULL; - mutex_unlock(&fs->lock); + notify_listener(B_ENTRY_CREATED, fs->id, dir->id, 0, vnode->id, name); + + mutex_unlock(&fs->lock); return 0; err1: @@ -795,6 +800,8 @@ rootfs_symlink(fs_volume _fs, fs_vnode _dir, const char *name, const char *path, } vnode->stream.symlink.length = strlen(path); + notify_listener(B_ENTRY_CREATED, fs->id, dir->id, 0, vnode->id, name); + mutex_unlock(&fs->lock); return 0; @@ -894,11 +901,13 @@ err: static status_t rootfs_read_stat(fs_volume _fs, fs_vnode _v, struct stat *stat) { + struct rootfs *fs = _fs; struct rootfs_vnode *vnode = _v; TRACE(("rootfs_rstat: vnode %p (0x%Lx), stat %p\n", vnode, vnode->id, stat)); // stream exists, but we know to return size 0, since we can only hold directories + stat->st_dev = fs->id; stat->st_ino = vnode->id; stat->st_size = 0; stat->st_mode = vnode->stream.type | DEFFILEMODE;