diff --git a/src/sys/devfs/devfs.c b/src/sys/devfs/devfs.c index 3cc93ef..c564f23 100644 --- a/src/sys/devfs/devfs.c +++ b/src/sys/devfs/devfs.c @@ -40,6 +40,9 @@ /* Spinlock for devfs we should start converting to sem/mutex */ static spinLock_t devfsSpinLock = SPIN_LOCK_INITIALIZER; +/* Length of dev list */ +static int devfs_len = 0x0; + static void devfs_initialize(vfs_mountPoint_t *mp) { struct devfs_info *fsInfo = 0x0; @@ -61,6 +64,13 @@ spinLock(&devfsSpinLock); + if (strcmp(file,"/") == 0x0) { + fd->start = -1; + fd->size = devfs_len; + spinUnlock(&devfsSpinLock); + return(0x1); + } + for (tmpDev = fsInfo->deviceList;tmpDev != 0x0;tmpDev = tmpDev->next) { if (strcmp(tmpDev->devName,file) == 0x0) { switch ((fd->mode & 0x3)) { @@ -98,9 +108,18 @@ struct device_node *device = 0x0; struct devfs_devices *tmpDev = (void *)fd->start; + if (tmpDev == -1) { + kprintf("Hi Ubie [%i]!!!\n", size); + for (i = 0;i < size;i++) { + data[i] = 'a'; + fd->buffer[i] = 'a'; + } + data[size - 1] = '\n'; + return(size); + } + device = device_find(tmpDev->devMajor,tmpDev->devMinor); - sectors = ((size+511)/512); diff = (offset - ((offset/512)*512)); @@ -169,6 +188,7 @@ tmpDev->devMajor = major; tmpDev->devMinor = minor; sprintf(tmpDev->devName,name); + devfs_len += strlen(name) + 1; tmpDev->next = fsInfo->deviceList; tmpDev->prev = 0x0; diff --git a/src/sys/kernel/exec.c b/src/sys/kernel/exec.c index 4406c48..20209e7 100644 --- a/src/sys/kernel/exec.c +++ b/src/sys/kernel/exec.c @@ -429,193 +429,5 @@ } /*** - $Log$ - Revision 1.73 2004/09/11 14:23:34 reddawg - ok - - Revision 1.72 2004/09/07 21:54:38 reddawg - ok reverted back to old scheduling for now.... - - Revision 1.62 2004/08/14 11:23:02 reddawg - Changes - - Revision 1.61 2004/08/09 12:58:05 reddawg - let me know when you got the surce - - Revision 1.60 2004/08/06 22:32:16 reddawg - Ubix Works Again - - Revision 1.58 2004/08/04 08:17:57 reddawg - tty: we have primative ttys try f1-f5 so it is easier to use and debug - ubixos - - Revision 1.57 2004/08/02 17:38:24 reddawg - Cleaned up self inflicted bug that messed up argc,argv - - Revision 1.56 2004/07/28 17:07:25 reddawg - MPI: moved the syscalls - - Revision 1.55 2004/07/28 15:05:43 reddawg - Major: - Pages now have strict security enforcement. - Many null dereferences have been resolved. - When apps loaded permissions set for pages rw and ro - - Revision 1.54 2004/07/28 00:24:20 reddawg - removed debug code - - Revision 1.53 2004/07/28 00:17:05 reddawg - Major: - Disconnected page 0x0 from the system... Unfortunately this broke many things - all of which have been fixed. This was good because nothing deferences NULL - any more. - - Things affected: - malloc,kmalloc,getfreepage,getfreevirtualpage,pagefault,fork,exec,ld,ld.so,exec,file - - Revision 1.52 2004/07/27 07:27:50 reddawg - chg: I was fooled thought we failed but it was a casting issue - - Revision 1.51 2004/07/27 07:25:09 reddawg - chg: I should of made it print out stackAddr - - Revision 1.50 2004/07/27 07:17:50 reddawg - chg: verify location of stack before building process - - Revision 1.49 2004/07/24 23:04:44 reddawg - Changes... mark let me know if you fault at pid 185 when you type stress - - Revision 1.48 2004/07/22 19:27:36 reddawg - Did i forget to commit - - Revision 1.47 2004/07/22 19:18:14 reddawg - Fixed some pointer arithmatic which isn't causing any troubles marky mark who can't code rock hard - - Revision 1.46 2004/07/22 18:46:16 reddawg - Fixed up exec.c - - Revision 1.45 2004/07/22 17:32:25 reddawg - I broke it hopefully - - Revision 1.44 2004/07/20 22:29:55 reddawg - assert: remade assert - - Revision 1.43 2004/07/20 21:35:09 reddawg - Let me commit before we start to overlap - - Revision 1.42 2004/07/18 05:24:15 reddawg - Fixens - - Revision 1.41 2004/07/17 03:10:18 reddawg - Added asserts no problems thusfar - - Revision 1.40 2004/06/28 23:12:58 reddawg - file format now container:/path/to/file - - Revision 1.39 2004/06/18 15:29:38 reddawg - zero out memory - - Revision 1.38 2004/06/18 15:18:04 reddawg - bug fixes: did some double checking on pointers and 0x0 out memory - - Revision 1.37 2004/06/17 13:05:14 reddawg - dynamic linking: fixed int6 issue problem was multiple rel's - - Revision 1.36 2004/06/17 12:28:56 reddawg - debug: show me the output after this is a tested - - Revision 1.35 2004/06/17 02:58:49 reddawg - Cleaned Out Dead Code - - Revision 1.34 2004/06/17 02:19:29 reddawg - Cleaning out dead code - - Revision 1.32 2004/06/17 02:00:53 reddawg - Test - - Revision 1.31 2004/06/17 01:57:52 reddawg - Test - - Revision 1.30 2004/06/17 01:37:00 reddawg - TCA: test now - - Revision 1.29 2004/06/16 17:46:42 reddawg - Cleaned Dead Code - - Revision 1.28 2004/06/16 17:04:13 reddawg - ld.so: rest of the commit - - Revision 1.25 2004/06/15 23:46:05 reddawg - Nig Nog - - Revision 1.24 2004/06/14 13:16:26 reddawg - Works now 0x1000 line 272 - - Revision 1.21 2004/06/14 12:45:12 reddawg - Fixed!!! - - Revision 1.20 2004/06/14 12:40:48 reddawg - Try now - - Revision 1.18 2004/06/14 12:20:54 reddawg - notes: many bugs repaired and ld works 100% now. - - Revision 1.17 2004/06/12 01:27:26 reddawg - shared objects: yes we almost fully support shared objects - - Revision 1.16 2004/06/10 13:08:00 reddawg - Minor Bug Fixes - - Revision 1.15 2004/06/04 13:29:56 reddawg - libc: modified mkdir(); interface - kpanic: kPanic(); now says kPanic: %s - system: now reboots when receives message for reboot - also when command start sde is received by system the STD is started - - Revision 1.14 2004/06/01 00:04:53 reddawg - Try now mark - - Revision 1.13 2004/05/25 22:44:08 reddawg - Removed debug code - - Revision 1.12 2004/05/22 21:46:37 reddawg - Fixed some bugs - - Revision 1.11 2004/05/22 02:10:42 reddawg - Added Code To Debug ISsue - - Revision 1.10 2004/05/21 21:15:04 reddawg - Fixed a few bugs which prevented the system from loadin - - Revision 1.9 2004/05/21 15:34:23 reddawg - Fixed a couple of typo - - Revision 1.8 2004/05/21 15:32:06 reddawg - Changed the sys fileExec works it just loads sections needed now instead of fully should be a performance increase of about 40% - - Revision 1.7 2004/05/19 04:31:12 reddawg - Fixed some typedef problems in exec - - Revision 1.6 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.5 2004/05/19 01:21:29 reddawg - Tweaked - - Revision 1.4 2004/05/15 02:30:28 reddawg - Lots of changes - - Revision 1.3 2004/05/02 03:19:51 reddawg - Added Spinlock Provision For SMP - - Revision 1.2 2004/04/30 14:16:04 reddawg - Fixed all the datatypes to be consistant uInt8,uInt16,uInt32,Int8,Int16,Int32 - - Revision 1.1.1.1 2004/04/15 12:07:18 reddawg - UbixOS v1.0 - - Revision 1.44 2004/04/13 16:16:44 reddawg - Changed our copyright, it is all now under a BSD-Style license - END ***/