1 /* Copyright (c) 2010 The Regents of the University of California
2 * Barret Rhoden <brho@cs.berkeley.edu>
3 * See LICENSE for details.
5 * Devfs: filesystem interfaces to devices. For now, we just create the
6 * needed/discovered devices in KFS in its /dev/ folder. In the future, we
7 * might want to do something like nodes like other Unixes. */
9 #ifndef ROS_KERN_DEVFS_H
10 #define ROS_KERN_DEVFS_H
15 void devfs_init(void);
16 struct file *make_device(char *path, int mode, int type,
17 struct file_operations *fop);
19 /* Generic device (block or char) file ops. Both of these are dummies that say
20 * the device can't support the operation. */
21 int dev_mmap(struct file *file, struct vm_region *vmr);
22 int dev_c_llseek(struct file *file, off64_t offset, off64_t *ret, int whence);
24 /* Exporting these for convenience (process creation) */
25 extern struct file *dev_stdin, *dev_stdout, *dev_stderr;
27 #endif /* !ROS_KERN_DEVFS_H */