From: John Hodge Date: Tue, 29 Dec 2009 14:20:34 +0000 (+0800) Subject: Changed "common.h" to "acess.h" to reduce possible conflicts X-Git-Tag: rel0.06~346 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=a4ce2e60f783c9e71447edc03f20f937b8abf35a;p=tpg%2Facess2.git Changed "common.h" to "acess.h" to reduce possible conflicts --- diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 7794f7bf..eda27fd6 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 2 +BUILD_NUM = 5 diff --git a/Kernel/arch/x86/errors.c b/Kernel/arch/x86/errors.c index d6daace5..8b518f87 100644 --- a/Kernel/arch/x86/errors.c +++ b/Kernel/arch/x86/errors.c @@ -3,7 +3,7 @@ * arch/x86/errors.c * - CPU Error Handler */ -#include +#include #include // === CONSTANTS === diff --git a/Kernel/arch/x86/irq.c b/Kernel/arch/x86/irq.c index 7e565971..c9fa7265 100644 --- a/Kernel/arch/x86/irq.c +++ b/Kernel/arch/x86/irq.c @@ -2,7 +2,7 @@ * AcessOS Microkernel Version * irq.c */ -#include +#include // === CONSTANTS === #define MAX_CALLBACKS_PER_IRQ 4 diff --git a/Kernel/arch/x86/lib.c b/Kernel/arch/x86/lib.c index 990d1dca..a3c4fa6b 100644 --- a/Kernel/arch/x86/lib.c +++ b/Kernel/arch/x86/lib.c @@ -2,7 +2,7 @@ * AcessOS Microkernel Version * lib.c */ -#include +#include // === CODE === void Spinlock(int *lock) diff --git a/Kernel/arch/x86/main.c b/Kernel/arch/x86/main.c index c0d75ce6..f6879f8d 100644 --- a/Kernel/arch/x86/main.c +++ b/Kernel/arch/x86/main.c @@ -3,7 +3,7 @@ * x86 Kernel Main * arch/x86/main.c */ -#include +#include #include #include #include diff --git a/Kernel/arch/x86/mm_phys.c b/Kernel/arch/x86/mm_phys.c index c7de9beb..59662e9b 100644 --- a/Kernel/arch/x86/mm_phys.c +++ b/Kernel/arch/x86/mm_phys.c @@ -3,7 +3,7 @@ * - Physical memory manager */ #define DEBUG 1 -#include +#include #include #include diff --git a/Kernel/arch/x86/mm_virt.c b/Kernel/arch/x86/mm_virt.c index b87967dd..058fe007 100644 --- a/Kernel/arch/x86/mm_virt.c +++ b/Kernel/arch/x86/mm_virt.c @@ -10,7 +10,7 @@ * 0xFF - System Calls / Kernel's User Code */ #define DEBUG 1 -#include +#include #include #include diff --git a/Kernel/arch/x86/proc.c b/Kernel/arch/x86/proc.c index 9841c224..2395c684 100644 --- a/Kernel/arch/x86/proc.c +++ b/Kernel/arch/x86/proc.c @@ -2,7 +2,7 @@ * AcessOS Microkernel Version * proc.c */ -#include +#include #include #include #include diff --git a/Kernel/arch/x86/time.c b/Kernel/arch/x86/time.c index abdbb118..5f7d5927 100644 --- a/Kernel/arch/x86/time.c +++ b/Kernel/arch/x86/time.c @@ -3,7 +3,7 @@ * Timekeeping * arch/x86/time.c */ -#include +#include // === MACROS === #define NUM_TIMERS 8 diff --git a/Kernel/bin/elf.c b/Kernel/bin/elf.c index 6719a41f..c516da33 100644 --- a/Kernel/bin/elf.c +++ b/Kernel/bin/elf.c @@ -3,7 +3,7 @@ * ELF Executable Loader Code */ #define DEBUG 0 -#include +#include #include #include "elf.h" diff --git a/Kernel/binary.c b/Kernel/binary.c index e96da76d..fc58bf47 100644 --- a/Kernel/binary.c +++ b/Kernel/binary.c @@ -3,7 +3,7 @@ * Common Binary Loader */ #define DEBUG 0 -#include +#include #include // === CONSTANTS === diff --git a/Kernel/debug.c b/Kernel/debug.c index 3b00241a..b42459de 100644 --- a/Kernel/debug.c +++ b/Kernel/debug.c @@ -2,7 +2,7 @@ * AcessOS Microkernel Version * debug.c */ -#include +#include #include #define DEBUG_TO_E9 1 diff --git a/Kernel/drv/ata_x86.c b/Kernel/drv/ata_x86.c index 044688b9..9974f42b 100644 --- a/Kernel/drv/ata_x86.c +++ b/Kernel/drv/ata_x86.c @@ -3,7 +3,7 @@ * drv/ide.c */ #define DEBUG 0 -#include +#include #include #include #include diff --git a/Kernel/drv/dma.c b/Kernel/drv/dma.c index 246ab46b..9116703e 100644 --- a/Kernel/drv/dma.c +++ b/Kernel/drv/dma.c @@ -2,7 +2,7 @@ * AcessOS 1.0 * DMA Driver */ -#include +#include #define DMA_SIZE (0x2400) #define DMA_ADDRESS(c) ((c)*DMA_SIZE+0x500) //Save Space for IDT and BDA diff --git a/Kernel/drv/fifo.c b/Kernel/drv/fifo.c index df71823b..b028fcb4 100644 --- a/Kernel/drv/fifo.c +++ b/Kernel/drv/fifo.c @@ -1,7 +1,7 @@ /* AcessOS * FIFO Pipe Driver */ -#include +#include #include #include diff --git a/Kernel/drv/iocache.c b/Kernel/drv/iocache.c index 21079cc3..f42957c7 100644 --- a/Kernel/drv/iocache.c +++ b/Kernel/drv/iocache.c @@ -5,7 +5,7 @@ * By thePowersGang (John Hodge) */ #define DEBUG 0 -#include +#include #include // === TYPES === diff --git a/Kernel/drv/kb.c b/Kernel/drv/kb.c index 6c2bf926..b5428b5b 100644 --- a/Kernel/drv/kb.c +++ b/Kernel/drv/kb.c @@ -2,7 +2,7 @@ * Acess2 * PS2 Keyboard Driver */ -#include +#include #include #include #include diff --git a/Kernel/drv/pci.c b/Kernel/drv/pci.c index b256d369..8a86c35c 100644 --- a/Kernel/drv/pci.c +++ b/Kernel/drv/pci.c @@ -3,7 +3,7 @@ * PCI Bus Driver */ #define DEBUG 0 -#include +#include #include #include #include diff --git a/Kernel/drv/proc.c b/Kernel/drv/proc.c index 898deee3..82c84bbc 100644 --- a/Kernel/drv/proc.c +++ b/Kernel/drv/proc.c @@ -3,7 +3,7 @@ * - Kernel Status Driver */ #define DEBUG 1 -#include +#include #include #include #include diff --git a/Kernel/drv/vga.c b/Kernel/drv/vga.c index 4c85631f..11c799c7 100644 --- a/Kernel/drv/vga.c +++ b/Kernel/drv/vga.c @@ -1,7 +1,7 @@ /* * Acess2 VGA Controller Driver */ -#include +#include #include #include #include diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 2011f1c5..50392144 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -1,7 +1,7 @@ /* * Acess2 Virtual Terminal Driver */ -#include +#include #include #include #include diff --git a/Kernel/drvutil.c b/Kernel/drvutil.c index 0af88b34..12f21cd9 100644 --- a/Kernel/drvutil.c +++ b/Kernel/drvutil.c @@ -3,7 +3,7 @@ * Common Driver/Filesystem Helper Functions */ #define DEBUG 0 -#include +#include #include // === CODE === diff --git a/Kernel/heap.c b/Kernel/heap.c index a8fdd536..f42d59f8 100644 --- a/Kernel/heap.c +++ b/Kernel/heap.c @@ -2,7 +2,7 @@ * AcessOS Microkernel Version * heap.c */ -#include +#include #include #include diff --git a/Kernel/include/common.h b/Kernel/include/common.h deleted file mode 100644 index 34825044..00000000 --- a/Kernel/include/common.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - * AcessOS Microkernel Version - * common.h - */ -#ifndef _COMMON_H -#define _COMMON_H - -#define NULL ((void*)0) - -#include -#include - -// --- Helper Macros --- -/** - * \name Helper Macros - * \{ - */ -#define CONCAT(x,y) x ## y -#define EXPAND_CONCAT(x,y) CONCAT(x,y) -#define STR(x) #x -#define EXPAND_STR(x) STR(x) -/** - * \} - */ - -/** - * \name Per-Process Configuration Settings - * \{ - */ -enum eConfigTypes { - CFGT_NULL, - CFGT_INT, - CFGT_HEAPSTR, - CFGT_PTR -}; -enum eConfigs { - CFG_VFS_CWD, - CFG_VFS_MAXFILES, - CFG_VFS_CHROOT, - NUM_CFG_ENTRIES -}; -#define CFGINT(id) (*Threads_GetCfgPtr(id)) -#define CFGPTR(id) (*(void**)Threads_GetCfgPtr(id)) -/** - * \} - */ - -// === CONSTANTS === -// --- Memory Flags -- -/** - * \name Memory Flags - * \{ - * \todo Move to mm_virt.h - */ -#define MM_PFLAG_RO 0x01 // Writes disallowed -#define MM_PFLAG_EXEC 0x02 // Allow execution -#define MM_PFLAG_NOPAGE 0x04 // Prevent from being paged out -#define MM_PFLAG_COW 0x08 // Copy-On-Write -#define MM_PFLAG_KERNEL 0x10 // Kernel-Only (Ring0) -/** - * \} - */ -// --- Interface Flags & Macros -#define CLONE_VM 0x10 - -// === Types === -typedef void (*tThreadFunction)(void*); - -// === Kernel Export Macros === -/** - * \name Kernel Function - * \{ - */ -typedef struct sKernelSymbol { - char *Name; - unsigned int Value; -} tKernelSymbol; -#define EXPORT(_name) tKernelSymbol _kexp_##_name __attribute__((section ("KEXPORT"),unused))={#_name, (Uint)_name} -#define EXPORTV(_name) tKernelSymbol _kexp_##_name __attribute__((section ("KEXPORT"),unused))={#_name, (Uint)&_name} -#define EXPORTAS(_sym,_name) tKernelSymbol _kexp_##_name __attribute__((section ("KEXPORT"),unused))={#_name, (Uint)_sym} -/** - * \} - */ - -// === FUNCTIONS === -// --- Core --- -extern void System_Init(char *ArgString); - -// --- IRQs --- -extern int IRQ_AddHandler(int Num, void (*Callback)(int)); - -// --- Debug --- -/** - * \name Debugging and Errors - * \{ - */ -extern void Panic(char *Msg, ...); -extern void Warning(char *Msg, ...); -extern void Log(char *Fmt, ...); -extern void LogV(char *Fmt, va_list Args); -extern void LogF(char *Fmt, ...); -extern void Debug_Enter(char *FuncName, char *ArgTypes, ...); -extern void Debug_Log(char *FuncName, char *Fmt, ...); -extern void Debug_Leave(char *FuncName, char RetType, ...); -extern void Debug_HexDump(char *Header, void *Data, Uint Length); -#if DEBUG -# define ENTER(_types...) Debug_Enter((char*)__func__, _types) -# define LOG(_fmt...) Debug_Log((char*)__func__, _fmt) -# define LEAVE(_t...) Debug_Leave((char*)__func__, _t) -# define LEAVE_RET(_t,_v...) do{LEAVE(_t,_v);return _v;}while(0) -# define LEAVE_RET0() do{LEAVE('-');return;}while(0) -#else -# define ENTER(...) -# define LOG(...) -# define LEAVE(...) -# define LEAVE_RET(_t,_v...) return (_v) -# define LEAVE_RET0() return -#endif -/** - * \} - */ - -// --- IO --- -/** - * \name I/O Memory Access - * \{ - */ -extern void outb(Uint16 Port, Uint8 Data); -extern void outw(Uint16 Port, Uint16 Data); -extern void outd(Uint16 Port, Uint32 Data); -extern void outq(Uint16 Port, Uint64 Data); -extern Uint8 inb(Uint16 Port); -extern Uint16 inw(Uint16 Port); -extern Uint32 ind(Uint16 Port); -extern Uint64 inq(Uint16 Port); -/** - * \} - */ - -// --- Memory Management --- -/** - * \name Memory Management - * \{ - * \todo Move to mm_virt.h - */ -/** - * \brief Allocate a physical page at \a VAddr - * \param VAddr Virtual Address to allocate at - * \return Physical address allocated - */ -extern tPAddr MM_Allocate(tVAddr VAddr); -/** - * \brief Deallocate a page - * \param VAddr Virtual address to unmap - */ -extern void MM_Deallocate(tVAddr VAddr); -/** - * \brief Map a physical page at \a PAddr to \a VAddr - * \param VAddr Target virtual address - * \param PAddr Physical address to map - * \return Boolean Success - */ -extern int MM_Map(tVAddr VAddr, tPAddr PAddr); -/** - * \brief Get the physical address of \a VAddr - * \param VAddr Address of the page to get the physical address of - * \return Physical page mapped at \a VAddr - */ -extern tPAddr MM_GetPhysAddr(tVAddr VAddr); -/** - * \brief Checks is a memory range is user accessable - * \param VAddr Base address to check - * \return 1 if the memory is all user-accessable, 0 otherwise - */ -extern int MM_IsUser(tVAddr VAddr); -/** - * \brief Set the access flags on a page - * \param VAddr Virtual address of the page - * \param Flags New flags value - * \param Mask Flags to set - */ -extern void MM_SetFlags(tVAddr VAddr, Uint Flags, Uint Mask); -/** - * \brief Temporarily map a page into the address space - * \param PAddr Physical addres to map - * \return Virtual address of page in memory - * \note There is only a limited ammount of slots avaliable - */ -extern tVAddr MM_MapTemp(tPAddr PAddr); -/** - * \brief Free a temporarily mapped page - * \param VAddr Allocate virtual addres of page - */ -extern void MM_FreeTemp(tVAddr VAddr); -/** - * \brief Map a physcal address range into the virtual address space - * \param PAddr Physical address to map in - * \param Number Number of pages to map - */ -extern tVAddr MM_MapHWPage(tPAddr PAddr, Uint Number); -/** - * \brief Allocates DMA physical memory - * \param Pages Number of pages required - * \param MaxBits Maximum number of bits the physical address can have - * \param PhysAddr Pointer to the location to place the physical address allocated - * \return Virtual address allocate - */ -extern tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr); -/** - * \brief Unmaps an allocated hardware range - * \param VAddr Virtual address allocate by ::MM_MapHWPage or ::MM_AllocDMA - * \param Number Number of pages to free - */ -extern void MM_UnmapHWPage(tVAddr VAddr, Uint Number); -/** - * \brief Allocate a single physical page - * \return Physical address allocated - */ -extern tPAddr MM_AllocPhys(); -/** - * \brief Allocate a contiguous range of physical pages - * \param Pages Number of pages to allocate - * \return First physical address allocated - */ -extern tPAddr MM_AllocPhysRange(int Pages); -/** - * \brief Reference a physical page - * \param PAddr Page to mark as referenced - */ -extern void MM_RefPhys(tPAddr PAddr); -/** - * \brief Dereference a physical page - * \param PAddr Page to dereference - */ -extern void MM_DerefPhys(tPAddr PAddr); -/** - * \} - */ - -// --- Memory Manipulation --- -/** - * \name Memory Manipulation - * \{ - */ -extern int memcmp(const void *m1, const void *m2, Uint count); -extern void *memcpy(void *dest, const void *src, Uint count); -extern void *memcpyd(void *dest, const void *src, Uint count); -extern void *memset(void *dest, int val, Uint count); -extern void *memsetd(void *dest, Uint val, Uint count); -/** - * \} - */ -/** - * \name Memory Validation - * \{ - */ -extern int CheckString(char *String); -extern int CheckMem(void *Mem, int Num); -/** - * \} - */ - -// --- Endianness --- -/** - * \name Endianness Swapping - * \{ - */ -extern Uint16 LittleEndian16(Uint16 Val); -extern Uint16 BigEndian16(Uint16 Val); -extern Uint32 LittleEndian32(Uint32 Val); -extern Uint32 BigEndian32(Uint32 Val); -/** - * \} - */ - -// --- Strings --- -/** - * \name Strings - * \{ - */ -extern Uint strlen(const char *Str); -extern char *strcpy(char *__dest, const char *__src); -extern int strcmp(const char *__str1, const char *__str2); -extern int strncmp(const char *Str1, const char *Str2, size_t num); -extern int strucmp(const char *Str1, const char *Str2); -extern char *strdup(const char *Str); -extern int strpos(const char *Str, char Ch); -extern int strpos8(const char *str, Uint32 search); -extern void itoa(char *buf, Uint num, int base, int minLength, char pad); -extern int ReadUTF8(Uint8 *str, Uint32 *Val); -extern int WriteUTF8(Uint8 *str, Uint32 Val); -extern int LookupString(char **Array, char *Needle); -/** - * \} - */ - -extern Uint rand(); - -// --- Heap --- -/** - * \name Heap - * \{ - */ -extern void *malloc(size_t size); -extern void *calloc(size_t num, size_t size); -extern void *realloc(void *ptr, size_t size); -extern void free(void *Ptr); -extern int IsHeap(void *Ptr); -/** - * \} - */ - -// --- Modules --- -/** - * \name Modules - * \{ - */ -extern int Module_LoadMem(void *Buffer, Uint Length, char *ArgStr); -extern int Module_LoadFile(char *Path, char *ArgStr); -/** - * \} - */ - -// --- Timing --- -/** - * \name Time and Timing - * \{ - */ -extern Sint64 timestamp(int sec, int mins, int hrs, int day, int month, int year); -extern Sint64 now(); -extern int Time_CreateTimer(int Delta, void *Callback, void *Argument); -extern void Time_RemoveTimer(int ID); -extern void Time_Delay(int Delay); -/** - * \} - */ - -// --- Threads --- -/** - * \name Threads and Processes - * \{ - */ -extern int Proc_SpawnWorker(); -extern int Proc_Spawn(char *Path); -extern void Threads_Exit(); -extern void Threads_Yield(); -extern void Threads_Sleep(); -extern int Threads_GetUID(); -extern int Threads_GetGID(); -extern int SpawnTask(tThreadFunction Function, void *Arg); -extern Uint *Threads_GetCfgPtr(int Id); -/** - * \} - */ - -// --- Simple Math --- -extern int DivUp(int num, int dem); - -#include -#include - -#endif diff --git a/Kernel/include/vfs.h b/Kernel/include/vfs.h index 75c30128..11e3555e 100644 --- a/Kernel/include/vfs.h +++ b/Kernel/include/vfs.h @@ -9,7 +9,7 @@ #ifndef _VFS_H #define _VFS_H -#include +#include /** * \name VFS Node Flags diff --git a/Kernel/lib.c b/Kernel/lib.c index f6149652..e5a02478 100644 --- a/Kernel/lib.c +++ b/Kernel/lib.c @@ -2,7 +2,7 @@ * Acess2 * Common Library Functions */ -#include +#include // === CONSTANTS === #define RANDOM_SEED 0xACE55052 diff --git a/Kernel/messages.c b/Kernel/messages.c index 6fcd2898..c5e14c94 100644 --- a/Kernel/messages.c +++ b/Kernel/messages.c @@ -2,7 +2,7 @@ * AcessOS Microkernel Version * messages.c */ -#include +#include #include #include diff --git a/Kernel/modules.c b/Kernel/modules.c index ba92905f..93de973d 100644 --- a/Kernel/modules.c +++ b/Kernel/modules.c @@ -2,7 +2,7 @@ * Acess2 * - Module Loader */ -#include +#include #include #define USE_EDI 0 @@ -144,14 +144,17 @@ int Module_LoadFile(char *Path, char *ArgString) base = Binary_LoadKernel(Path); // Error check - if(base == NULL) return 0; + if(base == NULL) { + Warning("Module_LoadFile: Unable to load '%s'", Path); + return 0; + } // Check for Acess Driver if( Binary_FindSymbol(base, "DriverInfo", (Uint*)&info ) == 0 ) { #if USE_EDI // Check for EDI Driver - if( Binary_FindSymbol(base, "driver_init", NULL ) == 0 ) + if( Binary_FindSymbol(base, "driver_init", NULL ) != 0 ) { Binary_Relocate(base); // Relocate return Module_InitEDI( base ); // And intialise @@ -159,7 +162,7 @@ int Module_LoadFile(char *Path, char *ArgString) #endif #if USE_UDI - if( Binary_FindSymbol(base, "udi_init_info", NULL ) == 0 ) + if( Binary_FindSymbol(base, "udi_init_info", NULL ) != 0 ) { Binary_Relocate(base); // Relocate return UDI_LoadDriver( base ); // And intialise @@ -169,9 +172,9 @@ int Module_LoadFile(char *Path, char *ArgString) // Unknown module type?, return error Binary_Unload(base); #if USE_EDI - Warning("Module_LoadMem: Module has neither a Module Info struct, nor an EDI entrypoint"); + Warning("Module_LoadFile: Module has neither a Module Info struct, nor an EDI entrypoint"); #else - Warning("Module_LoadMem: Module does not have a Module Info struct"); + Warning("Module_LoadFile: Module does not have a Module Info struct"); #endif return 0; } @@ -179,14 +182,14 @@ int Module_LoadFile(char *Path, char *ArgString) // Check magic number if(info->Magic != MODULE_MAGIC) { - Warning("Module_LoadMem: Module's magic value is invalid (0x%x != 0x%x)", info->Magic, MODULE_MAGIC); + Warning("Module_LoadFile: Module's magic value is invalid (0x%x != 0x%x)", info->Magic, MODULE_MAGIC); return 0; } // Check Architecture if(info->Arch != MODULE_ARCH_ID) { - Warning("Module_LoadMem: Module is for a different architecture"); + Warning("Module_LoadFile: Module is for a different architecture"); return 0; } diff --git a/Kernel/syscalls.c b/Kernel/syscalls.c index 6eee6666..2570f8cc 100644 --- a/Kernel/syscalls.c +++ b/Kernel/syscalls.c @@ -4,7 +4,7 @@ */ #define DEBUG 0 -#include +#include #include #include #include diff --git a/Kernel/system.c b/Kernel/system.c index 8c2d19dc..80af7d1c 100644 --- a/Kernel/system.c +++ b/Kernel/system.c @@ -4,7 +4,7 @@ * system.c */ #define DEBUG 0 -#include +#include // === TYPES === typedef struct diff --git a/Kernel/threads.c b/Kernel/threads.c index 3515fe09..90eb740e 100644 --- a/Kernel/threads.c +++ b/Kernel/threads.c @@ -3,7 +3,7 @@ * threads.c * - Common Thread Control */ -#include +#include #include #include diff --git a/Kernel/vfs/acls.c b/Kernel/vfs/acls.c index 51cf65b4..ac3e8bac 100644 --- a/Kernel/vfs/acls.c +++ b/Kernel/vfs/acls.c @@ -1,7 +1,7 @@ /* * Acess Micro VFS */ -#include +#include #include "vfs.h" #include "vfs_int.h" diff --git a/Kernel/vfs/dir.c b/Kernel/vfs/dir.c index 52e9f807..fbfc3af2 100644 --- a/Kernel/vfs/dir.c +++ b/Kernel/vfs/dir.c @@ -3,7 +3,7 @@ * - Directory Management Functions */ #define DEBUG 0 -#include +#include #include #include diff --git a/Kernel/vfs/fs/devfs.c b/Kernel/vfs/fs/devfs.c index 90770a75..7781632c 100644 --- a/Kernel/vfs/fs/devfs.c +++ b/Kernel/vfs/fs/devfs.c @@ -3,7 +3,7 @@ * Device Filesystem (DevFS) * - vfs/fs/devfs.c */ -#include +#include #include #include diff --git a/Kernel/vfs/fs/fat.c b/Kernel/vfs/fs/fat.c index 041e83fc..a18f9511 100644 --- a/Kernel/vfs/fs/fat.c +++ b/Kernel/vfs/fs/fat.c @@ -8,7 +8,7 @@ #define CACHE_FAT 1 //!< Caches the FAT in memory #define USE_LFN 1 //!< Enables the use of Long File Names -#include +#include #include #include #include "fs_fat.h" diff --git a/Kernel/vfs/fs/root.c b/Kernel/vfs/fs/root.c index 7a1dade3..4772fa72 100644 --- a/Kernel/vfs/fs/root.c +++ b/Kernel/vfs/fs/root.c @@ -2,6 +2,7 @@ * AcessMicro VFS * - Root Filesystem Driver */ +#include #include #include diff --git a/Kernel/vfs/io.c b/Kernel/vfs/io.c index 84c930fd..8ff15f56 100644 --- a/Kernel/vfs/io.c +++ b/Kernel/vfs/io.c @@ -2,7 +2,7 @@ * AcessMicro VFS * - File IO Passthru's */ -#include +#include #include "vfs.h" #include "vfs_int.h" diff --git a/Kernel/vfs/main.c b/Kernel/vfs/main.c index 4722aae5..c8636b16 100644 --- a/Kernel/vfs/main.c +++ b/Kernel/vfs/main.c @@ -2,7 +2,7 @@ * Acess 2 * Virtual File System */ -#include +#include #include #include "vfs.h" #include "vfs_int.h" diff --git a/Kernel/vfs/memfile.c b/Kernel/vfs/memfile.c index 2fc38e76..4120b20a 100644 --- a/Kernel/vfs/memfile.c +++ b/Kernel/vfs/memfile.c @@ -1,6 +1,9 @@ -/* +/* + * Acess 2 + * Virtual File System + * - Memory Pseudo Files */ -#include +#include #include // === PROTOTYPES === diff --git a/Kernel/vfs/mount.c b/Kernel/vfs/mount.c index 6c0929e2..69a66238 100644 --- a/Kernel/vfs/mount.c +++ b/Kernel/vfs/mount.c @@ -1,7 +1,7 @@ /* * Acess Micro - VFS Server version 1 */ -#include +#include #include #include #include diff --git a/Kernel/vfs/nodecache.c b/Kernel/vfs/nodecache.c index b1b1b61c..0124e628 100644 --- a/Kernel/vfs/nodecache.c +++ b/Kernel/vfs/nodecache.c @@ -2,7 +2,7 @@ * AcessMicro VFS * - File IO Passthru's */ -#include +#include #include "vfs.h" #include "vfs_int.h" diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 655272ef..74427b56 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -3,7 +3,7 @@ * - Open, Close and ChDir */ #define DEBUG 0 -#include +#include #include "vfs.h" #include "vfs_int.h" #include "vfs_ext.h" diff --git a/Modules/BochsGA/bochsvbe.c b/Modules/BochsGA/bochsvbe.c index fdf92253..3d19585e 100644 --- a/Modules/BochsGA/bochsvbe.c +++ b/Modules/BochsGA/bochsvbe.c @@ -5,7 +5,7 @@ * \warning This driver does NOT support the Bochs PCI VGA driver */ #define DEBUG 0 -#include +#include #include #include #include diff --git a/Modules/FDD/fdd.c b/Modules/FDD/fdd.c index c087418c..8227cb5a 100644 --- a/Modules/FDD/fdd.c +++ b/Modules/FDD/fdd.c @@ -3,7 +3,7 @@ * Floppy Disk Access Code */ #define DEBUG 0 -#include +#include #include #include #include diff --git a/Modules/FS_Ext2/ext2_common.h b/Modules/FS_Ext2/ext2_common.h index 07e838e5..2e2babae 100644 --- a/Modules/FS_Ext2/ext2_common.h +++ b/Modules/FS_Ext2/ext2_common.h @@ -8,7 +8,7 @@ */ #ifndef _EXT2_COMMON_H #define _EXT2_COMMON_H -#include +#include #include #include "ext2fs.h" diff --git a/Modules/IPStack/ipstack.h b/Modules/IPStack/ipstack.h index 9315f402..94fabbb5 100644 --- a/Modules/IPStack/ipstack.h +++ b/Modules/IPStack/ipstack.h @@ -5,7 +5,7 @@ #ifndef _IPSTACK_H_ #define _IPSTACK_H_ -#include +#include #include typedef union uIPv4 tIPv4; diff --git a/Modules/NE2000/ne2000.c b/Modules/NE2000/ne2000.c index abca050c..99abbb39 100644 --- a/Modules/NE2000/ne2000.c +++ b/Modules/NE2000/ne2000.c @@ -5,7 +5,7 @@ */ #define DEBUG 0 #define VERSION ((0<<8)|50) -#include +#include #include #include #include diff --git a/Modules/UDI/main.c b/Modules/UDI/main.c index 63f6d8b2..03a1650e 100644 --- a/Modules/UDI/main.c +++ b/Modules/UDI/main.c @@ -30,7 +30,9 @@ int UDI_Install(char **Arguments) int UDI_LoadDriver(void *Base) { udi_init_t *info; + char *udiprops; int i, j; + if( Binary_FindSymbol(Base, "udi_init_info", (Uint*)&info) == 0) { Binary_Unload(Base); return 0; diff --git a/Modules/USB/main.c b/Modules/USB/main.c index 7276d0e7..a992433b 100644 --- a/Modules/USB/main.c +++ b/Modules/USB/main.c @@ -4,7 +4,7 @@ */ #define VERSION ( (0<<8)| 5 ) #define DEBUG 1 -#include +#include #include #include #include diff --git a/Modules/USB/uhci.c b/Modules/USB/uhci.c index 2f1950a6..55faeb06 100644 --- a/Modules/USB/uhci.c +++ b/Modules/USB/uhci.c @@ -3,7 +3,7 @@ * Universal Host Controller Interface */ #define DEBUG 1 -#include +#include #include #include #include "usb.h" diff --git a/Modules/USB/usb.c b/Modules/USB/usb.c index 99f905f8..3ac7bf8e 100644 --- a/Modules/USB/usb.c +++ b/Modules/USB/usb.c @@ -3,7 +3,7 @@ * USB Packet Control */ #define DEBUG 1 -#include +#include #include #include #include "usb.h" diff --git a/Usermode/include/acess/devices/terminal.h b/Usermode/include/acess/devices/terminal.h index 473271ca..2fc460bd 100644 --- a/Usermode/include/acess/devices/terminal.h +++ b/Usermode/include/acess/devices/terminal.h @@ -4,6 +4,7 @@ #ifndef _SYS_DEVICES_TERMINAL_H #define _SYS_DEVICES_TERMINAL_H +#include enum eDrv_Terminal { TERM_IOCTL_MODETYPE = 4, @@ -15,15 +16,12 @@ enum eDrv_Terminal { struct sTerm_IOCtl_Mode { - short ID; //!< Zero Based index of mode - short DriverID; //!< Driver's ID number (from ::tVideo_IOCtl_Mode) - Uint16 Height; //!< Height - Uint16 Width; //!< Width - Uint8 Depth; //!< Bits per cell - struct { - unsigned bText: 1; //!< Text Mode marker - unsigned unused: 7; - }; + int16_t ID; //!< Zero Based index of mode + int16_t DriverID; //!< Driver's ID number (from ::tVideo_IOCtl_Mode) + uint16_t Height; //!< Height + uint16_t Width; //!< Width + uint8_t Depth; //!< Bits per cell + uint8_t Flags; //!< Flags (1: Text Mode) }; /** diff --git a/Usermode/include/acess/sys.h b/Usermode/include/acess/sys.h index f7deac7d..c9a57619 100644 --- a/Usermode/include/acess/sys.h +++ b/Usermode/include/acess/sys.h @@ -11,6 +11,7 @@ #define OPENFLAG_READ 0x02 #define OPENFLAG_WRITE 0x04 #define OPENFLAG_NOLINK 0x40 +#define OPENFLAG_CREATE 0x40 #ifndef SEEK_CUR # define SEEK_SET 1 # define SEEK_CUR 0