mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Use free Windows DDK and compile with latest MinGW releases.
svn path=/trunk/; revision=3466
This commit is contained in:
parent
fb29fa8a10
commit
387d432884
1331 changed files with 10771 additions and 66987 deletions
|
@ -46,7 +46,7 @@ LOADERS = dos
|
|||
|
||||
# Driver support libraries
|
||||
#bzip2 zlib
|
||||
DRIVERS_LIB = bzip2 zlib
|
||||
DRIVERS_LIB = bzip2
|
||||
|
||||
# Kernel mode device drivers
|
||||
# beep blue floppy ide keyboard mouse null parallel ramdrv serial vga vidport
|
||||
|
|
|
@ -20,11 +20,13 @@ int main(int argc, char* argv[])
|
|||
NTSTATUS Status;
|
||||
HANDLE FileHandle;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING FileName = UNICODE_STRING_INITIALIZER(L"\\C:\\a.txt");
|
||||
UNICODE_STRING FileName;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
CHAR Buffer[256];
|
||||
HANDLE EventHandle;
|
||||
|
||||
RtlInitUnicodeString(&FileName, L"\\C:\\a.txt");
|
||||
|
||||
AllocConsole();
|
||||
InputHandle = GetStdHandle(STD_INPUT_HANDLE);
|
||||
OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
|
||||
#define BUFFER_SIZE 256
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <stdio.h>
|
||||
#include <ntddk.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
* isotest - display cdrom information
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <windows.h>
|
||||
//#include <winioctl.h>
|
||||
#include <winioctl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* $Id: lpcclt.c,v 1.9 2002/08/20 20:37:03 hyperion Exp $
|
||||
/* $Id: lpcclt.c,v 1.10 2002/09/07 15:11:55 chorns Exp $
|
||||
*
|
||||
* DESCRIPTION: Simple LPC Client
|
||||
* PROGRAMMER: David Welch
|
||||
*/
|
||||
#include <ddk/ntddk.h>
|
||||
#include <windows.h>
|
||||
#include <napi/lpc.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -63,7 +63,7 @@ int main(int argc, char* argv[])
|
|||
ZeroMemory(& Request, sizeof Request);
|
||||
strcpy(Request.Data, GetCommandLineA());
|
||||
Request.Header.DataSize = strlen(Request.Data);
|
||||
Request.Header.MessageSize = sizeof(LPC_MESSAGE_HEADER) +
|
||||
Request.Header.MessageSize = sizeof(LPC_MESSAGE) +
|
||||
Request.Header.DataSize;
|
||||
|
||||
printf("%s: Sending to port 0x%x message \"%s\"...\n",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* $Id: lpcsrv.c,v 1.9 2002/08/20 20:37:04 hyperion Exp $
|
||||
/* $Id: lpcsrv.c,v 1.10 2002/09/07 15:11:55 chorns Exp $
|
||||
*
|
||||
* DESCRIPTION: Simple LPC Server
|
||||
* PROGRAMMER: David Welch
|
||||
*/
|
||||
#include <ddk/ntddk.h>
|
||||
#include <windows.h>
|
||||
#include <napi/lpc.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -74,7 +74,7 @@ int main(int argc, char* argv[])
|
|||
printf("%s: Received connection request 0x%08x on port 0x%x.\n", MyName,
|
||||
ConnectMsg.Header.MessageId, NamedPortHandle);
|
||||
printf("%s: Request from: PID=%x, TID=%x.\n", MyName,
|
||||
ConnectMsg.Header.Cid.UniqueProcess, ConnectMsg.Header.Cid.UniqueThread);
|
||||
ConnectMsg.Header.ClientId.UniqueProcess, ConnectMsg.Header.ClientId.UniqueThread);
|
||||
|
||||
printf("%s: Accepting connection request 0x%08x...\n", MyName,
|
||||
ConnectMsg.Header.MessageId);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
|
||||
HANDLE OutputHandle;
|
||||
HANDLE InputHandle;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/* $Id: sectest.c,v 1.2 2002/08/14 20:58:31 dwelch Exp $ */
|
||||
/* $Id: sectest.c,v 1.3 2002/09/07 15:11:55 chorns Exp $ */
|
||||
#define UNICODE
|
||||
#define _UNICODE
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
@ -68,4 +69,3 @@ int main(int argc, char* argv[])
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,16 +6,17 @@
|
|||
|
||||
#define INCLUDE_THE_DDK_HEADERS
|
||||
#ifdef INCLUDE_THE_DDK_HEADERS
|
||||
#include <ddk/ntddk.h>
|
||||
#define ROS_ACE_HEADER ACE_HEADER
|
||||
#define ROS_ACE ACE
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
#define ROS_ACE_HEADER ROS_ACE_HEADER
|
||||
#define ROS_ACE IACE
|
||||
|
||||
//
|
||||
// Allocate the System Luid. The first 1000 LUIDs are reserved.
|
||||
// Use #999 here (0x3E7 = 999)
|
||||
//
|
||||
|
||||
#define SYSTEM_LUID { 0x3E7, 0x0 }
|
||||
//#define SYSTEM_LUID { 0x3E7, 0x0 }
|
||||
#define ANONYMOUS_LOGON_LUID { 0x3e6, 0x0 }
|
||||
#define LOCALSERVICE_LUID { 0x3e5, 0x0 }
|
||||
#define NETWORKSERVICE_LUID { 0x3e4, 0x0 }
|
||||
|
@ -251,7 +252,7 @@ DisplayDacl(PACL pAcl)
|
|||
LPWSTR wszType = 0;
|
||||
PSID pSid;
|
||||
|
||||
status = RtlGetAce(pAcl, i, (ROS_ACE**) &pAce);
|
||||
status = RtlGetAce(pAcl, i, (PACE*) &pAce);
|
||||
if ( ! NT_SUCCESS(status) )
|
||||
{
|
||||
printf("RtlGetAce(): status = 0x%08x\n", status);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: objdir.c,v 1.8 2001/08/03 21:49:14 ea Exp $
|
||||
/* $Id: objdir.c,v 1.9 2002/09/07 15:11:56 chorns Exp $
|
||||
*
|
||||
* DESCRIPTION: Object Manager Simple Explorer
|
||||
* PROGRAMMER: David Welch
|
||||
|
@ -16,8 +16,8 @@
|
|||
* 2001-05-02 (ea)
|
||||
* Added -r option.
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -75,8 +75,6 @@ StatusToName (NTSTATUS Status)
|
|||
return "STATUS_OBJECT_NAME_INVALID";
|
||||
case STATUS_OBJECT_NAME_NOT_FOUND:
|
||||
return "STATUS_OBJECT_NAME_NOT_FOUND";
|
||||
case STATUS_PATH_SYNTAX_BAD:
|
||||
return "STATUS_PATH_SYNTAX_BAD";
|
||||
case STATUS_NO_MORE_ENTRIES:
|
||||
return "STATUS_NO_MORE_ENTRIES";
|
||||
case STATUS_UNSUCCESSFUL:
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#define NTOS_USER_MODE
|
||||
#include <ntos.h>
|
||||
//#include <winioctl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -3,23 +3,34 @@
|
|||
|
||||
REACTOS
|
||||
|
||||
lib/advapi32 TARGET_BASE=0x77dc0000
|
||||
lib/crtdll TARGET_BASE=0x77630000
|
||||
lib/fmifs TARGET_BASE=0x76df0000
|
||||
lib/gdi32 TARGET_BASE=0x77ed0000
|
||||
lib/kernel32 TARGET_BASE=0x77f00000
|
||||
lib/msafd TARGET_BASE=0x777a0000
|
||||
lib/msvcrt TARGET_BASE=0x78000000
|
||||
lib/ntdll TARGET_BASE=0x77f60000
|
||||
lib/ole32 TARGET_BASE=0x77a50000
|
||||
lib/oleaut32 TARGET_BASE=0x76260000
|
||||
lib/secur32 TARGET_BASE=0x10000000
|
||||
lib/shell32 TARGET_BASE=0x77260000
|
||||
lib/user32 TARGET_BASE=0x77e70000
|
||||
lib/version TARGET_BASE=0x77a90000
|
||||
lib/ws2_32 TARGET_BASE=0x77780000
|
||||
# The DLLs are given relatively large address space regions
|
||||
# to allow for debug version of the images to be used without
|
||||
# getting conflicts.
|
||||
# For release versions we should make this more compact to avoid
|
||||
# fragmentation.
|
||||
|
||||
BASE ADDRESS NAME
|
||||
---------------------------------------
|
||||
# We should use the WINE version of these DLLs
|
||||
0x76260000 oleaut32.dll
|
||||
0x77260000 shell32.dll
|
||||
0x77a50000 ole32.dll
|
||||
|
||||
0x77000000 fmifs.dll
|
||||
0x77050000 version.dll
|
||||
0x77100000 secur32.dll
|
||||
0x77200000 wshtcpip.dll
|
||||
0x77300000 msafd.dll
|
||||
0x77400000 ws2_32.dll
|
||||
0x77500000 crtdll.dll
|
||||
0x77700000 gdi32.dll
|
||||
0x77600000 msvcrt.dll
|
||||
0x78000000 advapi32.dll
|
||||
0x78200000 user32.dll
|
||||
0x78600000 kernel32.dll
|
||||
0x78800000 ntdll.dll
|
||||
|
||||
services/dd/vga/display TARGET_BASE=0x70000000
|
||||
services/net/wshtcpip TARGET_BASE=0x777c0000
|
||||
subsys/psx/lib/psxdll TARGET_BASE=0x68EB0000
|
||||
subsys/psx/lib/psxx # TARGET_BASE=0x77dc0000
|
||||
subsys/win32k TARGET_BASE=0x0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -163,8 +163,12 @@
|
|||
* Rounding macros (Power of two boundaries only)
|
||||
*/
|
||||
|
||||
#ifndef ROUND_DOWN
|
||||
#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1)))
|
||||
#endif
|
||||
#ifndef ROUND_UP
|
||||
#define ROUND_UP(value,boundary) (((value) + ((boundary)-1)) & (~((boundary)-1)))
|
||||
#endif
|
||||
|
||||
#define ROUND_DOWN_TO_32_BITS(a) ROUND_DOWN(a,4)
|
||||
#define ROUND_DOWN_TO_64_BITS(a) ROUND_DOWN(a,8)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Name: actypes.h - Common data types for the entire ACPI subsystem
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
|||
#ifndef __ACTYPES_H__
|
||||
#define __ACTYPES_H__
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
/*! [Begin] no source code translation (keep the typedefs) */
|
||||
|
||||
/*
|
||||
|
@ -114,12 +116,16 @@ typedef char *ACPI_PHYSICAL_ADDRESS;
|
|||
* 32-bit type definitions (default)
|
||||
*/
|
||||
typedef unsigned char UINT8;
|
||||
#if 0
|
||||
typedef unsigned char BOOLEAN;
|
||||
typedef unsigned char UCHAR;
|
||||
#endif
|
||||
typedef unsigned short UINT16;
|
||||
#if 0
|
||||
typedef int INT32;
|
||||
typedef unsigned int UINT32;
|
||||
typedef COMPILER_DEPENDENT_UINT64 UINT64;
|
||||
#endif
|
||||
|
||||
typedef UINT32 NATIVE_UINT;
|
||||
typedef INT32 NATIVE_INT;
|
||||
|
|
|
@ -14,783 +14,12 @@
|
|||
#ifndef __INCLUDE_ACPI_TYPES_H
|
||||
#define __INCLUDE_ACPI_TYPES_H
|
||||
|
||||
/* Fixed precision types */
|
||||
typedef signed char INT8, *PINT8;
|
||||
typedef signed short INT16, *PINT16;
|
||||
#if 0
|
||||
typedef signed int INT32, *PINT32;
|
||||
#endif
|
||||
typedef signed long long INT64, *PINT64;
|
||||
#if 0
|
||||
typedef unsigned char UINT8, *PUINT8;
|
||||
typedef unsigned short UINT16, *PUINT16;
|
||||
typedef unsigned int UINT32, *PUINT32;
|
||||
typedef unsigned long long UINT64, *PUINT64;
|
||||
#endif
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntapi.h>
|
||||
|
||||
typedef signed long int LONG32, *PLONG32;
|
||||
typedef unsigned long int ULONG32, *PULONG32;
|
||||
typedef unsigned long int DWORD32, *PDWORD32;
|
||||
|
||||
|
||||
#ifdef _WIN64
|
||||
|
||||
/* 64-bit architecture */
|
||||
|
||||
typedef INT64 INT, *PINT;
|
||||
typedef LONG64 LONG, *PLONG;
|
||||
typedef DWORD64 DWORD, *PDWORD;
|
||||
typedef UINT64 UINT, *PUINT;
|
||||
typedef ULONG64 ULONG, *PULONG;
|
||||
|
||||
/* Pointer precision types */
|
||||
typedef long long INT_PTR, *PINT_PTR;
|
||||
typedef unsigned long long UINT_PTR, *PUINT_PTR;
|
||||
typedef long long LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned long long ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned long long HANDLE_PTR;
|
||||
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
|
||||
typedef int HALF_PTR, *PHALF_PTR;
|
||||
|
||||
#else /* _WIN64 */
|
||||
|
||||
/* 32-bit architecture */
|
||||
|
||||
typedef INT32 INT, *PINT;
|
||||
typedef LONG32 LONG, *PLONG;
|
||||
typedef DWORD32 DWORD, *PDWORD;
|
||||
typedef UINT32 UINT, *PUINT;
|
||||
typedef ULONG32 ULONG, *PULONG;
|
||||
|
||||
|
||||
/* Pointer precision types */
|
||||
typedef int INT_PTR, *PINT_PTR;
|
||||
typedef unsigned int UINT_PTR, *PUINT_PTR;
|
||||
typedef long LONG_PTR, *PLONG_PTR;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
|
||||
typedef short HALF_PTR, *PHALF_PTR;
|
||||
typedef unsigned long HANDLE_PTR;
|
||||
|
||||
#endif /* _WIN64 */
|
||||
|
||||
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
||||
|
||||
typedef long long LONG64, *PLONG64;
|
||||
|
||||
typedef unsigned long long ULONG64, *PULONG64;
|
||||
typedef unsigned long long DWORD64, *PDWORD64;
|
||||
|
||||
|
||||
#if 0
|
||||
typedef unsigned char UCHAR;
|
||||
#endif
|
||||
typedef unsigned short USHORT;
|
||||
typedef unsigned short WCHAR;
|
||||
typedef unsigned short WORD;
|
||||
typedef int BOOL;
|
||||
#if 0
|
||||
typedef unsigned char BOOLEAN;
|
||||
#endif
|
||||
typedef BOOLEAN* PBOOLEAN;
|
||||
typedef unsigned short *LPWSTR;
|
||||
typedef unsigned short *PWSTR;
|
||||
typedef unsigned char *PUCHAR;
|
||||
typedef unsigned short *PUSHORT;
|
||||
typedef void *PVOID;
|
||||
typedef unsigned char BYTE;
|
||||
typedef void *LPVOID;
|
||||
typedef float *PFLOAT;
|
||||
typedef unsigned short *PWCH;
|
||||
typedef unsigned short *PWORD;
|
||||
|
||||
typedef long long LONGLONG;
|
||||
typedef unsigned long long ULONGLONG;
|
||||
typedef long long *PLONGLONG;
|
||||
typedef unsigned long long *PULONGLONG;
|
||||
|
||||
/* Check VOID before defining CHAR, SHORT */
|
||||
#ifndef VOID
|
||||
#define VOID void
|
||||
typedef char CHAR;
|
||||
typedef short SHORT;
|
||||
#endif
|
||||
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *PCH;
|
||||
typedef void *HANDLE;
|
||||
typedef char CCHAR;
|
||||
typedef CCHAR *PCCHAR;
|
||||
|
||||
#if 0
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#define NULL 0
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif /* __cplusplus */
|
||||
#endif /* NULL */
|
||||
|
||||
typedef const unsigned short *PCWSTR;
|
||||
|
||||
typedef char* PCSZ;
|
||||
|
||||
typedef union _LARGE_INTEGER
|
||||
{
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
} u;
|
||||
#ifdef ANONYMOUSUNIONS
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
};
|
||||
#endif /* ANONYMOUSUNIONS */
|
||||
LONGLONG QuadPart;
|
||||
} LARGE_INTEGER, *PLARGE_INTEGER;
|
||||
|
||||
typedef union _ULARGE_INTEGER
|
||||
{
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
} u;
|
||||
#ifdef ANONYMOUSUNIONS
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
};
|
||||
#endif /* ANONYMOUSUNIONS */
|
||||
ULONGLONG QuadPart;
|
||||
} ULARGE_INTEGER, *PULARGE_INTEGER;
|
||||
|
||||
typedef struct _FILETIME
|
||||
{
|
||||
DWORD dwLowDateTime;
|
||||
DWORD dwHighDateTime;
|
||||
} FILETIME, *LPFILETIME, *PFILETIME;
|
||||
|
||||
#define CONST const
|
||||
|
||||
#ifdef i386
|
||||
#define STDCALL __attribute__ ((stdcall))
|
||||
#define CDECL __attribute((cdecl))
|
||||
#define CALLBACK WINAPI
|
||||
#define PASCAL WINAPI
|
||||
#else
|
||||
#define STDCALL
|
||||
#define CDECL
|
||||
#define CALLBACK
|
||||
#define PASCAL
|
||||
#endif
|
||||
|
||||
typedef struct _LIST_ENTRY {
|
||||
struct _LIST_ENTRY *Flink;
|
||||
struct _LIST_ENTRY *Blink;
|
||||
} LIST_ENTRY, *PLIST_ENTRY;
|
||||
|
||||
typedef struct _SINGLE_LIST_ENTRY {
|
||||
struct _SINGLE_LIST_ENTRY *Next;
|
||||
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
|
||||
|
||||
typedef DWORD STDCALL (*PTHREAD_START_ROUTINE) (LPVOID);
|
||||
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
|
||||
|
||||
typedef unsigned short *PWCHAR;
|
||||
|
||||
#ifdef __PPC__
|
||||
#define CONTEXT_CONTROL 1L
|
||||
#define CONTEXT_FLOATING_POINT 2L
|
||||
#define CONTEXT_INTEGER 4L
|
||||
#define CONTEXT_DEBUG_REGISTERS 8L
|
||||
|
||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL)
|
||||
|
||||
#else /* x86 */
|
||||
/* The doc refered me to winnt.h, so I had to look... */
|
||||
#define SIZE_OF_80387_REGISTERS 80
|
||||
|
||||
/* Values for contextflags */
|
||||
#define CONTEXT_i386 0x10000
|
||||
#define CONTEXT_CONTROL (CONTEXT_i386 | 1)
|
||||
#define CONTEXT_INTEGER (CONTEXT_i386 | 2)
|
||||
#define CONTEXT_SEGMENTS (CONTEXT_i386 | 4)
|
||||
#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 8)
|
||||
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x10)
|
||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
|
||||
|
||||
/* our own invention */
|
||||
#define FLAG_TRACE_BIT 0x100
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
typedef struct _FLOATING_SAVE_AREA {
|
||||
DWORD ControlWord;
|
||||
DWORD StatusWord;
|
||||
DWORD TagWord;
|
||||
DWORD ErrorOffset;
|
||||
DWORD ErrorSelector;
|
||||
DWORD DataOffset;
|
||||
DWORD DataSelector;
|
||||
BYTE RegisterArea[80];
|
||||
DWORD Cr0NpxState;
|
||||
} FLOATING_SAVE_AREA;
|
||||
|
||||
typedef struct _CONTEXT {
|
||||
DWORD ContextFlags;
|
||||
|
||||
DWORD Dr0;
|
||||
DWORD Dr1;
|
||||
DWORD Dr2;
|
||||
DWORD Dr3;
|
||||
DWORD Dr6;
|
||||
DWORD Dr7;
|
||||
|
||||
FLOATING_SAVE_AREA FloatSave;
|
||||
|
||||
DWORD SegGs;
|
||||
DWORD SegFs;
|
||||
DWORD SegEs;
|
||||
DWORD SegDs;
|
||||
|
||||
DWORD Edi;
|
||||
DWORD Esi;
|
||||
DWORD Ebx;
|
||||
DWORD Edx;
|
||||
DWORD Ecx;
|
||||
DWORD Eax;
|
||||
|
||||
DWORD Ebp;
|
||||
DWORD Eip;
|
||||
DWORD SegCs;
|
||||
DWORD EFlags;
|
||||
DWORD Esp;
|
||||
DWORD SegSs;
|
||||
} CONTEXT, *PCONTEXT, *LPCONTEXT;
|
||||
|
||||
#else /* __ppc__ */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Floating point registers returned when CONTEXT_FLOATING_POINT is set */
|
||||
double Fpr0;
|
||||
double Fpr1;
|
||||
double Fpr2;
|
||||
double Fpr3;
|
||||
double Fpr4;
|
||||
double Fpr5;
|
||||
double Fpr6;
|
||||
double Fpr7;
|
||||
double Fpr8;
|
||||
double Fpr9;
|
||||
double Fpr10;
|
||||
double Fpr11;
|
||||
double Fpr12;
|
||||
double Fpr13;
|
||||
double Fpr14;
|
||||
double Fpr15;
|
||||
double Fpr16;
|
||||
double Fpr17;
|
||||
double Fpr18;
|
||||
double Fpr19;
|
||||
double Fpr20;
|
||||
double Fpr21;
|
||||
double Fpr22;
|
||||
double Fpr23;
|
||||
double Fpr24;
|
||||
double Fpr25;
|
||||
double Fpr26;
|
||||
double Fpr27;
|
||||
double Fpr28;
|
||||
double Fpr29;
|
||||
double Fpr30;
|
||||
double Fpr31;
|
||||
double Fpscr;
|
||||
|
||||
/* Integer registers returned when CONTEXT_INTEGER is set. */
|
||||
DWORD Gpr0;
|
||||
DWORD Gpr1;
|
||||
DWORD Gpr2;
|
||||
DWORD Gpr3;
|
||||
DWORD Gpr4;
|
||||
DWORD Gpr5;
|
||||
DWORD Gpr6;
|
||||
DWORD Gpr7;
|
||||
DWORD Gpr8;
|
||||
DWORD Gpr9;
|
||||
DWORD Gpr10;
|
||||
DWORD Gpr11;
|
||||
DWORD Gpr12;
|
||||
DWORD Gpr13;
|
||||
DWORD Gpr14;
|
||||
DWORD Gpr15;
|
||||
DWORD Gpr16;
|
||||
DWORD Gpr17;
|
||||
DWORD Gpr18;
|
||||
DWORD Gpr19;
|
||||
DWORD Gpr20;
|
||||
DWORD Gpr21;
|
||||
DWORD Gpr22;
|
||||
DWORD Gpr23;
|
||||
DWORD Gpr24;
|
||||
DWORD Gpr25;
|
||||
DWORD Gpr26;
|
||||
DWORD Gpr27;
|
||||
DWORD Gpr28;
|
||||
DWORD Gpr29;
|
||||
DWORD Gpr30;
|
||||
DWORD Gpr31;
|
||||
|
||||
DWORD Cr; /* Condition register */
|
||||
DWORD Xer; /* Fixed point exception register */
|
||||
|
||||
/* The following are set when CONTEXT_CONTROL is set. */
|
||||
DWORD Msr; /* Machine status register */
|
||||
DWORD Iar; /* Instruction address register */
|
||||
DWORD Lr; /* Link register */
|
||||
DWORD Ctr; /* Control register */
|
||||
|
||||
/* Control which context values are returned */
|
||||
DWORD ContextFlags;
|
||||
DWORD Fill[3];
|
||||
|
||||
/* Registers returned if CONTEXT_DEBUG_REGISTERS is set. */
|
||||
DWORD Dr0; /* Breakpoint Register 1 */
|
||||
DWORD Dr1; /* Breakpoint Register 2 */
|
||||
DWORD Dr2; /* Breakpoint Register 3 */
|
||||
DWORD Dr3; /* Breakpoint Register 4 */
|
||||
DWORD Dr4; /* Breakpoint Register 5 */
|
||||
DWORD Dr5; /* Breakpoint Register 6 */
|
||||
DWORD Dr6; /* Debug Status Register */
|
||||
DWORD Dr7; /* Debug Control Register */
|
||||
} CONTEXT, *PCONTEXT, *LPCONTEXT;
|
||||
#endif
|
||||
|
||||
typedef HANDLE *PHANDLE;
|
||||
|
||||
typedef struct value_ent {
|
||||
LPWSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} WVALENT, *PWVALENT;
|
||||
|
||||
|
||||
typedef const void *LPCVOID;
|
||||
typedef BYTE *LPBYTE, *PBYTE;
|
||||
|
||||
typedef BOOL *PBOOL;
|
||||
|
||||
typedef DWORD LCID;
|
||||
typedef DWORD *PLCID;
|
||||
|
||||
typedef const char *LPCSTR;
|
||||
|
||||
typedef char *LPSTR;
|
||||
|
||||
typedef const unsigned short *LPCWSTR;
|
||||
|
||||
typedef unsigned short RTL_ATOM;
|
||||
typedef unsigned short *PRTL_ATOM;
|
||||
typedef WORD ATOM;
|
||||
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD;
|
||||
|
||||
typedef struct _SMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT, *PSMALL_RECT;
|
||||
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(*PTIMERAPCROUTINE)(
|
||||
LPVOID lpArgToCompletionRoutine,
|
||||
DWORD dwTimerLowValue,
|
||||
DWORD dwTimerHighValue
|
||||
);
|
||||
|
||||
#include <ntos/except.h>
|
||||
/* Undefine some duplicate defined defines */
|
||||
#undef EXCLUSIVE
|
||||
|
||||
#endif /* __INCLUDE_ACPI_TYPES_H */
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: include/types.h
|
||||
* PURPOSE: Types used by all the parts of the system
|
||||
* PROGRAMMER: David Welch <welch@cwcom.net>
|
||||
* UPDATE HISTORY:
|
||||
* 27/06/00: Created
|
||||
*/
|
||||
|
||||
#ifndef __INCLUDE_ACPI_TYPES_H
|
||||
#define __INCLUDE_ACPI_TYPES_H
|
||||
#if 0
|
||||
typedef unsigned char UCHAR;
|
||||
#endif
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned long ULONG;
|
||||
typedef unsigned short USHORT;
|
||||
typedef unsigned short WCHAR;
|
||||
typedef unsigned short WORD;
|
||||
typedef int BOOL;
|
||||
#if 0
|
||||
typedef unsigned char BOOLEAN;
|
||||
#endif
|
||||
typedef BOOLEAN* PBOOLEAN;
|
||||
typedef unsigned int DWORD; /* was unsigned long */
|
||||
typedef unsigned short *LPWSTR;
|
||||
typedef unsigned short *PWSTR;
|
||||
typedef unsigned char *PUCHAR;
|
||||
typedef unsigned int *PUINT;
|
||||
typedef unsigned long *PULONG;
|
||||
typedef unsigned short *PUSHORT;
|
||||
typedef void *PVOID;
|
||||
typedef unsigned char BYTE;
|
||||
typedef void *LPVOID;
|
||||
typedef DWORD *PDWORD;
|
||||
typedef float *PFLOAT;
|
||||
typedef unsigned short *PWCH;
|
||||
typedef unsigned short *PWORD;
|
||||
|
||||
typedef long long LONGLONG;
|
||||
typedef unsigned long long ULONGLONG;
|
||||
typedef long long *PLONGLONG;
|
||||
typedef unsigned long long *PULONGLONG;
|
||||
|
||||
/* Check VOID before defining CHAR, SHORT, and LONG */
|
||||
#ifndef VOID
|
||||
#define VOID void
|
||||
typedef char CHAR;
|
||||
typedef short SHORT;
|
||||
typedef long LONG;
|
||||
#endif
|
||||
|
||||
typedef CHAR *PCHAR;
|
||||
typedef CHAR *PCH;
|
||||
typedef void *HANDLE;
|
||||
typedef char CCHAR;
|
||||
|
||||
#if 0
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
typedef const unsigned short *PCWSTR;
|
||||
|
||||
typedef char* PCSZ;
|
||||
|
||||
typedef union _LARGE_INTEGER
|
||||
{
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
} u;
|
||||
#ifdef ANONYMOUSUNIONS
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
};
|
||||
#endif /* ANONYMOUSUNIONS */
|
||||
LONGLONG QuadPart;
|
||||
} LARGE_INTEGER, *PLARGE_INTEGER;
|
||||
|
||||
typedef union _ULARGE_INTEGER
|
||||
{
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
} u;
|
||||
#ifdef ANONYMOUSUNIONS
|
||||
struct
|
||||
{
|
||||
DWORD LowPart;
|
||||
DWORD HighPart;
|
||||
};
|
||||
#endif /* ANONYMOUSUNIONS */
|
||||
ULONGLONG QuadPart;
|
||||
} ULARGE_INTEGER, *PULARGE_INTEGER;
|
||||
|
||||
#define CONST const
|
||||
|
||||
#ifdef i386
|
||||
#define STDCALL __attribute__ ((stdcall))
|
||||
#define CDECL __attribute((cdecl))
|
||||
#define CALLBACK WINAPI
|
||||
#define PASCAL WINAPI
|
||||
#else
|
||||
#define STDCALL
|
||||
#define CDECL
|
||||
#define CALLBACK
|
||||
#define PASCAL
|
||||
#endif
|
||||
|
||||
typedef struct _LIST_ENTRY {
|
||||
struct _LIST_ENTRY *Flink;
|
||||
struct _LIST_ENTRY *Blink;
|
||||
} LIST_ENTRY, *PLIST_ENTRY;
|
||||
|
||||
typedef struct _SINGLE_LIST_ENTRY {
|
||||
struct _SINGLE_LIST_ENTRY *Next;
|
||||
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
|
||||
|
||||
typedef DWORD STDCALL (*PTHREAD_START_ROUTINE) (LPVOID);
|
||||
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
|
||||
|
||||
typedef unsigned short *PWCHAR;
|
||||
|
||||
#ifdef __PPC__
|
||||
#define CONTEXT_CONTROL 1L
|
||||
#define CONTEXT_FLOATING_POINT 2L
|
||||
#define CONTEXT_INTEGER 4L
|
||||
#define CONTEXT_DEBUG_REGISTERS 8L
|
||||
|
||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL)
|
||||
|
||||
#else /* x86 */
|
||||
/* The doc refered me to winnt.h, so I had to look... */
|
||||
#define SIZE_OF_80387_REGISTERS 80
|
||||
|
||||
/* Values for contextflags */
|
||||
#define CONTEXT_i386 0x10000
|
||||
#define CONTEXT_CONTROL (CONTEXT_i386 | 1)
|
||||
#define CONTEXT_INTEGER (CONTEXT_i386 | 2)
|
||||
#define CONTEXT_SEGMENTS (CONTEXT_i386 | 4)
|
||||
#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 8)
|
||||
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x10)
|
||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
|
||||
|
||||
/* our own invention */
|
||||
#define FLAG_TRACE_BIT 0x100
|
||||
#define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
typedef struct _FLOATING_SAVE_AREA {
|
||||
DWORD ControlWord;
|
||||
DWORD StatusWord;
|
||||
DWORD TagWord;
|
||||
DWORD ErrorOffset;
|
||||
DWORD ErrorSelector;
|
||||
DWORD DataOffset;
|
||||
DWORD DataSelector;
|
||||
BYTE RegisterArea[80];
|
||||
DWORD Cr0NpxState;
|
||||
} FLOATING_SAVE_AREA;
|
||||
|
||||
typedef struct _CONTEXT {
|
||||
DWORD ContextFlags;
|
||||
|
||||
DWORD Dr0;
|
||||
DWORD Dr1;
|
||||
DWORD Dr2;
|
||||
DWORD Dr3;
|
||||
DWORD Dr6;
|
||||
DWORD Dr7;
|
||||
|
||||
FLOATING_SAVE_AREA FloatSave;
|
||||
|
||||
DWORD SegGs;
|
||||
DWORD SegFs;
|
||||
DWORD SegEs;
|
||||
DWORD SegDs;
|
||||
|
||||
DWORD Edi;
|
||||
DWORD Esi;
|
||||
DWORD Ebx;
|
||||
DWORD Edx;
|
||||
DWORD Ecx;
|
||||
DWORD Eax;
|
||||
|
||||
DWORD Ebp;
|
||||
DWORD Eip;
|
||||
DWORD SegCs;
|
||||
DWORD EFlags;
|
||||
DWORD Esp;
|
||||
DWORD SegSs;
|
||||
} CONTEXT, *PCONTEXT, *LPCONTEXT;
|
||||
|
||||
#else /* __ppc__ */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Floating point registers returned when CONTEXT_FLOATING_POINT is set */
|
||||
double Fpr0;
|
||||
double Fpr1;
|
||||
double Fpr2;
|
||||
double Fpr3;
|
||||
double Fpr4;
|
||||
double Fpr5;
|
||||
double Fpr6;
|
||||
double Fpr7;
|
||||
double Fpr8;
|
||||
double Fpr9;
|
||||
double Fpr10;
|
||||
double Fpr11;
|
||||
double Fpr12;
|
||||
double Fpr13;
|
||||
double Fpr14;
|
||||
double Fpr15;
|
||||
double Fpr16;
|
||||
double Fpr17;
|
||||
double Fpr18;
|
||||
double Fpr19;
|
||||
double Fpr20;
|
||||
double Fpr21;
|
||||
double Fpr22;
|
||||
double Fpr23;
|
||||
double Fpr24;
|
||||
double Fpr25;
|
||||
double Fpr26;
|
||||
double Fpr27;
|
||||
double Fpr28;
|
||||
double Fpr29;
|
||||
double Fpr30;
|
||||
double Fpr31;
|
||||
double Fpscr;
|
||||
|
||||
/* Integer registers returned when CONTEXT_INTEGER is set. */
|
||||
DWORD Gpr0;
|
||||
DWORD Gpr1;
|
||||
DWORD Gpr2;
|
||||
DWORD Gpr3;
|
||||
DWORD Gpr4;
|
||||
DWORD Gpr5;
|
||||
DWORD Gpr6;
|
||||
DWORD Gpr7;
|
||||
DWORD Gpr8;
|
||||
DWORD Gpr9;
|
||||
DWORD Gpr10;
|
||||
DWORD Gpr11;
|
||||
DWORD Gpr12;
|
||||
DWORD Gpr13;
|
||||
DWORD Gpr14;
|
||||
DWORD Gpr15;
|
||||
DWORD Gpr16;
|
||||
DWORD Gpr17;
|
||||
DWORD Gpr18;
|
||||
DWORD Gpr19;
|
||||
DWORD Gpr20;
|
||||
DWORD Gpr21;
|
||||
DWORD Gpr22;
|
||||
DWORD Gpr23;
|
||||
DWORD Gpr24;
|
||||
DWORD Gpr25;
|
||||
DWORD Gpr26;
|
||||
DWORD Gpr27;
|
||||
DWORD Gpr28;
|
||||
DWORD Gpr29;
|
||||
DWORD Gpr30;
|
||||
DWORD Gpr31;
|
||||
|
||||
DWORD Cr; /* Condition register */
|
||||
DWORD Xer; /* Fixed point exception register */
|
||||
|
||||
/* The following are set when CONTEXT_CONTROL is set. */
|
||||
DWORD Msr; /* Machine status register */
|
||||
DWORD Iar; /* Instruction address register */
|
||||
DWORD Lr; /* Link register */
|
||||
DWORD Ctr; /* Control register */
|
||||
|
||||
/* Control which context values are returned */
|
||||
DWORD ContextFlags;
|
||||
DWORD Fill[3];
|
||||
|
||||
/* Registers returned if CONTEXT_DEBUG_REGISTERS is set. */
|
||||
DWORD Dr0; /* Breakpoint Register 1 */
|
||||
DWORD Dr1; /* Breakpoint Register 2 */
|
||||
DWORD Dr2; /* Breakpoint Register 3 */
|
||||
DWORD Dr3; /* Breakpoint Register 4 */
|
||||
DWORD Dr4; /* Breakpoint Register 5 */
|
||||
DWORD Dr5; /* Breakpoint Register 6 */
|
||||
DWORD Dr6; /* Debug Status Register */
|
||||
DWORD Dr7; /* Debug Control Register */
|
||||
} CONTEXT, *PCONTEXT, *LPCONTEXT;
|
||||
#endif
|
||||
|
||||
typedef HANDLE *PHANDLE;
|
||||
|
||||
typedef struct value_ent {
|
||||
LPWSTR ve_valuename;
|
||||
DWORD ve_valuelen;
|
||||
DWORD ve_valueptr;
|
||||
DWORD ve_type;
|
||||
} WVALENT, *PWVALENT;
|
||||
|
||||
typedef long *PLONG;
|
||||
|
||||
typedef const void *LPCVOID;
|
||||
typedef BYTE *LPBYTE;
|
||||
|
||||
typedef BYTE *PBYTE;
|
||||
|
||||
typedef DWORD LCID;
|
||||
typedef DWORD *PLCID;
|
||||
|
||||
typedef const char *LPCSTR;
|
||||
|
||||
typedef char *LPSTR;
|
||||
|
||||
typedef const unsigned short *LPCWSTR;
|
||||
|
||||
typedef unsigned short RTL_ATOM;
|
||||
typedef unsigned short *PRTL_ATOM;
|
||||
typedef WORD ATOM;
|
||||
|
||||
typedef struct _COORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD;
|
||||
|
||||
typedef struct _SMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT, *PSMALL_RECT;
|
||||
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(*PTIMERAPCROUTINE)(
|
||||
LPVOID lpArgToCompletionRoutine,
|
||||
DWORD dwTimerLowValue,
|
||||
DWORD dwTimerHighValue
|
||||
);
|
||||
|
||||
#include <ntos/except.h>
|
||||
|
||||
#endif /* __INCLUDE_ACPI_TYPES_H */
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.7 2001/08/23 17:32:03 chorns Exp $
|
||||
# $Id: makefile,v 1.8 2002/09/07 15:11:56 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
|
@ -6,7 +6,7 @@ TARGET_TYPE = driver
|
|||
|
||||
TARGET_NAME = acpi
|
||||
|
||||
TARGET_CFLAGS = -I./include -I./ospm/include
|
||||
TARGET_CFLAGS = -I./include -I./ospm/include -I$(PATH_TO_TOP)/include
|
||||
|
||||
OBJECTS_PATH = objects
|
||||
|
||||
|
|
|
@ -4,11 +4,8 @@
|
|||
* PURPOSE: ACPI bus driver definitions
|
||||
*/
|
||||
#define ACPI_DEBUG
|
||||
#include <acpi.h>
|
||||
#define __INCLUDE_TYPES_H
|
||||
#include <platform/types.h>
|
||||
#undef ROUND_UP
|
||||
#include <ddk/ntddk.h>
|
||||
#include <acpi.h>
|
||||
#include <bm.h>
|
||||
|
||||
typedef ACPI_STATUS (*ACPI_DRIVER_FUNCTION)(VOID);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: isapnp.c,v 1.2 2001/08/27 01:24:56 ekohl Exp $
|
||||
/* $Id: isapnp.c,v 1.3 2002/09/07 15:11:57 chorns Exp $
|
||||
*
|
||||
* PROJECT: ReactOS ISA PnP Bus driver
|
||||
* FILE: isapnp.c
|
||||
|
@ -925,7 +925,7 @@ static BOOLEAN CreateLogicalDevice(PISAPNP_DEVICE_EXTENSION DeviceExtension,
|
|||
PISAPNP_LOGICAL_DEVICE LogicalDevice;
|
||||
BOOLEAN Small;
|
||||
ULONG Priority = 0;
|
||||
ULONG Option = IO_RESOURCE_REQUIRED;
|
||||
ULONG Option = IO_RESOURCE_DEFAULT;
|
||||
|
||||
DPRINT("Card %d Size %d\n", Card->CardId, Size);
|
||||
|
||||
|
@ -955,7 +955,7 @@ static BOOLEAN CreateLogicalDevice(PISAPNP_DEVICE_EXTENSION DeviceExtension,
|
|||
skip = 1;
|
||||
}
|
||||
Priority = 0;
|
||||
Option = IO_RESOURCE_REQUIRED;
|
||||
Option = IO_RESOURCE_DEFAULT;
|
||||
compat = 0;
|
||||
break;
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ static BOOLEAN CreateLogicalDevice(PISAPNP_DEVICE_EXTENSION DeviceExtension,
|
|||
if (Size != 0)
|
||||
goto skip;
|
||||
Priority = 0;
|
||||
Option = IO_RESOURCE_REQUIRED;
|
||||
Option = IO_RESOURCE_DEFAULT;
|
||||
LogicalDevice->CurrentDescriptorCount = 0;
|
||||
break;
|
||||
|
||||
|
@ -1558,7 +1558,7 @@ ISAPNPDispatchOpenClose(
|
|||
DPRINT("Called\n");
|
||||
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = FILE_OPENED;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: beep.c,v 1.12 2002/08/20 20:37:04 hyperion Exp $
|
||||
/* $Id: beep.c,v 1.13 2002/09/07 15:11:58 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,7 +12,8 @@
|
|||
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ddk/ntddbeep.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: blue.c,v 1.33 2002/08/20 20:37:05 hyperion Exp $
|
||||
/* $Id: blue.c,v 1.34 2002/09/07 15:11:58 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -11,10 +11,9 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddblue.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <string.h>
|
||||
#include <defines.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntdddisk.h>
|
||||
|
||||
#include "floppy.h"
|
||||
#define NDEBUG
|
||||
|
@ -101,7 +102,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject,
|
|||
DeviceDescription.Master = FALSE;
|
||||
DeviceDescription.ScatterGather = FALSE;
|
||||
DeviceDescription.AutoInitialize = FALSE;
|
||||
DeviceDescription.Dma32BitAddress = FALSE;
|
||||
DeviceDescription.Dma32BitAddresses = FALSE;
|
||||
DeviceDescription.DmaChannel = ControllerParameters->DmaChannel;
|
||||
DeviceDescription.InterfaceType = Isa;
|
||||
// DeviceDescription.DmaWidth = Width8Bits;
|
||||
|
@ -122,7 +123,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject,
|
|||
#endif
|
||||
|
||||
/* FIXME: Let's assume one drive and one controller for the moment */
|
||||
RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Floppy0");
|
||||
RtlInitUnicodeString(&DeviceName, L"\\Device\\Floppy0");
|
||||
Status = IoCreateDevice(DriverObject,
|
||||
sizeof(FLOPPY_DEVICE_EXTENSION),
|
||||
&DeviceName,
|
||||
|
@ -216,7 +217,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject,
|
|||
CHECKPOINT;
|
||||
Status = IoAllocateAdapterChannel( ControllerExtension->AdapterObject,
|
||||
DeviceObject,
|
||||
0x3000/PAGESIZE, // max track size is 12k
|
||||
0x3000/PAGE_SIZE, // max track size is 12k
|
||||
FloppyAdapterControl,
|
||||
ControllerExtension );
|
||||
if( !NT_SUCCESS( Status ) )
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ide.c,v 1.54 2002/04/07 18:28:49 phreak Exp $
|
||||
/* $Id: ide.c,v 1.55 2002/09/07 15:11:58 chorns Exp $
|
||||
*
|
||||
* IDE.C - IDE Disk driver
|
||||
* written by Rex Jolliff
|
||||
|
@ -68,6 +68,7 @@
|
|||
// -------------------------------------------------------------------------
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <winioctl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: null.c,v 1.8 2002/08/20 20:37:05 hyperion Exp $
|
||||
/* $Id: null.c,v 1.9 2002/09/07 15:11:58 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -113,7 +113,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
|||
DriverObject->DriverUnload = NullUnload;
|
||||
|
||||
/* create null device */
|
||||
RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null");
|
||||
RtlInitUnicodeString(&wstrDeviceName, L"\\Device\\Null");
|
||||
|
||||
nErrCode = IoCreateDevice
|
||||
(
|
||||
|
@ -135,7 +135,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
|||
pdoNullDevice->DeviceExtension = (PVOID)&nxNull;
|
||||
|
||||
/* create zero device */
|
||||
RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero");
|
||||
RtlInitUnicodeString(&wstrDeviceName, L"\\Device\\Zero");
|
||||
|
||||
nErrCode = IoCreateDevice
|
||||
(
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
@ -36,4 +35,3 @@ BEGIN
|
|||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# $Id: makefile,v 1.7 2002/02/05 02:30:13 phreak Exp $
|
||||
# $Id: makefile,v 1.8 2002/09/07 15:11:59 chorns Exp $
|
||||
|
||||
# $Id: makefile,v 1.7 2002/02/05 02:30:13 phreak Exp $
|
||||
# $Id: makefile,v 1.8 2002/09/07 15:11:59 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
|
@ -12,9 +12,7 @@ TARGET_OBJECTS = ramdrv.o
|
|||
|
||||
TARGET_DDKLIBS = unbzip2.a
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_CFLAGS=-I../../../ntoskrnl/include -g
|
||||
TARGET_CFLAGS=-I$(PATH_TO_TOP)/ntoskrnl/include -g
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ntddk.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include "ramdrv.h"
|
||||
#include <debug.h>
|
||||
#include "../../lib/bzip2/bzlib.h"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* entry.c
|
||||
*
|
||||
* $Revision: 1.20 $
|
||||
* $Author: dwelch $
|
||||
* $Date: 2002/09/01 20:39:53 $
|
||||
* $Revision: 1.21 $
|
||||
* $Author: chorns $
|
||||
* $Date: 2002/09/07 15:11:59 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -74,7 +74,7 @@ DrvEnableDriver(IN ULONG EngineVersion,
|
|||
|
||||
DriveEnableData->pdrvfn = FuncList;
|
||||
DriveEnableData->c = sizeof(FuncList) / sizeof(DRVFN);
|
||||
DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION;
|
||||
DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION_NT4;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -115,7 +115,6 @@ DrvDisableDriver(VOID)
|
|||
// IN HANDLE Driver handle to KM driver
|
||||
// RETURNS:
|
||||
// DHPDEV a handle to a DPev object
|
||||
|
||||
DHPDEV STDCALL
|
||||
DrvEnablePDEV(IN DEVMODEW *DM,
|
||||
IN LPWSTR LogAddress,
|
||||
|
@ -125,7 +124,7 @@ DrvEnablePDEV(IN DEVMODEW *DM,
|
|||
OUT ULONG *DevCaps,
|
||||
IN ULONG DevInfoSize,
|
||||
OUT DEVINFO *DI,
|
||||
IN LPWSTR DevDataFile,
|
||||
IN HDEV hDev,
|
||||
IN LPWSTR DeviceName,
|
||||
IN HANDLE Driver)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ntddk.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include "../vgaddi.h"
|
||||
|
@ -101,7 +101,7 @@ BOOL VGAtoDIB(
|
|||
// Used by the temporary DFB
|
||||
PDEVSURF TargetSurf;
|
||||
DEVSURF DestDevSurf;
|
||||
PSURFOBJ TargetBitmapSurf;
|
||||
SURFOBJ *TargetBitmapSurf;
|
||||
HBITMAP hTargetBitmap;
|
||||
SIZEL InterSize;
|
||||
POINTL ZeroPoint;
|
||||
|
|
|
@ -35,10 +35,10 @@ BOOL InitPointer(PPDEV ppdev)
|
|||
|
||||
|
||||
VOID STDCALL
|
||||
DrvMovePointer(IN PSURFOBJ pso,
|
||||
DrvMovePointer(IN SURFOBJ *pso,
|
||||
IN LONG x,
|
||||
IN LONG y,
|
||||
IN PRECTL prcl)
|
||||
IN RECTL *prcl)
|
||||
{
|
||||
PPDEV ppdev = (PPDEV)pso->dhpdev;
|
||||
|
||||
|
@ -60,15 +60,15 @@ DrvMovePointer(IN PSURFOBJ pso,
|
|||
|
||||
|
||||
ULONG STDCALL
|
||||
DrvSetPointerShape(PSURFOBJ pso,
|
||||
PSURFOBJ psoMask,
|
||||
PSURFOBJ psoColor,
|
||||
PXLATEOBJ pxlo,
|
||||
DrvSetPointerShape(SURFOBJ *pso,
|
||||
SURFOBJ *psoMask,
|
||||
SURFOBJ *psoColor,
|
||||
XLATEOBJ *pxlo,
|
||||
LONG xHot,
|
||||
LONG yHot,
|
||||
LONG x,
|
||||
LONG y,
|
||||
PRECTL prcl,
|
||||
RECTL *prcl,
|
||||
ULONG fl)
|
||||
{
|
||||
PPDEV ppdev = (PPDEV)pso->dhpdev;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ntddk.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include "../vgaddi.h"
|
||||
|
@ -7,12 +7,12 @@
|
|||
#include "bitblt.h"
|
||||
|
||||
BOOL STDCALL
|
||||
DrvTransparentBlt(PSURFOBJ Dest,
|
||||
PSURFOBJ Source,
|
||||
PCLIPOBJ Clip,
|
||||
PXLATEOBJ ColorTranslation,
|
||||
PRECTL DestRect,
|
||||
PRECTL SourceRect,
|
||||
DrvTransparentBlt(SURFOBJ *Dest,
|
||||
SURFOBJ *Source,
|
||||
CLIPOBJ *Clip,
|
||||
XLATEOBJ *ColorTranslation,
|
||||
RECTL *DestRect,
|
||||
RECTL *SourceRect,
|
||||
ULONG TransparentColor,
|
||||
ULONG Reserved)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <ddk/winddi.h>
|
||||
#include <ddk/ntddvid.h>
|
||||
#include <ddk/ntddvdeo.h>
|
||||
|
||||
HANDLE GdiHeap;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "../../../../include/defines.h"
|
||||
#include "../../../../include/reactos/resource.h"
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddvid.h>
|
||||
#include <ddk/ntddvdeo.h>
|
||||
#include <ddk/winddi.h>
|
||||
#include <ntos/minmax.h>
|
||||
#include "vgavideo.h"
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
#define VGA_OR 16
|
||||
#define VGA_XOR 24
|
||||
|
||||
//This is in mingw standard headers
|
||||
//typedef struct { int quot, rem; } div_t;
|
||||
typedef struct { int quot, rem; } div_t;
|
||||
|
||||
int maskbit[640], y80[480], xconv[640], bit8[640], startmasks[8], endmasks[8];
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include <ntddk.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ntos/ntddvid.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <debug.h>
|
||||
#include "vgavideo.h"
|
||||
|
||||
|
@ -68,7 +71,7 @@ void InitVGAMode()
|
|||
{
|
||||
int i;
|
||||
VIDEO_X86_BIOS_ARGUMENTS vxba;
|
||||
VP_STATUS vps;
|
||||
NTSTATUS vps;
|
||||
|
||||
// FIXME: Use Vidport to map the memory properly
|
||||
vidmem = (char *)(0xd0000000 + 0xa0000);
|
||||
|
@ -102,7 +105,7 @@ VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
|
|||
UNICODE_STRING Name = UNICODE_STRING_INITIALIZER(L"\\TextConsoleRefreshEvent");
|
||||
NTSTATUS Status;
|
||||
VIDEO_X86_BIOS_ARGUMENTS vxba;
|
||||
VP_STATUS vps;
|
||||
NTSTATUS vps;
|
||||
ULONG ThreadRelease = 1;
|
||||
|
||||
CHECKPOINT;
|
||||
|
@ -123,6 +126,3 @@ VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
|
|||
ZwClose( Event );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddvid.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ddk/ntddvdeo.h>
|
||||
#include <ntos/ntddvid.h>
|
||||
|
||||
#define UNIMPLEMENTED do {DbgPrint("%s:%d: Function not implemented", __FILE__, __LINE__); for(;;);} while (0)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "../../../../include/defines.h"
|
||||
#include "../../../../include/reactos/resource.h"
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddvid.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ntos/ntddvid.h>
|
||||
#include <ddk/ntddvdeo.h>
|
||||
|
||||
#define VGA_NORMAL 0
|
||||
#define VGA_AND 8
|
||||
#define VGA_OR 16
|
||||
#define VGA_XOR 24
|
||||
|
||||
//This is in mingw standard headers
|
||||
//typedef struct { int quot, rem; } div_t;
|
||||
|
||||
int maskbit[640], y80[480], xconv[640], bit8[640], startmasks[8], endmasks[8];
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* $Id: vidport.c,v 1.23 2002/06/14 14:22:22 ekohl Exp $
|
||||
/* $Id: vidport.c,v 1.24 2002/09/07 15:12:00 chorns Exp $
|
||||
*
|
||||
* VideoPort driver
|
||||
* Written by Rex Jolliff
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddvid.h>
|
||||
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ntos/ntddvid.h>
|
||||
#include "../../../ntoskrnl/include/internal/v86m.h"
|
||||
|
||||
#include "vidport.h"
|
||||
|
@ -792,7 +792,7 @@ VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
|||
vrp->OutputBufferLength = IrpStack->Parameters.DeviceIoControl.OutputBufferLength;
|
||||
|
||||
// Call the Miniport Driver with the VRP
|
||||
DeviceObject->DriverObject->DriverStartIo(DeviceObject->DeviceExtension, (PIRP)vrp);
|
||||
((PDRIVER_STARTIO)DeviceObject->DriverObject->DriverStartIo)(DeviceObject->DeviceExtension, (PIRP)vrp);
|
||||
|
||||
// Translate the VRP back into the IRP for OutputBuffer
|
||||
Irp->UserBuffer = vrp->OutputBuffer;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#ifndef CDFS_H
|
||||
#define CDFS_H
|
||||
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ddk/ntifs.h>
|
||||
|
||||
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||
|
||||
#define CDFS_BASIC_SECTOR 2048
|
||||
#define CDFS_PRIMARY_DESCRIPTOR_LOCATION 16
|
||||
#define BLOCKSIZE CDFS_BASIC_SECTOR
|
||||
|
@ -202,7 +206,9 @@ typedef struct _CCB
|
|||
ULONG LastOffset;
|
||||
} CCB, *PCCB;
|
||||
|
||||
#ifndef TAG
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#endif
|
||||
|
||||
#define TAG_CCB TAG('I', 'C', 'C', 'B')
|
||||
|
||||
|
@ -344,7 +350,7 @@ CdfsSwapString(PWCHAR Out,
|
|||
|
||||
VOID
|
||||
CdfsDateTimeToFileTime(PFCB Fcb,
|
||||
TIME *FileTime);
|
||||
LARGE_INTEGER *FileTime);
|
||||
|
||||
VOID
|
||||
CdfsFileFlagsToAttributes(PFCB Fcb,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: create.c,v 1.4 2002/05/15 09:39:54 ekohl Exp $
|
||||
/* $Id: create.c,v 1.5 2002/09/07 15:12:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -243,4 +243,4 @@ ByeBye:
|
|||
return(Status);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dirctl.c,v 1.7 2002/06/06 19:01:04 ekohl Exp $
|
||||
/* $Id: dirctl.c,v 1.8 2002/09/07 15:12:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -518,14 +518,14 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
|||
PCCB Ccb;
|
||||
FCB TempFcb;
|
||||
BOOLEAN First = FALSE;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
DPRINT("CdfsQueryDirectory() called\n");
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = Stack->FileObject;
|
||||
|
||||
Ccb = (PCCB)FileObject->FsContext2;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fcb.c,v 1.7 2002/06/06 19:01:04 ekohl Exp $
|
||||
/* $Id: fcb.c,v 1.8 2002/09/07 15:12:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -38,7 +38,10 @@
|
|||
|
||||
/* MACROS *******************************************************************/
|
||||
|
||||
#ifndef TAG
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#endif
|
||||
|
||||
#define TAG_FCB TAG('I', 'F', 'C', 'B')
|
||||
|
||||
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||
|
@ -237,7 +240,7 @@ CdfsFCBInitializeCache(PVCB Vcb,
|
|||
|
||||
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
|
||||
FO_DIRECT_CACHE_PAGING_READ;
|
||||
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
FileObject->FsContext = (PVOID) &Fcb->RFCB;
|
||||
FileObject->FsContext2 = newCCB;
|
||||
newCCB->Fcb = Fcb;
|
||||
|
@ -247,7 +250,7 @@ CdfsFCBInitializeCache(PVCB Vcb,
|
|||
|
||||
Status = CcRosInitializeFileCache(FileObject,
|
||||
&Fcb->RFCB.Bcb,
|
||||
PAGESIZE);
|
||||
PAGE_SIZE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("CcRosInitializeFileCache failed\n");
|
||||
|
@ -414,7 +417,7 @@ CdfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
|
|||
|
||||
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
|
||||
FO_DIRECT_CACHE_PAGING_READ;
|
||||
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
FileObject->FsContext = (PVOID)&Fcb->RFCB;
|
||||
FileObject->FsContext2 = newCCB;
|
||||
newCCB->Fcb = Fcb;
|
||||
|
@ -425,7 +428,7 @@ CdfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
|
|||
{
|
||||
Status = CcRosInitializeFileCache(FileObject,
|
||||
&Fcb->RFCB.Bcb,
|
||||
PAGESIZE);
|
||||
PAGE_SIZE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("CcRosInitializeFileCache failed\n");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fsctl.c,v 1.7 2002/05/23 09:52:00 ekohl Exp $
|
||||
/* $Id: fsctl.c,v 1.8 2002/09/07 15:12:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -70,7 +70,7 @@ CdfsGetPVDData(PUCHAR Buffer,
|
|||
/* Extract the volume label */
|
||||
pc = Pvd->VolumeId;
|
||||
pw = Vpb->VolumeLabel;
|
||||
for (i = 0; i < MAXIMUM_VOLUME_LABEL_LENGTH && *pc != ' '; i++)
|
||||
for (i = 0; i < (MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)) && *pc != ' '; i++)
|
||||
{
|
||||
*pw++ = (WCHAR)*pc++;
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
|||
DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
|
||||
DeviceExt->StreamFileObject->FsContext = (PVOID)&Fcb->RFCB;
|
||||
DeviceExt->StreamFileObject->FsContext2 = Ccb;
|
||||
DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
DeviceExt->StreamFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
|
||||
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
|
||||
Ccb->Fcb = Fcb;
|
||||
|
@ -346,7 +346,7 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
Status = CcRosInitializeFileCache(DeviceExt->StreamFileObject,
|
||||
&Fcb->RFCB.Bcb,
|
||||
PAGESIZE);
|
||||
PAGE_SIZE);
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
DbgPrint("CcRosInitializeFileCache failed\n");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: misc.c,v 1.2 2002/05/09 15:53:02 ekohl Exp $
|
||||
/* $Id: misc.c,v 1.3 2002/09/07 15:12:01 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -103,7 +103,7 @@ CdfsSwapString(PWCHAR Out,
|
|||
|
||||
VOID
|
||||
CdfsDateTimeToFileTime(PFCB Fcb,
|
||||
TIME *FileTime)
|
||||
LARGE_INTEGER *FileTime)
|
||||
{
|
||||
TIME_FIELDS TimeFields;
|
||||
|
||||
|
@ -134,4 +134,4 @@ CdfsFileFlagsToAttributes(PFCB Fcb,
|
|||
(Fcb->Entry.FileFlags & 0x10) ? FILE_ATTRIBUTE_READONLY : 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: cdfs.c,v 1.5 2002/08/20 20:37:06 hyperion Exp $
|
||||
/* $Id: cdfs.c,v 1.6 2002/09/07 15:12:01 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -28,6 +28,9 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
#include <ddk/ntdddisk.h>
|
||||
#include <ddk/ntddcdrm.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -119,7 +122,7 @@ FsRecCdfsFsControl(IN PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
case IRP_MN_LOAD_FILE_SYSTEM:
|
||||
DPRINT("Cdfs: IRP_MN_LOAD_FILE_SYSTEM\n");
|
||||
RtlInitUnicodeStringFromLiteral(&RegistryPath,
|
||||
RtlInitUnicodeString(&RegistryPath,
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Cdfs");
|
||||
Status = ZwLoadDriver(&RegistryPath);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fat.c,v 1.4 2002/08/20 20:37:06 hyperion Exp $
|
||||
/* $Id: fat.c,v 1.5 2002/09/07 15:12:01 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -28,6 +28,8 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
#include <ddk/ntdddisk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -117,7 +119,7 @@ FsRecVfatFsControl(IN PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
case IRP_MN_LOAD_FILE_SYSTEM:
|
||||
DPRINT("FAT: IRP_MN_LOAD_FILE_SYSTEM\n");
|
||||
RtlInitUnicodeStringFromLiteral(&RegistryPath,
|
||||
RtlInitUnicodeString(&RegistryPath,
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Vfatfs");
|
||||
Status = ZwLoadDriver(&RegistryPath);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fs_rec.c,v 1.2 2002/05/15 18:02:59 ekohl Exp $
|
||||
/* $Id: fs_rec.c,v 1.3 2002/09/07 15:12:01 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -28,6 +28,7 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -150,7 +151,7 @@ FsRecRegisterFs(PDRIVER_OBJECT DriverObject,
|
|||
NULL,
|
||||
0,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
OPEN_EXISTING,
|
||||
FILE_OPEN_IF,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
|
@ -204,7 +205,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
|||
|
||||
ConfigInfo = IoGetConfigurationInformation();
|
||||
|
||||
if (ConfigInfo->CDRomCount > 0)
|
||||
if (ConfigInfo->CdRomCount > 0)
|
||||
{
|
||||
Status = FsRecRegisterFs(DriverObject,
|
||||
L"\\Cdfs",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: ntfs.c,v 1.4 2002/06/12 23:35:55 ekohl Exp $
|
||||
/* $Id: ntfs.c,v 1.5 2002/09/07 15:12:01 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -28,6 +28,8 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
#include <ddk/ntdddisk.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.2 2001/06/12 12:33:42 ekohl Exp $
|
||||
/* $Id: create.c,v 1.3 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "msfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: finfo.c,v 1.3 2001/06/26 12:46:57 ekohl Exp $
|
||||
/* $Id: finfo.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "msfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
@ -31,19 +30,19 @@ MsfsQueryMailslotInformation(PMSFS_FCB Fcb,
|
|||
|
||||
Mailslot = Fcb->Mailslot;
|
||||
|
||||
Buffer->MaxMessageSize = Mailslot->MaxMessageSize;
|
||||
Buffer->Timeout = Mailslot->TimeOut;
|
||||
Buffer->MaximumMessageSize = Mailslot->MaxMessageSize;
|
||||
Buffer->ReadTimeout = Mailslot->TimeOut;
|
||||
|
||||
KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql);
|
||||
Buffer->MessageCount = Mailslot->MessageCount;
|
||||
Buffer->MessagesAvailable = Mailslot->MessageCount;
|
||||
if (Mailslot->MessageCount == 0)
|
||||
{
|
||||
Buffer->NextSize = 0;
|
||||
Buffer->NextMessageSize = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: read size of first message (head) */
|
||||
Buffer->NextSize = 0;
|
||||
Buffer->NextMessageSize = 0;
|
||||
}
|
||||
KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql);
|
||||
|
||||
|
@ -61,7 +60,7 @@ MsfsSetMailslotInformation(PMSFS_FCB Fcb,
|
|||
if (*BufferLength < sizeof(FILE_MAILSLOT_SET_INFORMATION))
|
||||
return(STATUS_BUFFER_OVERFLOW);
|
||||
|
||||
Fcb->Mailslot->TimeOut = Buffer->Timeout;
|
||||
Fcb->Mailslot->TimeOut = Buffer->ReadTimeout;
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: fsctrl.c,v 1.1 2001/05/05 15:11:57 ekohl Exp $
|
||||
/* $Id: fsctrl.c,v 1.2 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,10 +9,9 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "msfs.h"
|
||||
|
||||
//#define NDEBUG
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
|
@ -22,7 +21,7 @@ NTSTATUS STDCALL
|
|||
MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
PFILE_OBJECT FileObject;
|
||||
PMSFS_MAILSLOT Mailslot;
|
||||
PMSFS_FCB Fcb;
|
||||
|
@ -30,14 +29,14 @@ MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
DPRINT1("MsfsFileSystemControl(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
|
||||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = IoStack->FileObject;
|
||||
Fcb = FileObject->FsContext;
|
||||
Mailslot = Fcb->Mailslot;
|
||||
|
||||
DPRINT1("Mailslot name: %wZ\n", &Mailslot->Name);
|
||||
|
||||
switch (IoStack->Parameters.FileSystemControl.IoControlCode)
|
||||
switch (IoStack->Parameters.FileSystemControl.FsControlCode)
|
||||
{
|
||||
#if 0
|
||||
case FSCTL_WAIT_PIPE:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: msfs.c,v 1.3 2002/07/17 22:56:10 dwelch Exp $
|
||||
/* $Id: msfs.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "msfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef __SERVICES_FS_MS_MSFS_H
|
||||
#define __SERVICES_FS_MS_MSFS_H
|
||||
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
|
||||
typedef struct _MSFS_DEVICE_EXTENSION
|
||||
{
|
||||
LIST_ENTRY MailslotListHead;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rw.c,v 1.2 2001/06/12 12:33:42 ekohl Exp $
|
||||
/* $Id: rw.c,v 1.3 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,8 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos/minmax.h>
|
||||
#include "msfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.12 2002/05/07 22:40:35 hbirr Exp $
|
||||
/* $Id: create.c,v 1.13 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,8 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include "npfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: finfo.c,v 1.3 2001/11/20 20:34:29 ekohl Exp $
|
||||
/* $Id: finfo.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "npfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: fsctrl.c,v 1.8 2001/11/20 20:34:29 ekohl Exp $
|
||||
/* $Id: fsctrl.c,v 1.9 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -10,7 +10,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "npfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
@ -395,7 +394,7 @@ NTSTATUS STDCALL
|
|||
NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status;
|
||||
PNPFS_DEVICE_EXTENSION DeviceExt;
|
||||
|
@ -405,7 +404,7 @@ NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
|||
DPRINT("NpfsFileSystemContol(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
|
||||
|
||||
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
|
||||
DPRINT("IoStack: %p\n", IoStack);
|
||||
FileObject = IoStack->FileObject;
|
||||
DPRINT("FileObject: %p\n", FileObject);
|
||||
|
@ -415,7 +414,7 @@ NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
|||
DPRINT("Pipe: %p\n", Pipe);
|
||||
DPRINT("PipeName: %wZ\n", &Pipe->PipeName);
|
||||
|
||||
switch (IoStack->Parameters.FileSystemControl.IoControlCode)
|
||||
switch (IoStack->Parameters.FileSystemControl.FsControlCode)
|
||||
{
|
||||
case FSCTL_PIPE_ASSIGN_EVENT:
|
||||
DPRINT("Assign event\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: npfs.c,v 1.3 2001/11/20 20:34:29 ekohl Exp $
|
||||
/* $Id: npfs.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "npfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
/* $Id: npfs.h,v 1.11 2002/05/07 22:41:22 hbirr Exp $ */
|
||||
/* $Id: npfs.h,v 1.12 2002/09/07 15:12:02 chorns Exp $ */
|
||||
|
||||
#ifndef __SERVICES_FS_NP_NPFS_H
|
||||
#define __SERVICES_FS_NP_NPFS_H
|
||||
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rw.c,v 1.6 2002/05/07 22:41:22 hbirr Exp $
|
||||
/* $Id: rw.c,v 1.7 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include "npfs.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: volume.c,v 1.2 2001/06/26 12:47:26 ekohl Exp $
|
||||
/* $Id: volume.c,v 1.3 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dirctl.c,v 1.1 2002/06/25 22:23:05 ekohl Exp $
|
||||
/* $Id: dirctl.c,v 1.2 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -494,14 +494,14 @@ NtfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
|||
PCCB Ccb;
|
||||
FCB TempFcb;
|
||||
BOOLEAN First = FALSE;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
DPRINT1("NtfsQueryDirectory() called\n");
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = Stack->FileObject;
|
||||
|
||||
Ccb = (PCCB)FileObject->FsContext2;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fcb.c,v 1.1 2002/06/25 22:23:05 ekohl Exp $
|
||||
/* $Id: fcb.c,v 1.2 2002/09/07 15:12:02 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -235,7 +235,7 @@ NtfsFCBInitializeCache(PVCB Vcb,
|
|||
|
||||
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
|
||||
FO_DIRECT_CACHE_PAGING_READ;
|
||||
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
FileObject->FsContext = (PVOID) &Fcb->RFCB;
|
||||
FileObject->FsContext2 = newCCB;
|
||||
newCCB->Fcb = Fcb;
|
||||
|
@ -273,9 +273,9 @@ NtfsMakeRootFCB(PDEVICE_EXTENSION Vcb)
|
|||
// Fcb->Entry.FileFlags = 0x02; // FILE_ATTRIBUTE_DIRECTORY;
|
||||
Fcb->RefCount = 1;
|
||||
Fcb->DirIndex = 0;
|
||||
Fcb->RFCB.FileSize.QuadPart = PAGESIZE;//Vcb->CdInfo.RootSize;
|
||||
Fcb->RFCB.ValidDataLength.QuadPart = PAGESIZE;//Vcb->CdInfo.RootSize;
|
||||
Fcb->RFCB.AllocationSize.QuadPart = PAGESIZE;//Vcb->CdInfo.RootSize;
|
||||
Fcb->RFCB.FileSize.QuadPart = PAGE_SIZE;//Vcb->CdInfo.RootSize;
|
||||
Fcb->RFCB.ValidDataLength.QuadPart = PAGE_SIZE;//Vcb->CdInfo.RootSize;
|
||||
Fcb->RFCB.AllocationSize.QuadPart = PAGE_SIZE;//Vcb->CdInfo.RootSize;
|
||||
|
||||
NtfsFCBInitializeCache(Vcb, Fcb);
|
||||
NtfsAddFCBToTable(Vcb, Fcb);
|
||||
|
@ -408,7 +408,7 @@ NtfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
|
|||
|
||||
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
|
||||
FO_DIRECT_CACHE_PAGING_READ;
|
||||
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
FileObject->FsContext = (PVOID)&Fcb->RFCB;
|
||||
FileObject->FsContext2 = newCCB;
|
||||
newCCB->Fcb = Fcb;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fsctl.c,v 1.2 2002/07/15 15:37:33 ekohl Exp $
|
||||
/* $Id: fsctl.c,v 1.3 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -277,7 +277,7 @@ NtfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
|||
DeviceExt->StreamFileObject->Flags = DeviceExt->StreamFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
|
||||
DeviceExt->StreamFileObject->FsContext = (PVOID)&Fcb->RFCB;
|
||||
DeviceExt->StreamFileObject->FsContext2 = Ccb;
|
||||
DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
DeviceExt->StreamFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
|
||||
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
|
||||
Ccb->Fcb = Fcb;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#ifndef NTFS_H
|
||||
#define NTFS_H
|
||||
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ddk/ntifs.h>
|
||||
|
||||
|
||||
#define CACHEPAGESIZE(pDeviceExt) \
|
||||
((pDeviceExt)->NtfsInfo.BytesPerCluster > PAGESIZE ? \
|
||||
(pDeviceExt)->NtfsInfo.BytesPerCluster : PAGESIZE)
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
((pDeviceExt)->NtfsInfo.BytesPerCluster > PAGE_SIZE ? \
|
||||
(pDeviceExt)->NtfsInfo.BytesPerCluster : PAGE_SIZE)
|
||||
|
||||
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||
|
||||
|
@ -118,8 +118,6 @@ typedef struct _CCB
|
|||
ULONG LastOffset;
|
||||
} CCB, *PCCB;
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
|
||||
#define TAG_CCB TAG('I', 'C', 'C', 'B')
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: create.c,v 1.44 2002/08/17 15:15:50 hbirr Exp $
|
||||
/* $Id: create.c,v 1.45 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: services/fs/vfat/create.c
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
#define ENTRIES_PER_PAGE (PAGESIZE / sizeof (FATDirEntry))
|
||||
#define ENTRIES_PER_PAGE (PAGE_SIZE / sizeof (FATDirEntry))
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
@ -175,7 +175,7 @@ GetEntryName(PVOID *pContext,
|
|||
Offset = 0;
|
||||
CcUnpinData(*pContext);
|
||||
FileOffset.QuadPart = *pIndex * sizeof(FATDirEntry);
|
||||
if(!CcMapData(FileObject, &FileOffset, PAGESIZE, TRUE, pContext, Block))
|
||||
if(!CcMapData(FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, Block))
|
||||
{
|
||||
*pContext = NULL;
|
||||
return STATUS_NO_MORE_ENTRIES;
|
||||
|
@ -204,7 +204,7 @@ GetEntryName(PVOID *pContext,
|
|||
Offset = 0;
|
||||
CcUnpinData(*pContext);
|
||||
FileOffset.QuadPart = *pIndex * sizeof(FATDirEntry);
|
||||
if(!CcMapData(FileObject, &FileOffset, PAGESIZE, TRUE, pContext, Block))
|
||||
if(!CcMapData(FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, Block))
|
||||
{
|
||||
*pContext = NULL;
|
||||
return STATUS_NO_MORE_ENTRIES;
|
||||
|
@ -263,7 +263,7 @@ ReadVolumeLabel (PDEVICE_EXTENSION DeviceExt, PVPB Vpb)
|
|||
}
|
||||
FileOffset.u.HighPart = 0;
|
||||
FileOffset.u.LowPart = (DirIndex - Offset) * sizeof(FATDirEntry);
|
||||
if (!CcMapData(pFcb->FileObject, &FileOffset, PAGESIZE, TRUE, &Context, (PVOID*)&Entry))
|
||||
if (!CcMapData(pFcb->FileObject, &FileOffset, PAGE_SIZE, TRUE, &Context, (PVOID*)&Entry))
|
||||
{
|
||||
Context = NULL;
|
||||
break;
|
||||
|
@ -400,7 +400,7 @@ FindFile (PDEVICE_EXTENSION DeviceExt,
|
|||
CcUnpinData(Context);
|
||||
}
|
||||
FileOffset.QuadPart = (DirIndex - Offset) * sizeof(FATDirEntry);
|
||||
if (!CcMapData(Parent->FileObject, &FileOffset, PAGESIZE, TRUE,
|
||||
if (!CcMapData(Parent->FileObject, &FileOffset, PAGE_SIZE, TRUE,
|
||||
&Context, (PVOID*)&block))
|
||||
{
|
||||
Context = NULL;
|
||||
|
@ -699,7 +699,7 @@ VfatCreateFile (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
}
|
||||
memset(pCcb, 0, sizeof(VFATCCB));
|
||||
FileObject->Flags |= FO_FCB_IS_VALID;
|
||||
FileObject->SectionObjectPointers = &pFcb->SectionObjectPointers;
|
||||
FileObject->SectionObjectPointer = &pFcb->SectionObjectPointers;
|
||||
FileObject->FsContext = (PVOID) &pFcb->RFCB;
|
||||
FileObject->FsContext2 = pCcb;
|
||||
pCcb->pFcb = pFcb;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: dir.c,v 1.24 2002/03/18 22:37:12 hbirr Exp $
|
||||
* $Id: dir.c,v 1.25 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
|
||||
// function like DosDateTimeToFileTime
|
||||
BOOL FsdDosDateTimeToFileTime (WORD wDosDate, WORD wDosTime, TIME * FileTime)
|
||||
BOOL FsdDosDateTimeToFileTime (WORD wDosDate, WORD wDosTime, LARGE_INTEGER * FileTime)
|
||||
{
|
||||
PDOSTIME pdtime = (PDOSTIME) & wDosTime;
|
||||
PDOSDATE pddate = (PDOSDATE) & wDosDate;
|
||||
|
@ -46,7 +46,7 @@ BOOL FsdDosDateTimeToFileTime (WORD wDosDate, WORD wDosTime, TIME * FileTime)
|
|||
|
||||
// function like FileTimeToDosDateTime
|
||||
BOOL
|
||||
FsdFileTimeToDosDateTime (TIME * FileTime, WORD * pwDosDate, WORD * pwDosTime)
|
||||
FsdFileTimeToDosDateTime (LARGE_INTEGER * FileTime, WORD * pwDosDate, WORD * pwDosTime)
|
||||
{
|
||||
PDOSTIME pdtime = (PDOSTIME) pwDosTime;
|
||||
PDOSDATE pddate = (PDOSDATE) pwDosDate;
|
||||
|
@ -235,9 +235,11 @@ NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
|
|||
VFATFCB tmpFcb;
|
||||
PVFATCCB pCcb;
|
||||
BOOLEAN First = FALSE;
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
|
||||
pCcb = (PVFATCCB) IrpContext->FileObject->FsContext2;
|
||||
pFcb = pCcb->pFcb;
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION)IrpContext->Stack;
|
||||
|
||||
if (!ExAcquireResourceSharedLite(&pFcb->MainResource, IrpContext->Flags & IRPCONTEXT_CANWAIT))
|
||||
{
|
||||
|
@ -245,11 +247,11 @@ NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
|
|||
}
|
||||
|
||||
// Obtain the callers parameters
|
||||
BufferLength = IrpContext->Stack->Parameters.QueryDirectory.Length;
|
||||
pSearchPattern = IrpContext->Stack->Parameters.QueryDirectory.FileName;
|
||||
BufferLength = IoStack->Parameters.QueryDirectory.Length;
|
||||
pSearchPattern = IoStack->Parameters.QueryDirectory.FileName;
|
||||
FileInformationClass =
|
||||
IrpContext->Stack->Parameters.QueryDirectory.FileInformationClass;
|
||||
FileIndex = IrpContext->Stack->Parameters.QueryDirectory.FileIndex;
|
||||
IoStack->Parameters.QueryDirectory.FileInformationClass;
|
||||
FileIndex = IoStack->Parameters.QueryDirectory.FileIndex;
|
||||
if (pSearchPattern)
|
||||
{
|
||||
if (!pCcb->DirectorySearchPattern)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: direntry.c,v 1.6 2002/03/18 22:37:12 hbirr Exp $
|
||||
/* $Id: direntry.c,v 1.7 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
*
|
||||
* FILE: DirEntry.c
|
||||
|
@ -20,8 +20,8 @@
|
|||
|
||||
#include "vfat.h"
|
||||
|
||||
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGESIZE ? \
|
||||
(pDeviceExt)->FatInfo.BytesPerCluster : PAGESIZE)
|
||||
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGE_SIZE ? \
|
||||
(pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
|
||||
|
||||
#define ENTRIES_PER_CACHEPAGE(pDeviceExt) (ENTRIES_PER_SECTOR * \
|
||||
(CACHEPAGESIZE(pDeviceExt) / ((pDeviceExt)->FatInfo.BytesPerSector)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dirwr.c,v 1.28 2002/08/17 15:15:50 hbirr Exp $
|
||||
/* $Id: dirwr.c,v 1.29 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -427,7 +427,7 @@ VfatAddEntry (PDEVICE_EXTENSION DeviceExt,
|
|||
/* set dates and times */
|
||||
KeQuerySystemTime (&SystemTime);
|
||||
ExSystemTimeToLocalTime (&SystemTime, &LocalTime);
|
||||
FsdFileTimeToDosDateTime ((TIME *) & LocalTime, &pEntry->CreationDate,
|
||||
FsdFileTimeToDosDateTime ((LARGE_INTEGER *) & LocalTime, &pEntry->CreationDate,
|
||||
&pEntry->CreationTime);
|
||||
pEntry->UpdateDate = pEntry->CreationDate;
|
||||
pEntry->UpdateTime = pEntry->CreationTime;
|
||||
|
@ -612,23 +612,23 @@ delEntry (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT pFileObject)
|
|||
Offset.u.HighPart = 0;
|
||||
for (i = startEntry; i <= Entry; i++)
|
||||
{
|
||||
if (Context == NULL || ((i * sizeof(FATDirEntry)) % PAGESIZE) == 0)
|
||||
if (Context == NULL || ((i * sizeof(FATDirEntry)) % PAGE_SIZE) == 0)
|
||||
{
|
||||
if (Context)
|
||||
{
|
||||
CcSetDirtyPinnedData(Context, NULL);
|
||||
CcUnpinData(Context);
|
||||
}
|
||||
Offset.u.LowPart = (i * sizeof(FATDirEntry) / PAGESIZE) * PAGESIZE;
|
||||
CcMapData (pDirFcb->FileObject, &Offset, PAGESIZE, TRUE,
|
||||
Offset.u.LowPart = (i * sizeof(FATDirEntry) / PAGE_SIZE) * PAGE_SIZE;
|
||||
CcMapData (pDirFcb->FileObject, &Offset, PAGE_SIZE, TRUE,
|
||||
&Context, (PVOID*)&pDirEntry);
|
||||
}
|
||||
pDirEntry[i % (PAGESIZE / sizeof(FATDirEntry))].Filename[0] = 0xe5;
|
||||
pDirEntry[i % (PAGE_SIZE / sizeof(FATDirEntry))].Filename[0] = 0xe5;
|
||||
if (i == Entry)
|
||||
{
|
||||
CurrentCluster =
|
||||
vfatDirEntryGetFirstCluster (DeviceExt,
|
||||
&pDirEntry[i % (PAGESIZE / sizeof(FATDirEntry))]);
|
||||
&pDirEntry[i % (PAGE_SIZE / sizeof(FATDirEntry))]);
|
||||
}
|
||||
}
|
||||
if (Context)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: fat.c,v 1.37 2002/06/26 18:36:41 hbirr Exp $
|
||||
* $Id: fat.c,v 1.38 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -24,8 +24,8 @@
|
|||
|
||||
#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
|
||||
|
||||
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGESIZE ? \
|
||||
(pDeviceExt)->FatInfo.BytesPerCluster : PAGESIZE)
|
||||
#define CACHEPAGE_SIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGE_SIZE ? \
|
||||
(pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
@ -45,7 +45,7 @@ Fat32GetNextCluster(PDEVICE_EXTENSION DeviceExt,
|
|||
PVOID Context;
|
||||
LARGE_INTEGER Offset;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FATOffset = CurrentCluster * sizeof(ULONG);
|
||||
Offset.QuadPart = ROUND_DOWN(FATOffset, ChunkSize);
|
||||
if(!CcMapData(DeviceExt->FATFileObject, &Offset, ChunkSize, 1, &Context, &BaseAddress))
|
||||
|
@ -75,7 +75,7 @@ Fat16GetNextCluster(PDEVICE_EXTENSION DeviceExt,
|
|||
PVOID Context;
|
||||
LARGE_INTEGER Offset;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FATOffset = CurrentCluster * 2;
|
||||
Offset.QuadPart = ROUND_DOWN(FATOffset, ChunkSize);
|
||||
if(!CcMapData(DeviceExt->FATFileObject, &Offset, ChunkSize, 1, &Context, &BaseAddress))
|
||||
|
@ -150,7 +150,7 @@ FAT16FindAvailableCluster(PDEVICE_EXTENSION DeviceExt,
|
|||
LARGE_INTEGER Offset;
|
||||
PUSHORT Block;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FatLength = (DeviceExt->FatInfo.NumberOfClusters +2 ) * 2;
|
||||
*Cluster = 0;
|
||||
StartCluster = DeviceExt->LastAvailableCluster;
|
||||
|
@ -266,7 +266,7 @@ FAT32FindAvailableCluster (PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
|||
LARGE_INTEGER Offset;
|
||||
PULONG Block;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FatLength = (DeviceExt->FatInfo.NumberOfClusters + 2) * 4;
|
||||
*Cluster = 0;
|
||||
StartCluster = DeviceExt->LastAvailableCluster;
|
||||
|
@ -374,7 +374,7 @@ FAT16CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
|
|||
LARGE_INTEGER Offset;
|
||||
ULONG FatLength;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FatLength = (DeviceExt->FatInfo.NumberOfClusters + 2) * 2;
|
||||
|
||||
for (i = 4; i< FatLength; i += 2, Block++)
|
||||
|
@ -421,7 +421,7 @@ FAT32CountAvailableClusters(PDEVICE_EXTENSION DeviceExt)
|
|||
LARGE_INTEGER Offset;
|
||||
ULONG FatLength;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FatLength = (DeviceExt->FatInfo.NumberOfClusters + 2) * 4;
|
||||
|
||||
for (i = 8; i< FatLength; i += 4, Block++)
|
||||
|
@ -542,7 +542,7 @@ FAT16WriteCluster(PDEVICE_EXTENSION DeviceExt,
|
|||
LARGE_INTEGER Offset;
|
||||
PUSHORT Cluster;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
FATOffset = ClusterToWrite * 2;
|
||||
Offset.QuadPart = ROUND_DOWN(FATOffset, ChunkSize);
|
||||
if(!CcMapData(DeviceExt->FATFileObject, &Offset, ChunkSize, 1, &Context, &BaseAddress))
|
||||
|
@ -577,7 +577,7 @@ FAT32WriteCluster(PDEVICE_EXTENSION DeviceExt,
|
|||
LARGE_INTEGER Offset;
|
||||
PULONG Cluster;
|
||||
|
||||
ChunkSize = CACHEPAGESIZE(DeviceExt);
|
||||
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
|
||||
|
||||
FATOffset = (ClusterToWrite * 4);
|
||||
Offset.QuadPart = ROUND_DOWN(FATOffset, ChunkSize);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: fcb.c,v 1.18 2002/08/17 15:15:50 hbirr Exp $
|
||||
/* $Id: fcb.c,v 1.19 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
*
|
||||
* FILE: fcb.c
|
||||
|
@ -21,8 +21,9 @@
|
|||
#include "vfat.h"
|
||||
|
||||
/* -------------------------------------------------------- DEFINES */
|
||||
|
||||
#ifndef TAG
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#endif
|
||||
#define TAG_FCB TAG('V', 'F', 'C', 'B')
|
||||
|
||||
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||
|
@ -178,7 +179,7 @@ vfatFCBInitializeCacheFromVolume (PVCB vcb, PVFATFCB fcb)
|
|||
|
||||
fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID |
|
||||
FO_DIRECT_CACHE_PAGING_READ;
|
||||
fileObject->SectionObjectPointers = &fcb->SectionObjectPointers;
|
||||
fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
|
||||
fileObject->FsContext = (PVOID) &fcb->RFCB;
|
||||
fileObject->FsContext2 = newCCB;
|
||||
newCCB->pFcb = fcb;
|
||||
|
@ -187,8 +188,8 @@ vfatFCBInitializeCacheFromVolume (PVCB vcb, PVFATFCB fcb)
|
|||
fcb->pDevExt = vcb;
|
||||
|
||||
|
||||
fileCacheQuantum = (vcb->FatInfo.BytesPerCluster >= PAGESIZE) ?
|
||||
vcb->FatInfo.BytesPerCluster : PAGESIZE;
|
||||
fileCacheQuantum = (vcb->FatInfo.BytesPerCluster >= PAGE_SIZE) ?
|
||||
vcb->FatInfo.BytesPerCluster : PAGE_SIZE;
|
||||
|
||||
status = CcRosInitializeFileCache (fileObject,
|
||||
&fcb->RFCB.Bcb,
|
||||
|
@ -351,12 +352,13 @@ vfatAttachFCBToFileObject (PDEVICE_EXTENSION vcb,
|
|||
|
||||
fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID |
|
||||
FO_DIRECT_CACHE_PAGING_READ;
|
||||
fileObject->SectionObjectPointers = &fcb->SectionObjectPointers;
|
||||
fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
|
||||
fileObject->FsContext = (PVOID) &fcb->RFCB;
|
||||
fileObject->FsContext2 = newCCB;
|
||||
newCCB->pFcb = fcb;
|
||||
newCCB->PtrFileObject = fileObject;
|
||||
fcb->pDevExt = vcb;
|
||||
|
||||
DPRINT ("file open: fcb:%x file size: %d\n", fcb, fcb->entry.FileSize);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: finfo.c,v 1.18 2002/08/17 15:46:36 hbirr Exp $
|
||||
/* $Id: finfo.c,v 1.19 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -463,7 +463,7 @@ VfatSetAllocationSizeInformation(PFILE_OBJECT FileObject,
|
|||
Fcb->RFCB.FileSize.QuadPart = NewSize;
|
||||
Fcb->RFCB.ValidDataLength.QuadPart = NewSize;
|
||||
|
||||
if (FileObject->SectionObjectPointers->SharedCacheMap != NULL)
|
||||
if (FileObject->SectionObjectPointer->SharedCacheMap != NULL)
|
||||
{
|
||||
CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: fsctl.c,v 1.8 2002/06/26 18:36:41 hbirr Exp $
|
||||
/* $Id: fsctl.c,v 1.9 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -27,17 +27,18 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntdddisk.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#include "vfat.h"
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGESIZE ? \
|
||||
(pDeviceExt)->FatInfo.BytesPerCluster : PAGESIZE)
|
||||
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGE_SIZE ? \
|
||||
(pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
|
||||
|
||||
|
||||
static NTSTATUS
|
||||
|
@ -181,14 +182,14 @@ VfatMountDevice(PDEVICE_EXTENSION DeviceExt,
|
|||
return(Status);
|
||||
}
|
||||
|
||||
if (DeviceExt->FatInfo.BytesPerCluster >= PAGESIZE &&
|
||||
(DeviceExt->FatInfo.BytesPerCluster % PAGESIZE) != 0)
|
||||
if (DeviceExt->FatInfo.BytesPerCluster >= PAGE_SIZE &&
|
||||
(DeviceExt->FatInfo.BytesPerCluster % PAGE_SIZE) != 0)
|
||||
{
|
||||
DbgPrint("(%s:%d) Invalid cluster size\n", __FILE__, __LINE__);
|
||||
KeBugCheck(0);
|
||||
}
|
||||
else if (DeviceExt->FatInfo.BytesPerCluster < PAGESIZE &&
|
||||
(PAGESIZE % DeviceExt->FatInfo.BytesPerCluster) != 0)
|
||||
else if (DeviceExt->FatInfo.BytesPerCluster < PAGE_SIZE &&
|
||||
(PAGE_SIZE % DeviceExt->FatInfo.BytesPerCluster) != 0)
|
||||
{
|
||||
DbgPrint("(%s:%d) Invalid cluster size2\n", __FILE__, __LINE__);
|
||||
KeBugCheck(0);
|
||||
|
@ -303,7 +304,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext)
|
|||
DeviceExt->FATFileObject->Flags = DeviceExt->FATFileObject->Flags | FO_FCB_IS_VALID | FO_DIRECT_CACHE_PAGING_READ;
|
||||
DeviceExt->FATFileObject->FsContext = (PVOID) &Fcb->RFCB;
|
||||
DeviceExt->FATFileObject->FsContext2 = Ccb;
|
||||
DeviceExt->FATFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
|
||||
DeviceExt->FATFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
|
||||
DeviceExt->FATFileObject->PrivateCacheMap = NULL;
|
||||
DeviceExt->FATFileObject->Vpb = DeviceObject->Vpb;
|
||||
Ccb->pFcb = Fcb;
|
||||
|
@ -323,7 +324,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext)
|
|||
}
|
||||
else
|
||||
{
|
||||
Status = CcRosInitializeFileCache(DeviceExt->FATFileObject, &Fcb->RFCB.Bcb, 2 * PAGESIZE);
|
||||
Status = CcRosInitializeFileCache(DeviceExt->FATFileObject, &Fcb->RFCB.Bcb, 2 * PAGE_SIZE);
|
||||
}
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
/* $Id: rw.c,v 1.46 2002/08/17 16:51:07 hbirr Exp $
|
||||
/* $Id: rw.c,v 1.47 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -696,9 +696,9 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
|||
{
|
||||
ULONG CacheSize;
|
||||
CacheSize = IrpContext->DeviceExt->FatInfo.BytesPerCluster;
|
||||
if (CacheSize < PAGESIZE)
|
||||
if (CacheSize < PAGE_SIZE)
|
||||
{
|
||||
CacheSize = PAGESIZE;
|
||||
CacheSize = PAGE_SIZE;
|
||||
}
|
||||
CcRosInitializeFileCache(IrpContext->FileObject, &Fcb->RFCB.Bcb, CacheSize);
|
||||
}
|
||||
|
@ -967,9 +967,9 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
|
|||
{
|
||||
ULONG CacheSize;
|
||||
CacheSize = IrpContext->DeviceExt->FatInfo.BytesPerCluster;
|
||||
if (CacheSize < PAGESIZE)
|
||||
if (CacheSize < PAGE_SIZE)
|
||||
{
|
||||
CacheSize = PAGESIZE;
|
||||
CacheSize = PAGE_SIZE;
|
||||
}
|
||||
CcRosInitializeFileCache(IrpContext->FileObject, &Fcb->RFCB.Bcb, CacheSize);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* $Id: vfat.h,v 1.45 2002/08/17 15:15:50 hbirr Exp $ */
|
||||
/* $Id: vfat.h,v 1.46 2002/09/07 15:12:03 chorns Exp $ */
|
||||
|
||||
#include <ddk/ntifs.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
|
||||
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||
#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
|
||||
|
@ -197,7 +198,9 @@ typedef struct _VFATCCB
|
|||
|
||||
} VFATCCB, *PVFATCCB;
|
||||
|
||||
#ifndef TAG
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#endif
|
||||
|
||||
#define TAG_CCB TAG('V', 'C', 'C', 'B')
|
||||
|
||||
|
@ -270,9 +273,9 @@ NTSTATUS VfatDirectoryControl (PVFAT_IRP_CONTEXT);
|
|||
|
||||
BOOL FsdDosDateTimeToFileTime (WORD wDosDate,
|
||||
WORD wDosTime,
|
||||
TIME *FileTime);
|
||||
LARGE_INTEGER *FileTime);
|
||||
|
||||
BOOL FsdFileTimeToDosDateTime (TIME *FileTime,
|
||||
BOOL FsdFileTimeToDosDateTime (LARGE_INTEGER *FileTime,
|
||||
WORD *pwDosDate,
|
||||
WORD *pwDosTime);
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include <defines.h>
|
||||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: volume.c,v 1.15 2002/03/18 22:37:13 hbirr Exp $
|
||||
/* $Id: volume.c,v 1.16 2002/09/07 15:12:03 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -245,6 +245,7 @@ NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
|
|||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PVOID SystemBuffer;
|
||||
ULONG BufferLength;
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
|
||||
/* PRECONDITION */
|
||||
assert(IrpContext);
|
||||
|
@ -256,8 +257,9 @@ NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
|
|||
return VfatQueueRequest (IrpContext);
|
||||
}
|
||||
|
||||
FsInformationClass = IrpContext->Stack->Parameters.SetVolume.FsInformationClass;
|
||||
BufferLength = IrpContext->Stack->Parameters.SetVolume.Length;
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION)IrpContext->Stack;
|
||||
FsInformationClass = IoStack->Parameters.SetVolume.FsInformationClass;
|
||||
BufferLength = IoStack->Parameters.SetVolume.Length;
|
||||
SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
|
||||
|
||||
DPRINT1("FsInformationClass %d\n", FsInformationClass);
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#define NTOS_KERNEL_MODE
|
||||
#include <ntos.h>
|
||||
#include <ntos/keyboard.h>
|
||||
#include <ntos/minmax.h>
|
||||
|
||||
#include <ddk/ntddkbd.h>
|
||||
#include <ddk/ntdd8042.h>
|
||||
#include <string.h>
|
||||
#include <ntos/minmax.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef _KEYBOARD_H_
|
||||
#define _KEYBOARD_H_
|
||||
|
||||
#include <ddk/ntddkbd.h>
|
||||
#include <ddk/ntdd8042.h>
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue