mirror of
https://github.com/drasko/codezero.git
synced 2026-02-24 07:43:15 +01:00
VFS updates, readme updates.
Separated vfs file as a specific file. vm file is not always a vfs file. Updated the README sys_open was not returning back to client, added that. Added comments for future vfs additions.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2008 Bahadir Balban
|
||||
*/
|
||||
#include <file.h>
|
||||
#include <vm_area.h>
|
||||
#include <l4/macros.h>
|
||||
#include <l4/api/errno.h>
|
||||
@@ -40,7 +41,7 @@ void vm_object_print(struct vm_object *vmo)
|
||||
ftype = "bootfile";
|
||||
else if (f->type == VM_FILE_SHM)
|
||||
ftype = "shm file";
|
||||
else if (f->type == VM_FILE_REGULAR)
|
||||
else if (f->type == VM_FILE_VFS)
|
||||
ftype = "regular";
|
||||
else
|
||||
BUG();
|
||||
@@ -91,6 +92,23 @@ struct vm_file *vm_file_create(void)
|
||||
return f;
|
||||
}
|
||||
|
||||
/*
|
||||
* Populates the priv_data with vfs-file-specific
|
||||
* information.
|
||||
*/
|
||||
struct vm_file *vfs_file_create(void)
|
||||
{
|
||||
struct vm_file *f = vm_file_create();
|
||||
|
||||
if (IS_ERR(f))
|
||||
return f;
|
||||
|
||||
f->priv_data = kzalloc(sizeof(struct vfs_file_data));
|
||||
f->type = VM_FILE_VFS;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
/* Deletes the object via its base, along with all its pages */
|
||||
int vm_object_delete(struct vm_object *vmo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user