// 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(mountPoint); printf("I'm going to add hda1 to devfs\n"); dev->mknod("hda1", 0, 0, 3, 1, 'b', 0632); dev->mkdir("test", 0, 501, 0644); dev->mkdir("test1", 0, 0, 0755); dev->mkdir("test1", 1, 1, 0644); dev->mknod("psmouse", 2, 3, 4, 1, 'c', 0677); dev->mklink("root", 5, 6, "hda1"); printf("I'm going to list the devices i know about:\n"); dev->ls(); // vfs_mount("devfs", mountPoint, 0755, 0, 0); }