diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-23 21:06:23 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-23 21:06:23 +0200 |
commit | 5dd48c50c0cf7793a5dafa6be769c8a3f8b9ab60 (patch) | |
tree | 75ee8e14bf7684394a6a663c90b5c26dc5246702 /Source/Kernel/VFS/FSNode-sc.proto.cpp | |
parent | 66630e4154b7c1c47d6223fe5a8607cd269446a0 (diff) | |
download | Melon-5dd48c50c0cf7793a5dafa6be769c8a3f8b9ab60.tar.gz Melon-5dd48c50c0cf7793a5dafa6be769c8a3f8b9ab60.zip |
Added some screenshots (\o/) and implemented mkdir in userland.
Diffstat (limited to 'Source/Kernel/VFS/FSNode-sc.proto.cpp')
-rw-r--r-- | Source/Kernel/VFS/FSNode-sc.proto.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Kernel/VFS/FSNode-sc.proto.cpp b/Source/Kernel/VFS/FSNode-sc.proto.cpp index e3f11db..279303b 100644 --- a/Source/Kernel/VFS/FSNode-sc.proto.cpp +++ b/Source/Kernel/VFS/FSNode-sc.proto.cpp @@ -31,6 +31,16 @@ u32int FSNode::scall(u8int wat, u32int a, u32int b, u32int c, u32int d) { } if (n != 0) return n->resId(); } + if (wat == FNIF_SMKDIR) { + String* path = (String*)a; + FSNode* n; + if (b == 0) { + n = VFS::mkdir(*path); + } else { + n = VFS::mkdir(*path, Res::get<DirectoryNode>(b, FNIF_OBJTYPE)); + } + if (n != 0) return n->resId(); + } return (u32int) - 1; } @@ -70,6 +80,7 @@ u32int FSNode::removeSC() { } bool FSNode::readable(User* user) { + if (ISROOT) return true; if (user == 0) user = Usr::user(); if (user->getUid() == m_uid) return ((m_permissions >> 6) & 4) != 0; @@ -79,6 +90,7 @@ bool FSNode::readable(User* user) { } bool FSNode::writable(User* user) { + if (ISROOT) return true; if (user == 0) user = Usr::user(); if (user->getUid() == m_uid) return ((m_permissions >> 6) & 2) != 0; @@ -88,6 +100,7 @@ bool FSNode::writable(User* user) { } bool FSNode::runnable(User* user) { + if (ISROOT) return true; if (user == 0) user = Usr::user(); if (user->getUid() == m_uid) return ((m_permissions >> 6) & 1) != 0; |