1 /* Copyright (c) 2009, 2010 The Regents of the University of California
2 * Barret Rhoden <brho@cs.berkeley.edu>
3 * See LICENSE for details.
5 * KFS (Kernel File System)
7 * This gives runtime access to the binary blobs (usually userspace programs)
8 * linked at the end of the kernel. Extremely rudimentary.
9 * Also allows for process creation from file (can consider moving this).
11 * Add the files you want in KFS in kfs.c. */
13 #ifndef ROS_KERN_KFS_H
14 #define ROS_KERN_KFS_H
16 #include <ros/common.h>
20 /* Every FS must extern it's type, and be included in vfs_init() */
21 extern struct fs_type kfs_fs_type;
23 /* KFS-specific inode info. Could use a union, but I want to init filestart to
26 struct dentry_tailq children; /* our childrens */
27 void *filestart; /* or our file location */
28 size_t init_size; /* file size on the backing store */
31 /* Old KFS below here */
34 uint8_t *COUNT(size) start;
38 #define MAX_KFS_FILES 64
39 extern struct kfs_entry (RO kfs)[MAX_KFS_FILES];
41 ssize_t kfs_lookup_path(char*NTS path);
42 struct proc *kfs_proc_create(int kfs_inode);
43 void kfs_cat(int kfs_inode);
45 #endif /* !ROS_KERN_KFS_H */