renamed and cleaned up export header files to match linux convention
[lunaix-os.git] / lunaix-os / kernel / device / devfs.c
index c105f66a71bbed5072e6544de25b3bea75b9c27e..f8a20a14932e8fb0929b299ebd91696680758c9b 100644 (file)
@@ -3,7 +3,7 @@
 #include <lunaix/fs/devfs.h>
 #include <lunaix/spike.h>
 
-#include <usr/lunaix/dirent_defs.h>
+#include <usr/lunaix/dirent.h>
 
 extern struct v_inode_ops devfs_inode_ops;
 extern struct v_file_ops devfs_file_ops;
@@ -179,6 +179,12 @@ devfs_init_inode(struct v_superblock* vsb, struct v_inode* inode)
 {
     inode->ops = &devfs_inode_ops;
     inode->default_fops = &devfs_file_ops;
+
+    // we set default access right to be 0775.
+    // TODO need a way to allow this to be changed
+    
+    fsapi_inode_setaccess(inode, FSACL_DEFAULT);
+    fsapi_inode_setowner(inode, 0, 0);
 }
 
 int