// devfs.cpp // device filesystem for HOS // Author: Josh Holtrop // Date: 06/03/04 // Modified: 06/10/04 #include "devfs.h" #include "Device.h" #include "DeviceFolder.h" #include "kio.h" DeviceFolder *dev; void devfs_init(string mountPoint) { printf("I'm going to make a new DeviceFolder\n"); dev = new DeviceFolder(); printf("I'm going to make a new Device\n"); Device device("aDevice", 3, 1, 'b', 0644); printf("I'm going to add hda1 to devfs\n"); dev->mknod("hda1", 3, 1, 'b', 0632); /* dev->mkdir("test", 0644); dev->mkdir("test1", 0755); dev->mkdir("test1", 0644); dev->mknod("psmouse", 4, 1, 'c', 0677); dev->mklink("root", "hda1"); */ printf("I'm going to list the devices i know about:\n"); dev->ls(); // vfs_mount("devfs", mountPoint, 0755, 0, 0); }