// === GLOBALS ===
tVFS_Driver gRootFS_Info = {
- "rootfs", 0, Root_InitDevice, NULL, NULL
+ .Name = "rootfs",
+ .InitDevice = Root_InitDevice
};
tRamFS_File RootFS_Files[MAX_FILES];
tVFS_ACL RootFS_DirACLs[3] = {
root->Node.NumACLs = 3;
root->Node.ACLs = RootFS_DirACLs;
+ root->Node.Flags = VFS_FFLAG_DIRECTORY;
root->Node.Type = &gRootFS_DirType;
return &root->Node;
LOG("Sanity check name length - %i > %i", strlen(Name)+1, sizeof(child->Name));
if(strlen(Name) + 1 > sizeof(child->Name))
- LEAVE_RET('i', 0);
+ LEAVE_RET('i', EINVAL);
// Find last child, while we're at it, check for duplication
for( child = parent->Data.FirstChild; child; prev = child, child = child->Next )
{
if(strcmp(child->Name, Name) == 0) {
LOG("Duplicate");
- LEAVE('i', 0);
- return 0;
+ LEAVE('i', EEXIST);
+ return EEXIST;
}
}
parent->Node.Size ++;
- LEAVE('i', 1);
- return 1;
+ LEAVE('i', EOK);
+ return EOK;
}
/**