diff --git a/src/sys/devfs/devfs.c b/src/sys/devfs/devfs.c index 4aaff11..19ab909 100644 --- a/src/sys/devfs/devfs.c +++ b/src/sys/devfs/devfs.c @@ -247,7 +247,9 @@ return(0x1); } /* Mount our devfs this will build the devfs container node */ - vfs_mount(0x0,0x0,0x0,0x1,"devfs","rw"); // Mount Device File System + vfs_mount(-1,0x0,0x0,0x1,"devfs","rw"); // Mount Device File System + + kprintf("Devfs\n"); /* Return */ return(0x0); diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 8578b9e..0b45835 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -114,7 +114,9 @@ //#ifdef DEBUG kprintf("[0x%X][0x%X:0x%X:0x%X:0x%X:0x%X:0x%X]\n",rootdev,B_ADAPTOR(rootdev),B_CONTROLLER(rootdev),B_SLICE(rootdev),B_UNIT(rootdev),B_PARTITION(rootdev),B_TYPE(rootdev)); //#endif - if (vfs_mount(0x3,B_PARTITION(rootdev)+2,0x0,0xAA,"sys","rw") != 0x0) { + //if (vfs_mount(0x1,B_PARTITION(rootdev)+2,0x0,0xAA,"sys","rw") != 0x0) { + + if (vfs_mount(0x1,0x1,0x0,0xAA,"sys","rw") != 0x0) { kprintf("Problem Mounting sys Mount Point\n"); } diff --git a/src/sys/sys/device.c b/src/sys/sys/device.c index 054e569..06cf2d6 100644 --- a/src/sys/sys/device.c +++ b/src/sys/sys/device.c @@ -85,6 +85,9 @@ *****************************************************************************************/ struct device_node *device_find(int major,int minor) { struct device_node *tmpDev = 0x0; + + if (major == -1) + return(-1); spinLock(&deviceSpinLock); diff --git a/src/sys/ufs/ufs.c b/src/sys/ufs/ufs.c index 9035cb8..ddc42cf 100644 --- a/src/sys/ufs/ufs.c +++ b/src/sys/ufs/ufs.c @@ -50,6 +50,14 @@ static int dskread(void *buf, u_int64_t block,size_t count,struct file *fd) { + /* + kprintf("Buf: [0x%X]\n",buf); + kprintf("Block: [0x%X]\n",block); + kprintf("Count: [0x%X]\n",count); + kprintf("FD: [0x%X]\n",fd); + kprintf("MP: [0x%X]\n",fd->mp); + kprintf("Device: [0x%X]\n",fd->mp->device); + */ fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,buf,block,count); return(0x0); } diff --git a/src/sys/vfs/mount.c b/src/sys/vfs/mount.c index 3c1e9e4..c36977d 100644 --- a/src/sys/vfs/mount.c +++ b/src/sys/vfs/mount.c @@ -52,12 +52,21 @@ if ((mp = (struct vfs_mountPoint *)kmalloc(sizeof(struct vfs_mountPoint))) == NULL) kprintf("vfs_mount: failed to allocate mp\n"); + kprintf("DEBUG: MOUNT"); + /* Copy Mount Point Into Buffer */ sprintf(mp->mountPoint,mountPoint); /* Set Pointer To Physical Drive */ device = device_find(major,minor); + if (device == 0x0) { + kprintf("vfs_mount: failed invalid device\n"); + return(0x1); + } + + kprintf("DEBUG: [0x%X]\n",device); + /* Set Up Mp Defaults */ mp->device = device; mp->fs = vfsFindFS(vfsType); @@ -69,6 +78,9 @@ kprintf("File System Type: %i Not Found\n",vfsType); return(0x1); } + + kprintf("DEBUG: mp->fs\n"); + /*What is this for? 10/6/2006 */ /* if (device != 0x0) { @@ -89,6 +101,7 @@ kfree(mp); return(0x1); } + kprintf("Got Here\n"); /* Return */ return(0x0); }