-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cbea3a
commit f553446
Showing
9 changed files
with
115 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
dmthread.c | ||
vfs/uefi.c | ||
vfs/devuefi.c | ||
vfs/devfs.c | ||
|
||
nuklear.c | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include <stdint.h> | ||
#include <dirent.h> | ||
#include <sys/types.h> | ||
#include <sys/stat.h> | ||
#include <stdio.h> | ||
|
||
#include "../k_vfs.h" | ||
extern EFI_BOOT_SERVICES *BS; | ||
extern EFI_HANDLE gImageHandle; | ||
|
||
#define IN_DEVFS | ||
#include "devfs.h" | ||
|
||
vfs_fs_type_t *devfs_fs_type = NULL; | ||
char* devfs_fs_type_s = "devfs"; | ||
|
||
char** root_list = { | ||
"console", | ||
NULL | ||
}; | ||
|
||
void vfs_devfs_shutdown(vfs_fs_handler_t* this) { | ||
} | ||
|
||
int vfs_devfs_file_exists(vfs_fs_handler_t* this, char* path) { | ||
} | ||
|
||
char** vfs_devfs_list_root_dir(vfs_fs_handler_t* this) { | ||
return root_list; | ||
} | ||
|
||
void* vfs_devfs_open(vfs_fs_handler_t* this, char* path, int flags) { | ||
} | ||
|
||
int vfs_devfs_close(vfs_fs_handler_t* this, void* fd) { | ||
} | ||
|
||
ssize_t vfs_devfs_read(vfs_fs_handler_t* this, void* fd, void* buf, size_t count) { | ||
} | ||
|
||
ssize_t vfs_devfs_write(vfs_fs_handler_t* this, void* fd, void* buf, size_t count) { | ||
} | ||
|
||
off_t vfs_devfs_lseek(vfs_fs_handler_t* this, void* fd, off_t offset, int whence) { | ||
} | ||
|
||
int vfs_devfs_stat(vfs_fs_handler_t* this, char* path, struct stat *buf) { | ||
} | ||
|
||
int vfs_devfs_fstat(vfs_fs_handler_t* this, void* fd, struct stat *buf) { | ||
} | ||
|
||
|
||
|
||
void vfs_devfs_setup(vfs_fs_handler_t* this, char* dev_name, char* mountpoint) { | ||
this->list_root_dir = &vfs_devfs_list_root_dir; | ||
this->shutdown = &vfs_devfs_shutdown; | ||
this->file_exists = &vfs_devfs_file_exists; | ||
this->list_root_dir = &vfs_devfs_list_root_dir; | ||
|
||
this->open = &vfs_devfs_open; | ||
this->close = &vfs_devfs_close; | ||
this->read = &vfs_devfs_read; | ||
this->write = &vfs_devfs_write; | ||
this->lseek = &vfs_devfs_lseek; | ||
this->stat = &vfs_devfs_stat; | ||
this->fstat = &vfs_devfs_fstat; | ||
} | ||
|
||
void vfs_init_devfs_fs_type() { | ||
devfs_fs_type = (vfs_fs_type_t*)calloc(sizeof(vfs_fs_type_t),1); | ||
devfs_fs_type->fs_type = devfs_fs_type_s; | ||
devfs_fs_type->setup = &vfs_devfs_setup; | ||
klog("VFS",1,"devfs filesystem driver setup"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef VFS_DEVFS_H | ||
#define VFS_DEVFS_H | ||
|
||
#include <stdint.h> | ||
#include <sys/types.h> | ||
#include <sys/stat.h> | ||
#include <stdio.h> | ||
|
||
#include "../k_vfs.h" | ||
|
||
extern EFI_BOOT_SERVICES *BS; | ||
extern EFI_HANDLE gImageHandle; | ||
|
||
#ifndef IN_DEVFS | ||
extern vfs_fs_type_t *devfs_fs_type; | ||
#endif | ||
|
||
void vfs_init_devfs_fs_type(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef ZOIDBERG_VERSION_H | ||
#define ZOIDBERG_VERSION_H | ||
#define ZOIDBERG_VERSION "0.1" | ||
#define ZOIDBERG_BUILD "1944433" | ||
#define ZOIDBERG_BUILDDATE "Mon 15 Aug 20:22:18 BST 2016" | ||
#define ZOIDBERG_BUILD "0cbea3a" | ||
#define ZOIDBERG_BUILDDATE "Mon 15 Aug 20:42:17 BST 2016" | ||
#endif |