From 0dbc91f0676576b954aa95dafdb434ce19bc805c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 2 Feb 2010 08:16:30 +0800 Subject: [PATCH] Reorganised the modules directory, started serious work on GUI support - Cleaning up and bugfixing VTerm graphics support --- Kernel/Makefile.BuildNum | 2 +- Kernel/drv/vterm.c | 35 +++++++++++++++++-- Kernel/include/modules.h | 9 +++-- Kernel/include/tpl_drv_terminal.h | 8 ++++- Makefile.cfg | 8 +++-- Modules/{ => Display}/BochsGA/Makefile | 0 Modules/{ => Display}/BochsGA/bochsvbe.c | 14 ++++---- Modules/Display/Makefile.tpl | 1 + Modules/{ => Filesystems}/FS_Ext2/Makefile | 0 Modules/{ => Filesystems}/FS_Ext2/dir.c | 0 Modules/{ => Filesystems}/FS_Ext2/ext2.c | 0 .../{ => Filesystems}/FS_Ext2/ext2_common.h | 0 Modules/{ => Filesystems}/FS_Ext2/ext2fs.h | 0 Modules/{ => Filesystems}/FS_Ext2/read.c | 0 Modules/{ => Filesystems}/FS_Ext2/write.c | 0 Modules/Filesystems/Makefile.tpl | 1 + Modules/Interfaces/Makefile.tpl | 1 + Modules/{ => Interfaces}/UDI/Makefile | 0 Modules/{ => Interfaces}/UDI/buf.c | 0 Modules/{ => Interfaces}/UDI/cb.c | 0 Modules/{ => Interfaces}/UDI/imc.c | 0 .../UDI/include/physio/meta_bus.h | 0 .../UDI/include/physio/meta_intr.h | 0 .../{ => Interfaces}/UDI/include/physio/pio.h | 0 Modules/{ => Interfaces}/UDI/include/udi.h | 0 .../{ => Interfaces}/UDI/include/udi/attr.h | 0 .../{ => Interfaces}/UDI/include/udi/buf.h | 0 Modules/{ => Interfaces}/UDI/include/udi/cb.h | 0 .../{ => Interfaces}/UDI/include/udi/imc.h | 0 .../{ => Interfaces}/UDI/include/udi/init.h | 0 .../{ => Interfaces}/UDI/include/udi/log.h | 0 .../{ => Interfaces}/UDI/include/udi/mem.h | 0 .../UDI/include/udi/meta_gio.h | 0 .../UDI/include/udi/meta_mgmt.h | 0 .../{ => Interfaces}/UDI/include/udi/strmem.h | 0 .../{ => Interfaces}/UDI/include/udi_physio.h | 0 Modules/{ => Interfaces}/UDI/logging.c | 0 Modules/{ => Interfaces}/UDI/main.c | 0 Modules/{ => Interfaces}/UDI/mem.c | 0 Modules/{ => Interfaces}/UDI/meta_gio.c | 0 Modules/{ => Interfaces}/UDI/meta_mgmt.c | 0 Modules/{ => Interfaces}/UDI/physio.c | 0 .../{ => Interfaces}/UDI/physio/meta_bus.c | 0 .../{ => Interfaces}/UDI/physio/meta_intr.c | 0 Modules/{ => Interfaces}/UDI/physio_main.c | 0 Modules/{ => Interfaces}/UDI/strmem.c | 0 Modules/Makefile.tpl | 1 + Modules/Network/Makefile.tpl | 1 + Modules/{ => Network}/NE2000/Makefile | 0 Modules/{ => Network}/NE2000/ne2000.c | 0 Modules/{ => Storage}/ATA/Makefile | 0 Modules/{ => Storage}/ATA/common.h | 0 Modules/{ => Storage}/ATA/main.c | 0 Modules/{ => Storage}/ATA/mbr.c | 0 Modules/{ => Storage}/FDD/Makefile | 0 Modules/{ => Storage}/FDD/fdd.c | 0 Modules/Storage/Makefile.tpl | 1 + .../Applications/login_src/database_tpl.c | 7 +++- Usermode/Applications/login_src/main.c | 3 +- Usermode/include/acess/devices/terminal.h | 3 +- 60 files changed, 76 insertions(+), 19 deletions(-) rename Modules/{ => Display}/BochsGA/Makefile (100%) rename Modules/{ => Display}/BochsGA/bochsvbe.c (93%) create mode 100644 Modules/Display/Makefile.tpl rename Modules/{ => Filesystems}/FS_Ext2/Makefile (100%) rename Modules/{ => Filesystems}/FS_Ext2/dir.c (100%) rename Modules/{ => Filesystems}/FS_Ext2/ext2.c (100%) rename Modules/{ => Filesystems}/FS_Ext2/ext2_common.h (100%) rename Modules/{ => Filesystems}/FS_Ext2/ext2fs.h (100%) rename Modules/{ => Filesystems}/FS_Ext2/read.c (100%) rename Modules/{ => Filesystems}/FS_Ext2/write.c (100%) create mode 100644 Modules/Filesystems/Makefile.tpl create mode 100644 Modules/Interfaces/Makefile.tpl rename Modules/{ => Interfaces}/UDI/Makefile (100%) rename Modules/{ => Interfaces}/UDI/buf.c (100%) rename Modules/{ => Interfaces}/UDI/cb.c (100%) rename Modules/{ => Interfaces}/UDI/imc.c (100%) rename Modules/{ => Interfaces}/UDI/include/physio/meta_bus.h (100%) rename Modules/{ => Interfaces}/UDI/include/physio/meta_intr.h (100%) rename Modules/{ => Interfaces}/UDI/include/physio/pio.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/attr.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/buf.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/cb.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/imc.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/init.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/log.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/mem.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/meta_gio.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/meta_mgmt.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi/strmem.h (100%) rename Modules/{ => Interfaces}/UDI/include/udi_physio.h (100%) rename Modules/{ => Interfaces}/UDI/logging.c (100%) rename Modules/{ => Interfaces}/UDI/main.c (100%) rename Modules/{ => Interfaces}/UDI/mem.c (100%) rename Modules/{ => Interfaces}/UDI/meta_gio.c (100%) rename Modules/{ => Interfaces}/UDI/meta_mgmt.c (100%) rename Modules/{ => Interfaces}/UDI/physio.c (100%) rename Modules/{ => Interfaces}/UDI/physio/meta_bus.c (100%) rename Modules/{ => Interfaces}/UDI/physio/meta_intr.c (100%) rename Modules/{ => Interfaces}/UDI/physio_main.c (100%) rename Modules/{ => Interfaces}/UDI/strmem.c (100%) create mode 100644 Modules/Network/Makefile.tpl rename Modules/{ => Network}/NE2000/Makefile (100%) rename Modules/{ => Network}/NE2000/ne2000.c (100%) rename Modules/{ => Storage}/ATA/Makefile (100%) rename Modules/{ => Storage}/ATA/common.h (100%) rename Modules/{ => Storage}/ATA/main.c (100%) rename Modules/{ => Storage}/ATA/mbr.c (100%) rename Modules/{ => Storage}/FDD/Makefile (100%) rename Modules/{ => Storage}/FDD/fdd.c (100%) create mode 100644 Modules/Storage/Makefile.tpl diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 3ef05eab..3cd471cb 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1398 +BUILD_NUM = 1407 diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 76b7f1e8..716a5531 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -19,8 +19,8 @@ #define MAX_INPUT_CHARS32 64 #define MAX_INPUT_CHARS8 (MAX_INPUT_CHARS32*4) #define VT_SCROLLBACK 1 // 2 Screens of text -#define DEFAULT_OUTPUT "VGA" -//#define DEFAULT_OUTPUT "BochsGA" +//#define DEFAULT_OUTPUT "VGA" +#define DEFAULT_OUTPUT "BochsGA" #define DEFAULT_INPUT "PS2Keyboard" #define DEFAULT_WIDTH 80 #define DEFAULT_HEIGHT 25 @@ -348,6 +348,28 @@ Uint64 VT_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) case TERM_MODE_TEXT: VT_int_PutString(term, Buffer, Length); break; + case TERM_MODE_FB: + if( term->RealWidth > term->Width || term->RealHeight > term->Height ) + { + #if 0 + int x, y, h; + x = Offset/4; y = x / term->Width; x %= term->Width; + w = Length/4+x; h = w / term->Width; w %= term->Width; + while(h--) + { + VFS_WriteAt( giVT_OutputDevHandle, + (x+y*term->RealWidth)*4, + term->Width * 4, + Buffer + ); + Buffer = (void*)( (Uint)Buffer + term->Width*term->Height*4 ); + } + #endif + return 0; + } + else { + return VFS_WriteAt( giVT_OutputDevHandle, Offset, Length, Buffer ); + } } //LEAVE('i', 0); @@ -364,6 +386,10 @@ int VT_Terminal_IOCtl(tVFS_Node *Node, int Id, void *Data) tVTerm *term = Node->ImplPtr; ENTER("pNode iId pData", Node, Id, Data); + if(Id >= DRV_IOCTL_LOOKUP) { + if( Threads_GetUID() != 0 ) return -1; + } + switch(Id) { case DRV_IOCTL_TYPE: @@ -407,6 +433,11 @@ int VT_Terminal_IOCtl(tVFS_Node *Node, int Id, void *Data) Log("VT_Terminal_IOCtl - RETURN term->Height = %i", term->Height); LEAVE('i', term->Height); return term->Height; + + case TERM_IOCTL_FORCESHOW: + VT_SetTerminal( Node->Inode ); + LEAVE('i', 1); + return 1; } LEAVE('i', -1); return -1; diff --git a/Kernel/include/modules.h b/Kernel/include/modules.h index 591dbf92..d53f7749 100644 --- a/Kernel/include/modules.h +++ b/Kernel/include/modules.h @@ -17,9 +17,12 @@ # error "Unknown architecture when determining MODULE_ARCH_ID ('" #ARCHDIR "')" #endif -#define MODULE_DEFINE(_flags,_ver,_ident,_entry,_deinit,_deps...) char *_DriverDeps_##_ident[]={_deps};\ - tModule __attribute__ ((section ("KMODULES"),unused)) _DriverInfo_##_ident=\ - {MODULE_MAGIC,MODULE_ARCH_ID,_flags,_ver,NULL,#_ident,_entry,_deinit,_DriverDeps_##_ident} +#define MODULE_DEFINE(_flags,_ver,_ident,_entry,_deinit,_deps...) \ + char *EXPAND_CONCAT(_DriverDeps_,_ident)[]={_deps};\ + tModule __attribute__ ((section ("KMODULES"),unused))\ + EXPAND_CONCAT(_DriverInfo_,_ident)=\ + {MODULE_MAGIC,MODULE_ARCH_ID,_flags,_ver,NULL,EXPAND_STR(_ident),\ + _entry,_deinit,EXPAND_CONCAT(_DriverDeps_,_ident)} typedef struct sModule { Uint32 Magic; diff --git a/Kernel/include/tpl_drv_terminal.h b/Kernel/include/tpl_drv_terminal.h index 907cc142..21ba2909 100644 --- a/Kernel/include/tpl_drv_terminal.h +++ b/Kernel/include/tpl_drv_terminal.h @@ -59,7 +59,13 @@ enum eTplTerminal_IOCtl { * \note The id field of \a info is not for use with ::TERM_IOCTL_MODETYPE * This field is just for indexing the mode to get its information. */ - TERM_IOCTL_QUERYMODE + TERM_IOCTL_QUERYMODE, + + /** + * ioctl(...) + * \brief Forces the current terminal to be shown + */ + TERM_IOCTL_FORCESHOW }; /** diff --git a/Makefile.cfg b/Makefile.cfg index be0194f0..348206fb 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -25,8 +25,12 @@ endif FILESYSTEMS = fat DRIVERS = -MODULES = ATA FS_Ext2 FDD NE2000 BochsGA IPStack -DYNMODS = USB UDI +MODULES = Storage/ATA Storage/FDD +MODULES += Network/NE2000 +MODULES += Display/BochsGA +MODULES += Filesystems/FS_Ext2 +MODULES += IPStack +DYNMODS = USB Interfaces/UDI #DISTROOT = /mnt/AcessHDD/Acess2 #DISTROOT = ~/Projects/Acess2/Filesystem diff --git a/Modules/BochsGA/Makefile b/Modules/Display/BochsGA/Makefile similarity index 100% rename from Modules/BochsGA/Makefile rename to Modules/Display/BochsGA/Makefile diff --git a/Modules/BochsGA/bochsvbe.c b/Modules/Display/BochsGA/bochsvbe.c similarity index 93% rename from Modules/BochsGA/bochsvbe.c rename to Modules/Display/BochsGA/bochsvbe.c index 5fe82f5b..06d362cb 100644 --- a/Modules/BochsGA/bochsvbe.c +++ b/Modules/Display/BochsGA/bochsvbe.c @@ -154,7 +154,7 @@ Uint64 BGA_Read(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) * \fn Uint64 BGA_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) * \brief Write to the framebuffer */ -Uint64 BGA_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) +Uint64 BGA_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *Buffer) { ENTER("xoff xlen", off, len); @@ -165,7 +165,7 @@ Uint64 BGA_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) } // Check Input against Frambuffer Size - if(off+len > gBGA_Modes[giBGA_CurrentMode].fbSize) { + if(off + len > gBGA_Modes[giBGA_CurrentMode].fbSize) { LEAVE('i', -1); return -1; } @@ -173,7 +173,7 @@ Uint64 BGA_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) // Text Mode if( gBGA_Modes[giBGA_CurrentMode].flags & MODEFLAG_TEXT ) { - tVT_Char *chars = buffer; + tVT_Char *chars = Buffer; int pitch = gBGA_Modes[giBGA_CurrentMode].width * giVT_CharWidth; int x, y; Uint32 *dest; @@ -209,15 +209,15 @@ Uint64 BGA_Write(tVFS_Node *node, Uint64 off, Uint64 len, void *buffer) { Uint8 *destBuf = (Uint8*) ((Uint)gBGA_Framebuffer + (Uint)off); - LOG("buffer = %p\n", buffer); - LOG("Updating Framebuffer (%p to %p)\n", + Log("buffer = %p", Buffer); + Log("Updating Framebuffer (%p to %p)", destBuf, destBuf + (Uint)len); // Copy to Frambuffer - memcpy(destBuf, buffer, len); + memcpy(destBuf, Buffer, len); - LOG("BGA Framebuffer updated\n"); + Log("BGA Framebuffer updated"); } LEAVE('i', len); diff --git a/Modules/Display/Makefile.tpl b/Modules/Display/Makefile.tpl new file mode 100644 index 00000000..80c6d4dd --- /dev/null +++ b/Modules/Display/Makefile.tpl @@ -0,0 +1 @@ +-include ../../Makefile.tpl diff --git a/Modules/FS_Ext2/Makefile b/Modules/Filesystems/FS_Ext2/Makefile similarity index 100% rename from Modules/FS_Ext2/Makefile rename to Modules/Filesystems/FS_Ext2/Makefile diff --git a/Modules/FS_Ext2/dir.c b/Modules/Filesystems/FS_Ext2/dir.c similarity index 100% rename from Modules/FS_Ext2/dir.c rename to Modules/Filesystems/FS_Ext2/dir.c diff --git a/Modules/FS_Ext2/ext2.c b/Modules/Filesystems/FS_Ext2/ext2.c similarity index 100% rename from Modules/FS_Ext2/ext2.c rename to Modules/Filesystems/FS_Ext2/ext2.c diff --git a/Modules/FS_Ext2/ext2_common.h b/Modules/Filesystems/FS_Ext2/ext2_common.h similarity index 100% rename from Modules/FS_Ext2/ext2_common.h rename to Modules/Filesystems/FS_Ext2/ext2_common.h diff --git a/Modules/FS_Ext2/ext2fs.h b/Modules/Filesystems/FS_Ext2/ext2fs.h similarity index 100% rename from Modules/FS_Ext2/ext2fs.h rename to Modules/Filesystems/FS_Ext2/ext2fs.h diff --git a/Modules/FS_Ext2/read.c b/Modules/Filesystems/FS_Ext2/read.c similarity index 100% rename from Modules/FS_Ext2/read.c rename to Modules/Filesystems/FS_Ext2/read.c diff --git a/Modules/FS_Ext2/write.c b/Modules/Filesystems/FS_Ext2/write.c similarity index 100% rename from Modules/FS_Ext2/write.c rename to Modules/Filesystems/FS_Ext2/write.c diff --git a/Modules/Filesystems/Makefile.tpl b/Modules/Filesystems/Makefile.tpl new file mode 100644 index 00000000..80c6d4dd --- /dev/null +++ b/Modules/Filesystems/Makefile.tpl @@ -0,0 +1 @@ +-include ../../Makefile.tpl diff --git a/Modules/Interfaces/Makefile.tpl b/Modules/Interfaces/Makefile.tpl new file mode 100644 index 00000000..80c6d4dd --- /dev/null +++ b/Modules/Interfaces/Makefile.tpl @@ -0,0 +1 @@ +-include ../../Makefile.tpl diff --git a/Modules/UDI/Makefile b/Modules/Interfaces/UDI/Makefile similarity index 100% rename from Modules/UDI/Makefile rename to Modules/Interfaces/UDI/Makefile diff --git a/Modules/UDI/buf.c b/Modules/Interfaces/UDI/buf.c similarity index 100% rename from Modules/UDI/buf.c rename to Modules/Interfaces/UDI/buf.c diff --git a/Modules/UDI/cb.c b/Modules/Interfaces/UDI/cb.c similarity index 100% rename from Modules/UDI/cb.c rename to Modules/Interfaces/UDI/cb.c diff --git a/Modules/UDI/imc.c b/Modules/Interfaces/UDI/imc.c similarity index 100% rename from Modules/UDI/imc.c rename to Modules/Interfaces/UDI/imc.c diff --git a/Modules/UDI/include/physio/meta_bus.h b/Modules/Interfaces/UDI/include/physio/meta_bus.h similarity index 100% rename from Modules/UDI/include/physio/meta_bus.h rename to Modules/Interfaces/UDI/include/physio/meta_bus.h diff --git a/Modules/UDI/include/physio/meta_intr.h b/Modules/Interfaces/UDI/include/physio/meta_intr.h similarity index 100% rename from Modules/UDI/include/physio/meta_intr.h rename to Modules/Interfaces/UDI/include/physio/meta_intr.h diff --git a/Modules/UDI/include/physio/pio.h b/Modules/Interfaces/UDI/include/physio/pio.h similarity index 100% rename from Modules/UDI/include/physio/pio.h rename to Modules/Interfaces/UDI/include/physio/pio.h diff --git a/Modules/UDI/include/udi.h b/Modules/Interfaces/UDI/include/udi.h similarity index 100% rename from Modules/UDI/include/udi.h rename to Modules/Interfaces/UDI/include/udi.h diff --git a/Modules/UDI/include/udi/attr.h b/Modules/Interfaces/UDI/include/udi/attr.h similarity index 100% rename from Modules/UDI/include/udi/attr.h rename to Modules/Interfaces/UDI/include/udi/attr.h diff --git a/Modules/UDI/include/udi/buf.h b/Modules/Interfaces/UDI/include/udi/buf.h similarity index 100% rename from Modules/UDI/include/udi/buf.h rename to Modules/Interfaces/UDI/include/udi/buf.h diff --git a/Modules/UDI/include/udi/cb.h b/Modules/Interfaces/UDI/include/udi/cb.h similarity index 100% rename from Modules/UDI/include/udi/cb.h rename to Modules/Interfaces/UDI/include/udi/cb.h diff --git a/Modules/UDI/include/udi/imc.h b/Modules/Interfaces/UDI/include/udi/imc.h similarity index 100% rename from Modules/UDI/include/udi/imc.h rename to Modules/Interfaces/UDI/include/udi/imc.h diff --git a/Modules/UDI/include/udi/init.h b/Modules/Interfaces/UDI/include/udi/init.h similarity index 100% rename from Modules/UDI/include/udi/init.h rename to Modules/Interfaces/UDI/include/udi/init.h diff --git a/Modules/UDI/include/udi/log.h b/Modules/Interfaces/UDI/include/udi/log.h similarity index 100% rename from Modules/UDI/include/udi/log.h rename to Modules/Interfaces/UDI/include/udi/log.h diff --git a/Modules/UDI/include/udi/mem.h b/Modules/Interfaces/UDI/include/udi/mem.h similarity index 100% rename from Modules/UDI/include/udi/mem.h rename to Modules/Interfaces/UDI/include/udi/mem.h diff --git a/Modules/UDI/include/udi/meta_gio.h b/Modules/Interfaces/UDI/include/udi/meta_gio.h similarity index 100% rename from Modules/UDI/include/udi/meta_gio.h rename to Modules/Interfaces/UDI/include/udi/meta_gio.h diff --git a/Modules/UDI/include/udi/meta_mgmt.h b/Modules/Interfaces/UDI/include/udi/meta_mgmt.h similarity index 100% rename from Modules/UDI/include/udi/meta_mgmt.h rename to Modules/Interfaces/UDI/include/udi/meta_mgmt.h diff --git a/Modules/UDI/include/udi/strmem.h b/Modules/Interfaces/UDI/include/udi/strmem.h similarity index 100% rename from Modules/UDI/include/udi/strmem.h rename to Modules/Interfaces/UDI/include/udi/strmem.h diff --git a/Modules/UDI/include/udi_physio.h b/Modules/Interfaces/UDI/include/udi_physio.h similarity index 100% rename from Modules/UDI/include/udi_physio.h rename to Modules/Interfaces/UDI/include/udi_physio.h diff --git a/Modules/UDI/logging.c b/Modules/Interfaces/UDI/logging.c similarity index 100% rename from Modules/UDI/logging.c rename to Modules/Interfaces/UDI/logging.c diff --git a/Modules/UDI/main.c b/Modules/Interfaces/UDI/main.c similarity index 100% rename from Modules/UDI/main.c rename to Modules/Interfaces/UDI/main.c diff --git a/Modules/UDI/mem.c b/Modules/Interfaces/UDI/mem.c similarity index 100% rename from Modules/UDI/mem.c rename to Modules/Interfaces/UDI/mem.c diff --git a/Modules/UDI/meta_gio.c b/Modules/Interfaces/UDI/meta_gio.c similarity index 100% rename from Modules/UDI/meta_gio.c rename to Modules/Interfaces/UDI/meta_gio.c diff --git a/Modules/UDI/meta_mgmt.c b/Modules/Interfaces/UDI/meta_mgmt.c similarity index 100% rename from Modules/UDI/meta_mgmt.c rename to Modules/Interfaces/UDI/meta_mgmt.c diff --git a/Modules/UDI/physio.c b/Modules/Interfaces/UDI/physio.c similarity index 100% rename from Modules/UDI/physio.c rename to Modules/Interfaces/UDI/physio.c diff --git a/Modules/UDI/physio/meta_bus.c b/Modules/Interfaces/UDI/physio/meta_bus.c similarity index 100% rename from Modules/UDI/physio/meta_bus.c rename to Modules/Interfaces/UDI/physio/meta_bus.c diff --git a/Modules/UDI/physio/meta_intr.c b/Modules/Interfaces/UDI/physio/meta_intr.c similarity index 100% rename from Modules/UDI/physio/meta_intr.c rename to Modules/Interfaces/UDI/physio/meta_intr.c diff --git a/Modules/UDI/physio_main.c b/Modules/Interfaces/UDI/physio_main.c similarity index 100% rename from Modules/UDI/physio_main.c rename to Modules/Interfaces/UDI/physio_main.c diff --git a/Modules/UDI/strmem.c b/Modules/Interfaces/UDI/strmem.c similarity index 100% rename from Modules/UDI/strmem.c rename to Modules/Interfaces/UDI/strmem.c diff --git a/Modules/Makefile.tpl b/Modules/Makefile.tpl index ae6d5748..964f5cec 100644 --- a/Modules/Makefile.tpl +++ b/Modules/Makefile.tpl @@ -5,6 +5,7 @@ _CPPFLAGS := $(CPPFLAGS) CFGFILES = +CFGFILES += $(shell test -f ../../../Makefile.cfg && echo ../../../Makefile.cfg) CFGFILES += $(shell test -f ../../Makefile.cfg && echo ../../Makefile.cfg) CFGFILES += $(shell test -f ../Makefile.cfg && echo ../Makefile.cfg) CFGFILES += $(shell test -f Makefile.cfg && echo Makefile.cfg) diff --git a/Modules/Network/Makefile.tpl b/Modules/Network/Makefile.tpl new file mode 100644 index 00000000..80c6d4dd --- /dev/null +++ b/Modules/Network/Makefile.tpl @@ -0,0 +1 @@ +-include ../../Makefile.tpl diff --git a/Modules/NE2000/Makefile b/Modules/Network/NE2000/Makefile similarity index 100% rename from Modules/NE2000/Makefile rename to Modules/Network/NE2000/Makefile diff --git a/Modules/NE2000/ne2000.c b/Modules/Network/NE2000/ne2000.c similarity index 100% rename from Modules/NE2000/ne2000.c rename to Modules/Network/NE2000/ne2000.c diff --git a/Modules/ATA/Makefile b/Modules/Storage/ATA/Makefile similarity index 100% rename from Modules/ATA/Makefile rename to Modules/Storage/ATA/Makefile diff --git a/Modules/ATA/common.h b/Modules/Storage/ATA/common.h similarity index 100% rename from Modules/ATA/common.h rename to Modules/Storage/ATA/common.h diff --git a/Modules/ATA/main.c b/Modules/Storage/ATA/main.c similarity index 100% rename from Modules/ATA/main.c rename to Modules/Storage/ATA/main.c diff --git a/Modules/ATA/mbr.c b/Modules/Storage/ATA/mbr.c similarity index 100% rename from Modules/ATA/mbr.c rename to Modules/Storage/ATA/mbr.c diff --git a/Modules/FDD/Makefile b/Modules/Storage/FDD/Makefile similarity index 100% rename from Modules/FDD/Makefile rename to Modules/Storage/FDD/Makefile diff --git a/Modules/FDD/fdd.c b/Modules/Storage/FDD/fdd.c similarity index 100% rename from Modules/FDD/fdd.c rename to Modules/Storage/FDD/fdd.c diff --git a/Modules/Storage/Makefile.tpl b/Modules/Storage/Makefile.tpl new file mode 100644 index 00000000..80c6d4dd --- /dev/null +++ b/Modules/Storage/Makefile.tpl @@ -0,0 +1 @@ +-include ../../Makefile.tpl diff --git a/Usermode/Applications/login_src/database_tpl.c b/Usermode/Applications/login_src/database_tpl.c index 0f794694..ddead96d 100644 --- a/Usermode/Applications/login_src/database_tpl.c +++ b/Usermode/Applications/login_src/database_tpl.c @@ -22,11 +22,11 @@ tUserInfo gUserInfo; */ int ValidateUser(char *Username, char *Password) { - printf("Username: %s\n", Username); if(Username == NULL) return -1; if(Password == NULL) return -1; if(strcmp(Username, "root") == 0) return 0; if(strcmp(Username, "tpg") == 0) return 1; + if(strcmp(Username, "gui") == 0) return 2; return -1; } @@ -47,6 +47,11 @@ tUserInfo *GetUserInfo(int UID) case 1: gUserInfo.Home = "/Acess/Users/tpg"; break; + case 2: + gUserInfo.UID = 0; //HACK! + gUserInfo.Home = "/Acess/Users/gui"; + gUserInfo.Shell = "/Acess/Apps/AxWin/1.0/AxWinWM"; + break; default: gUserInfo.Home = "/Acess/Users/Guest"; break; diff --git a/Usermode/Applications/login_src/main.c b/Usermode/Applications/login_src/main.c index 391d5bcc..2866dbd6 100644 --- a/Usermode/Applications/login_src/main.c +++ b/Usermode/Applications/login_src/main.c @@ -57,7 +57,8 @@ int main(int argc, char *argv[]) child_argv[0] = uinfo->Shell; // Set Environment setgid(uinfo->GID); - setuid(uid); + //setuid(uid); + setuid(uinfo->UID); execve(uinfo->Shell, child_argv, child_envp); exit(-1); diff --git a/Usermode/include/acess/devices/terminal.h b/Usermode/include/acess/devices/terminal.h index 2fc460bd..8397d182 100644 --- a/Usermode/include/acess/devices/terminal.h +++ b/Usermode/include/acess/devices/terminal.h @@ -10,7 +10,8 @@ enum eDrv_Terminal { TERM_IOCTL_MODETYPE = 4, TERM_IOCTL_WIDTH, TERM_IOCTL_HEIGHT, - TERM_IOCTL_QUERYMODE + TERM_IOCTL_QUERYMODE, + TERM_IOCTL_FORCESHOW }; -- 2.20.1