+ if (!(rinode->flags & RAMF_SYMLINK)) {
+ return EINVAL;
+ }
+
+ *path_out = rinode->symlink;
+
+ return rinode->size;
+}
+
+int
+ramfs_unlink(struct v_inode* this, struct v_dnode* name)
+{
+ struct ram_inode* rinode = RAM_INODE(this->data);
+
+ if ((rinode->flags & RAMF_SYMLINK)) {
+ rinode->flags &= ~RAMF_SYMLINK;
+ this->itype &= ~F_SYMLINK;
+
+ vfree(rinode->symlink);
+
+ return 0;
+ }
+
+ // TODO
+
+ return 0;
+}
+
+static void
+ramfs_init()
+{
+ struct filesystem* fs;
+ fs = fsapi_fs_declare("ramfs", FSTYPE_PSEUDO);
+
+ fsapi_fs_set_mntops(fs, ramfs_mount, ramfs_unmount);
+ fsapi_fs_finalise(fs);