Author: hbelusca
Date: Sat Jan 3 20:45:34 2015
New Revision: 65964
URL:
http://svn.reactos.org/svn/reactos?rev=65964&view=rev
Log:
[FREELDR][INCLUDES]
- ARC disk functions return ARC_STATUS codes (that are ULONG btw, not LONG). Fix
prototypes where needed.
- Rearrange a bit our arc.h header by putting together related structures.
[FREELDR]
- Remove arcemul/time.c (put functions back into machine.c). ARC functions should use some
SYSTEM_PARAMETER_BLOCK firmware vector array instead...
Removed:
trunk/reactos/boot/freeldr/freeldr/arcemul/
Modified:
trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c
trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c
trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
trunk/reactos/boot/freeldr/freeldr/fs/fat.c
trunk/reactos/boot/freeldr/freeldr/fs/fs.c
trunk/reactos/boot/freeldr/freeldr/fs/iso.c
trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
trunk/reactos/boot/freeldr/freeldr/fs/pxe.c
trunk/reactos/boot/freeldr/freeldr/include/arcemul.h
trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
trunk/reactos/boot/freeldr/freeldr/include/fs.h
trunk/reactos/boot/freeldr/freeldr/include/machine.h
trunk/reactos/boot/freeldr/freeldr/machine.c
trunk/reactos/include/reactos/arc/arc.h
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -40,7 +40,6 @@
options.c
oslist.c
version.c
- arcemul/time.c
cache/blocklist.c
cache/cache.c
comm/rs232.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -44,7 +44,7 @@
CHAR PcDiskIdentifier[32][20];
-static LONG DiskClose(ULONG FileId)
+static ARC_STATUS DiskClose(ULONG FileId)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -52,7 +52,7 @@
return ESUCCESS;
}
-static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+static ARC_STATUS DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -63,7 +63,7 @@
return ESUCCESS;
}
-static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+static ARC_STATUS DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
DISKCONTEXT* Context;
UCHAR DriveNumber;
@@ -110,7 +110,7 @@
return ESUCCESS;
}
-static LONG DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+static ARC_STATUS DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
UCHAR* Ptr = (UCHAR*)Buffer;
@@ -155,7 +155,7 @@
return (!ret) ? EIO : ESUCCESS;
}
-static LONG DiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+static ARC_STATUS DiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -109,7 +109,7 @@
} DISKCONTEXT;
static
-LONG
+ARC_STATUS
DiskClose(ULONG FileId)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -119,7 +119,7 @@
}
static
-LONG
+ARC_STATUS
DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -132,7 +132,7 @@
}
static
-LONG
+ARC_STATUS
DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
DISKCONTEXT* Context;
@@ -185,7 +185,7 @@
}
static
-LONG
+ARC_STATUS
DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -219,7 +219,7 @@
}
static
-LONG
+ARC_STATUS
DiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/ramdisk.c [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -21,7 +21,7 @@
/* FUNCTIONS ******************************************************************/
-static LONG RamDiskClose(ULONG FileId)
+static ARC_STATUS RamDiskClose(ULONG FileId)
{
//
// Nothing to do
@@ -29,7 +29,7 @@
return ESUCCESS;
}
-static LONG RamDiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+static ARC_STATUS RamDiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
//
// Give current seek offset and ram disk size to caller
@@ -41,7 +41,7 @@
return ESUCCESS;
}
-static LONG RamDiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+static ARC_STATUS RamDiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
//
// Always return success, as contents are already in memory
@@ -49,7 +49,7 @@
return ESUCCESS;
}
-static LONG RamDiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+static ARC_STATUS RamDiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
PVOID StartAddress;
@@ -76,7 +76,7 @@
return ESUCCESS;
}
-static LONG RamDiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+static ARC_STATUS RamDiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
//
// Only accept absolute mode now
Modified: trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -148,7 +148,7 @@
ULONGLONG SectorNumber;
} DISKCONTEXT;
-static LONG DiskClose(ULONG FileId)
+static ARC_STATUS DiskClose(ULONG FileId)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -156,7 +156,7 @@
return ESUCCESS;
}
-static LONG DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+static ARC_STATUS DiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
@@ -167,7 +167,7 @@
return ESUCCESS;
}
-static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+static ARC_STATUS DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
PSCSI_REQUEST_BLOCK Srb;
PCDB Cdb;
@@ -237,7 +237,7 @@
return ESUCCESS;
}
-static LONG DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+static ARC_STATUS DiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
PSCSI_REQUEST_BLOCK Srb;
@@ -345,7 +345,7 @@
return ESUCCESS;
}
-static LONG DiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+static ARC_STATUS DiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
DISKCONTEXT* Context = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/ex…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -1196,7 +1196,7 @@
return TRUE;
}
-LONG Ext2Close(ULONG FileId)
+ARC_STATUS Ext2Close(ULONG FileId)
{
PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
@@ -1205,7 +1205,7 @@
return ESUCCESS;
}
-LONG Ext2GetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+ARC_STATUS Ext2GetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
@@ -1221,7 +1221,7 @@
return ESUCCESS;
}
-LONG Ext2Open(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+ARC_STATUS Ext2Open(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
PEXT2_FILE_INFO FileHandle;
//ULONG DeviceId;
@@ -1251,7 +1251,7 @@
return ESUCCESS;
}
-LONG Ext2Read(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+ARC_STATUS Ext2Read(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
ULONGLONG BytesReadBig;
@@ -1272,7 +1272,7 @@
return EIO;
}
-LONG Ext2Seek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+ARC_STATUS Ext2Seek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fa…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -1397,7 +1397,7 @@
return TRUE;
}
-LONG FatClose(ULONG FileId)
+ARC_STATUS FatClose(ULONG FileId)
{
PFAT_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
@@ -1407,7 +1407,7 @@
return ESUCCESS;
}
-LONG FatGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+ARC_STATUS FatGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PFAT_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
@@ -1423,7 +1423,7 @@
return ESUCCESS;
}
-LONG FatOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+ARC_STATUS FatOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
PFAT_VOLUME_INFO FatVolume;
FAT_FILE_INFO TempFileInfo;
@@ -1465,7 +1465,7 @@
return ESUCCESS;
}
-LONG FatRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+ARC_STATUS FatRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
PFAT_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
BOOLEAN ret;
@@ -1484,7 +1484,7 @@
return EIO;
}
-LONG FatSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+ARC_STATUS FatSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
PFAT_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fs…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fs.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fs.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -224,7 +224,7 @@
static FILEDATA FileData[MAX_FDS];
static LIST_ENTRY DeviceListHead;
-LONG ArcClose(ULONG FileId)
+ARC_STATUS ArcClose(ULONG FileId)
{
LONG ret;
@@ -242,14 +242,14 @@
return ret;
}
-LONG ArcGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+ARC_STATUS ArcGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
return EBADF;
return FileData[FileId].FuncTable->GetFileInformation(FileId, Information);
}
-LONG ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+ARC_STATUS ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
ULONG Count, i, ret;
PLIST_ENTRY pEntry;
@@ -398,14 +398,14 @@
return ret;
}
-LONG ArcRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+ARC_STATUS ArcRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
return EBADF;
return FileData[FileId].FuncTable->Read(FileId, Buffer, N, Count);
}
-LONG ArcSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
if (FileId >= MAX_FDS || !FileData[FileId].FuncTable)
return EBADF;
Modified: trunk/reactos/boot/freeldr/freeldr/fs/iso.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/is…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/iso.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/iso.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -240,7 +240,7 @@
return ESUCCESS;
}
-LONG IsoClose(ULONG FileId)
+ARC_STATUS IsoClose(ULONG FileId)
{
PISO_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
@@ -249,7 +249,7 @@
return ESUCCESS;
}
-LONG IsoGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+ARC_STATUS IsoGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PISO_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
@@ -263,7 +263,7 @@
return ESUCCESS;
}
-LONG IsoOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+ARC_STATUS IsoOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
ISO_FILE_INFO TempFileInfo;
PISO_FILE_INFO FileHandle;
@@ -292,7 +292,7 @@
return ESUCCESS;
}
-LONG IsoRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+ARC_STATUS IsoRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
PISO_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
UCHAR SectorBuffer[SECTORSIZE];
@@ -461,7 +461,7 @@
return ESUCCESS;
}
-LONG IsoSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+ARC_STATUS IsoSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
PISO_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/nt…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -755,7 +755,7 @@
return TRUE;
}
-LONG NtfsClose(ULONG FileId)
+ARC_STATUS NtfsClose(ULONG FileId)
{
PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId);
@@ -765,7 +765,7 @@
return ESUCCESS;
}
-LONG NtfsGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+ARC_STATUS NtfsGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId);
@@ -781,7 +781,7 @@
return ESUCCESS;
}
-LONG NtfsOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+ARC_STATUS NtfsOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
PNTFS_VOLUME_INFO Volume;
PNTFS_FILE_HANDLE FileHandle;
@@ -828,7 +828,7 @@
return ESUCCESS;
}
-LONG NtfsRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+ARC_STATUS NtfsRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId);
ULONGLONG BytesRead64;
@@ -848,7 +848,7 @@
return EIO;
}
-LONG NtfsSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+ARC_STATUS NtfsSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId);
Modified: trunk/reactos/boot/freeldr/freeldr/fs/pxe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/px…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/pxe.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/pxe.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -116,7 +116,7 @@
return TRUE;
}
-static LONG PxeClose(ULONG FileId)
+static ARC_STATUS PxeClose(ULONG FileId)
{
t_PXENV_TFTP_CLOSE closeData;
@@ -136,7 +136,7 @@
return ESUCCESS;
}
-static LONG PxeGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+static ARC_STATUS PxeGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
if (_OpenFile == NO_FILE || FileId != _OpenFile)
return EBADF;
@@ -148,7 +148,7 @@
return ESUCCESS;
}
-static LONG PxeOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+static ARC_STATUS PxeOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
t_PXENV_TFTP_GET_FSIZE sizeData;
t_PXENV_TFTP_OPEN openData;
@@ -197,7 +197,7 @@
return ESUCCESS;
}
-static LONG PxeRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+static ARC_STATUS PxeRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
t_PXENV_TFTP_READ readData;
ULONG i;
@@ -240,7 +240,7 @@
return ESUCCESS;
}
-static LONG PxeSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+static ARC_STATUS PxeSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
t_PXENV_TFTP_READ readData;
@@ -290,31 +290,31 @@
return &PxeVtbl;
}
-static LONG PxeDiskClose(ULONG FileId)
+static ARC_STATUS PxeDiskClose(ULONG FileId)
{
// Nothing to do
return ESUCCESS;
}
-static LONG PxeDiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
+static ARC_STATUS PxeDiskGetFileInformation(ULONG FileId, FILEINFORMATION* Information)
{
// No disk access in PXE mode
return EINVAL;
}
-static LONG PxeDiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
+static ARC_STATUS PxeDiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
// Nothing to do
return ESUCCESS;
}
-static LONG PxeDiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
+static ARC_STATUS PxeDiskRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count)
{
// No disk access in PXE mode
return EINVAL;
}
-static LONG PxeDiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
+static ARC_STATUS PxeDiskSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode)
{
// No disk access in PXE mode
return EINVAL;
Modified: trunk/reactos/boot/freeldr/freeldr/include/arcemul.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arcemul.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arcemul.h [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -16,24 +16,3 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
-/* component.c */
-CONFIGURATION_COMPONENT* ArcGetChild(CONFIGURATION_COMPONENT *Current);
-CONFIGURATION_COMPONENT* ArcGetParent(CONFIGURATION_COMPONENT *Current);
-CONFIGURATION_COMPONENT* ArcGetPeer(CONFIGURATION_COMPONENT *Current);
-CONFIGURATION_COMPONENT*
-ArcAddChild(
- CONFIGURATION_COMPONENT *Current,
- CONFIGURATION_COMPONENT *Template,
- VOID *ConfigurationData);
-LONG
-ArcDeleteComponent(
- CONFIGURATION_COMPONENT *ComponentToDelete);
-LONG
-ArcGetConfigurationData(
- VOID* ConfigurationData,
- CONFIGURATION_COMPONENT* Component);
-
-/* time.c */
-TIMEINFO* ArcGetTime(VOID);
-ULONG ArcGetRelativeTime(VOID);
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -55,7 +55,7 @@
#endif
/* internal headers */
-#include <arcemul.h>
+// #include <arcemul.h>
#include <bytesex.h>
#include <cache.h>
#include <cmdline.h>
Modified: trunk/reactos/boot/freeldr/freeldr/include/fs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/fs.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/fs.h [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -43,11 +43,11 @@
ULONG FsGetDeviceId(ULONG FileId);
VOID FsInit(VOID);
-LONG ArcClose(ULONG FileId);
-LONG ArcGetFileInformation(ULONG FileId, FILEINFORMATION* Information);
-LONG ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId);
-LONG ArcRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count);
-LONG ArcSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode);
+ARC_STATUS ArcClose(ULONG FileId);
+ARC_STATUS ArcGetFileInformation(ULONG FileId, FILEINFORMATION* Information);
+ARC_STATUS ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId);
+ARC_STATUS ArcRead(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count);
+ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode);
VOID FileSystemError(PCSTR ErrorString);
PFILE FsOpenFile(PCSTR FileName);
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sat Jan 3 20:45:34
2015
@@ -127,4 +127,9 @@
#define MachHwDetect() MachVtbl.HwDetect()
#define MachHwIdle() MachVtbl.HwIdle()
+/* ARC FUNCTIONS **************************************************************/
+
+TIMEINFO* ArcGetTime(VOID);
+ULONG ArcGetRelativeTime(VOID);
+
/* EOF */
Modified: trunk/reactos/boot/freeldr/freeldr/machine.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -168,4 +168,24 @@
return MachVtbl.DiskGetCacheableBlockCount(DriveNumber);
}
+
+/* ARC FUNCTIONS **************************************************************/
+
+TIMEINFO*
+ArcGetTime(VOID)
+{
+ return MachVtbl.GetTime();
+}
+
+ULONG
+ArcGetRelativeTime(VOID)
+{
+ TIMEINFO* TimeInfo;
+ ULONG ret;
+
+ TimeInfo = ArcGetTime();
+ ret = ((TimeInfo->Hour * 24) + TimeInfo->Minute) * 60 + TimeInfo->Second;
+ return ret;
+}
+
/* EOF */
Modified: trunk/reactos/include/reactos/arc/arc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arc/arc.h?…
==============================================================================
--- trunk/reactos/include/reactos/arc/arc.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/arc/arc.h [iso-8859-1] Sat Jan 3 20:45:34 2015
@@ -72,6 +72,31 @@
MemoryClass,
MaximumClass
} CONFIGURATION_CLASS;
+
+// enum CONFIGURATION_TYPE is defined in ntddk.h
+
+typedef struct _CONFIGURATION_COMPONENT
+{
+ CONFIGURATION_CLASS Class;
+ CONFIGURATION_TYPE Type;
+ IDENTIFIER_FLAG Flags;
+ USHORT Version;
+ USHORT Revision;
+ ULONG Key;
+ ULONG AffinityMask;
+ ULONG ConfigurationDataLength;
+ ULONG IdentifierLength;
+ LPSTR Identifier;
+} CONFIGURATION_COMPONENT, *PCONFIGURATION_COMPONENT;
+
+typedef struct _CONFIGURATION_COMPONENT_DATA
+{
+ struct _CONFIGURATION_COMPONENT_DATA *Parent;
+ struct _CONFIGURATION_COMPONENT_DATA *Child;
+ struct _CONFIGURATION_COMPONENT_DATA *Sibling;
+ CONFIGURATION_COMPONENT ComponentEntry;
+ PVOID ConfigurationData;
+} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
typedef enum _TYPE_OF_MEMORY
{
@@ -167,29 +192,6 @@
CHAR GptSignature[16];
} ARC_DISK_SIGNATURE, *PARC_DISK_SIGNATURE;
-typedef struct _CONFIGURATION_COMPONENT
-{
- CONFIGURATION_CLASS Class;
- CONFIGURATION_TYPE Type;
- IDENTIFIER_FLAG Flags;
- USHORT Version;
- USHORT Revision;
- ULONG Key;
- ULONG AffinityMask;
- ULONG ConfigurationDataLength;
- ULONG IdentifierLength;
- LPSTR Identifier;
-} CONFIGURATION_COMPONENT, *PCONFIGURATION_COMPONENT;
-
-typedef struct _CONFIGURATION_COMPONENT_DATA
-{
- struct _CONFIGURATION_COMPONENT_DATA *Parent;
- struct _CONFIGURATION_COMPONENT_DATA *Child;
- struct _CONFIGURATION_COMPONENT_DATA *Sibling;
- CONFIGURATION_COMPONENT ComponentEntry;
- PVOID ConfigurationData;
-} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
-
typedef struct _ARC_DISK_INFORMATION
{
LIST_ENTRY DiskSignatureListHead;
@@ -497,9 +499,41 @@
CHAR Filename[32];
} FILEINFORMATION;
-typedef LONG (*ARC_CLOSE)(ULONG FileId);
-typedef LONG (*ARC_GET_FILE_INFORMATION)(ULONG FileId, FILEINFORMATION* Information);
-typedef LONG (*ARC_OPEN)(CHAR* Path, OPENMODE OpenMode, ULONG* FileId);
-typedef LONG (*ARC_READ)(ULONG FileId, VOID* Buffer, ULONG N, ULONG* Count);
-typedef LONG (*ARC_SEEK)(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMode);
+typedef
+ARC_STATUS
+(*ARC_CLOSE)(
+ ULONG FileId
+);
+
+typedef
+ARC_STATUS
+(*ARC_GET_FILE_INFORMATION)(
+ ULONG FileId,
+ FILEINFORMATION* Information
+);
+
+typedef
+ARC_STATUS
+(*ARC_OPEN)(
+ CHAR* Path,
+ OPENMODE OpenMode,
+ ULONG* FileId
+);
+
+typedef
+ARC_STATUS
+(*ARC_READ)(
+ ULONG FileId,
+ VOID* Buffer,
+ ULONG N, ULONG* Count
+);
+
+typedef
+ARC_STATUS
+(*ARC_SEEK)(
+ ULONG FileId,
+ LARGE_INTEGER* Position,
+ SEEKMODE SeekMode
+);
+
#endif