Hello user process
This commit is contained in:
@ -27,6 +27,22 @@ int32_t kvfs_read(struct VfsMountPoint *vmp, const char *key, uint8_t *const buf
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
int32_t kvfs_stat(struct VfsMountPoint *vmp, const char *key, struct VfsStat *stat) {
|
||||
KvfsNode *node = NULL;
|
||||
|
||||
spinlock_acquire(&vmp->spinlock);
|
||||
HSHTB_GET(&vmp->fs.kvfs, nodes, (char *)key, key_, node);
|
||||
spinlock_release(&vmp->spinlock);
|
||||
|
||||
if (node == NULL) {
|
||||
return E_NOENTRY;
|
||||
}
|
||||
|
||||
stat->type = VFS_TYPE_FILE;
|
||||
stat->size = KVFS_BUFFER_SIZE;
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
int32_t kvfs_write(struct VfsMountPoint *vmp, const char *key, const uint8_t *const buffer, size_t n, size_t off) {
|
||||
KvfsNode *node = NULL;
|
||||
|
||||
@ -85,7 +101,7 @@ int32_t kvfs_create(struct VfsMountPoint *vmp, const char *path, int32_t type) {
|
||||
bool kvfs_check(void) {
|
||||
int32_t ret;
|
||||
|
||||
ret = vfs_create("tmpvars", "hello", VFS_CREATE_FILE);
|
||||
ret = vfs_create("tmpvars", "hello", VFS_TYPE_FILE);
|
||||
if (ret != E_OK) return false;
|
||||
|
||||
char *hello = "WAWAWAWA!!!";
|
||||
|
Reference in New Issue
Block a user