diff --git a/src/sys/devfs/devfs.c b/src/sys/devfs/devfs.c index d771976..c84b740 100644 --- a/src/sys/devfs/devfs.c +++ b/src/sys/devfs/devfs.c @@ -1,61 +1,27 @@ /***************************************************************************************** - Copyright (c) 2002 The UbixOS Project + Copyright (c) 2002-2004 The UbixOS Project All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are -permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of -conditions, the following disclaimer and the list of authors. Redistributions in binary -form must reproduce the above copyright notice, this list of conditions, the following -disclaimer and the list of authors in the documentation and/or other materials provided -with the distribution. Neither the name of the UbixOS Project nor the names of its -contributors may be used to endorse or promote products derived from this software -without specific prior written permission. + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - $Log$ - Revision 1.9 2004/05/26 11:55:25 reddawg - devfs: Added spin locks to fix some possible reentrant issues - - Revision 1.8 2004/05/19 15:31:27 reddawg - Fixed up the rest of the references - - Revision 1.7 2004/05/19 04:07:42 reddawg - kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been - - Revision 1.6 2004/04/28 21:10:40 reddawg - Lots Of changes to make it work with existing os - - Revision 1.5 2004/04/28 03:05:35 reddawg - Cleaned up some debug'n code - - Revision 1.4 2004/04/28 02:37:34 reddawg - More updates for using the new driver subsystem - - Revision 1.3 2004/04/28 02:22:54 reddawg - This is a fiarly large commit but we are starting to use new driver model - all around - - Revision 1.2 2004/04/26 22:22:33 reddawg - DevFS now uses correct size of device - - Revision 1.1.1.1 2004/04/15 12:06:54 reddawg - UbixOS v1.0 - - Revision 1.3 2004/04/13 16:36:33 reddawg - Changed our copyright, it is all now under a BSD-Style license - - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Id$ @@ -75,7 +41,7 @@ static spinLock_t devfsSpinLock = SPIN_LOCK_INITIALIZER; -int devFSEnable() { +int devfs_init() { //Add DevFS i will if (vfsRegisterFS(1,devFSInit,devFSRead,devFSWrite,devFSOpen,0x0,0x0,0x0,0x0) != 0x0) { //sysErr(systemErr,"Unable To Enable DevFS"); @@ -226,3 +192,41 @@ return(0x0); } +/*** + $Log$ + Revision 1.10 2004/06/28 23:12:58 reddawg + file format now container:/path/to/file + + Revision 1.9 2004/05/26 11:55:25 reddawg + devfs: Added spin locks to fix some possible reentrant issues + + Revision 1.8 2004/05/19 15:31:27 reddawg + Fixed up the rest of the references + + Revision 1.7 2004/05/19 04:07:42 reddawg + kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been + + Revision 1.6 2004/04/28 21:10:40 reddawg + Lots Of changes to make it work with existing os + + Revision 1.5 2004/04/28 03:05:35 reddawg + Cleaned up some debug'n code + + Revision 1.4 2004/04/28 02:37:34 reddawg + More updates for using the new driver subsystem + + Revision 1.3 2004/04/28 02:22:54 reddawg + This is a fiarly large commit but we are starting to use new driver model + all around + + Revision 1.2 2004/04/26 22:22:33 reddawg + DevFS now uses correct size of device + + Revision 1.1.1.1 2004/04/15 12:06:54 reddawg + UbixOS v1.0 + + Revision 1.3 2004/04/13 16:36:33 reddawg + Changed our copyright, it is all now under a BSD-Style license + + END + ***/ diff --git a/src/sys/include/devfs/devfs.h b/src/sys/include/devfs/devfs.h index d22eab9..41293b2 100644 --- a/src/sys/include/devfs/devfs.h +++ b/src/sys/include/devfs/devfs.h @@ -48,7 +48,7 @@ int devFSOpen(char *file,fileDescriptor *fd); void devFSInit(struct mountPoints *mp); -int devFSEnable(); +int devfs_init(); int devFSRead(fileDescriptor *fd,char *data,long offset,long size); int devFSWrite(fileDescriptor *fd,char *data,long offset,long size); int devFsMkNod(char *name,uInt8 type,uInt16 major,uInt16 minor); @@ -57,6 +57,9 @@ /*** $Log$ + Revision 1.3 2004/05/21 14:54:41 reddawg + Cleaned up + END ***/ diff --git a/src/sys/include/ubixos/init.h b/src/sys/include/ubixos/init.h index c482375..8717a70 100644 --- a/src/sys/include/ubixos/init.h +++ b/src/sys/include/ubixos/init.h @@ -44,8 +44,6 @@ typedef int (*intFunctionPTR)(); /* - ne2k_init, - devfs_init, ubixfs_init, fdc_init, */ @@ -61,6 +59,8 @@ atkbd_init, time_init, net_init, + ne2k_init, + devfs_init, }; int init_tasksTotal = sizeof(init_tasks)/sizeof(intFunctionPTR); @@ -69,6 +69,10 @@ /*** $Log$ + Revision 1.12 2004/07/14 02:25:40 reddawg + net: netInit to net_init + Changed startup routines + Revision 1.11 2004/07/09 13:37:30 reddawg time: timeInit to time_init Adjusted initialization routines diff --git a/src/sys/init/main.c b/src/sys/init/main.c index c7ff191..cb74e8c 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -43,8 +43,7 @@ #include #include #include -#include -#include +#include #include @@ -87,9 +86,6 @@ //smpInit(); //mouseInit(); //pciInit(); - if (devFSEnable() != 0x0) { - kpanic("Error: Enabling devFS\n"); - } enableUbixFS(); fdcInit(); //initHardDisk(); @@ -163,6 +159,10 @@ /*** $Log$ + Revision 1.49 2004/07/14 12:03:50 reddawg + ne2k: ne2kInit to ne2k_init + Changed Startup Routines + Revision 1.48 2004/07/14 02:25:40 reddawg net: netInit to net_init Changed startup routines