Reverted latest changes.

svn path=/trunk/; revision=3473
This commit is contained in:
Casper Hornstrup 2002-09-08 10:23:54 +00:00
parent 06d3fda385
commit 17c0b5798e
1261 changed files with 42752 additions and 18631 deletions

View file

@ -46,7 +46,7 @@ LOADERS = dos
# Driver support libraries
#bzip2 zlib
DRIVERS_LIB = bzip2
DRIVERS_LIB = bzip2 zlib
# Kernel mode device drivers
# beep blue floppy ide keyboard mouse null parallel ramdrv serial vga vidport

View file

@ -20,13 +20,11 @@ int main(int argc, char* argv[])
NTSTATUS Status;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING FileName;
UNICODE_STRING FileName = UNICODE_STRING_INITIALIZER(L"\\C:\\a.txt");
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);

View file

@ -1,8 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <windows.h>
#define NTOS_USER_MODE
#include <ntos.h>
#include <ddk/ntddk.h>
#define BUFFER_SIZE 256

View file

@ -1,6 +1,5 @@
#include <stdio.h>
#define NTOS_USER_MODE
#include <ntos.h>
#include <ntddk.h>
int main()
{

View file

@ -2,9 +2,8 @@
* isotest - display cdrom information
*/
#include <ddk/ntddk.h>
#include <windows.h>
#include <winioctl.h>
//#include <winioctl.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -1,11 +1,11 @@
/* $Id: lpcclt.c,v 1.10 2002/09/07 15:11:55 chorns Exp $
/* $Id: lpcclt.c,v 1.11 2002/09/08 10:21:58 chorns Exp $
*
* DESCRIPTION: Simple LPC Client
* PROGRAMMER: David Welch
*/
#include <ddk/ntddk.h>
#include <windows.h>
#define NTOS_USER_MODE
#include <ntos.h>
#include <napi/lpc.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) +
Request.Header.MessageSize = sizeof(LPC_MESSAGE_HEADER) +
Request.Header.DataSize;
printf("%s: Sending to port 0x%x message \"%s\"...\n",

View file

@ -1,11 +1,11 @@
/* $Id: lpcsrv.c,v 1.10 2002/09/07 15:11:55 chorns Exp $
/* $Id: lpcsrv.c,v 1.11 2002/09/08 10:21:58 chorns Exp $
*
* DESCRIPTION: Simple LPC Server
* PROGRAMMER: David Welch
*/
#include <ddk/ntddk.h>
#include <windows.h>
#define NTOS_USER_MODE
#include <ntos.h>
#include <napi/lpc.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.ClientId.UniqueProcess, ConnectMsg.Header.ClientId.UniqueThread);
ConnectMsg.Header.Cid.UniqueProcess, ConnectMsg.Header.Cid.UniqueThread);
printf("%s: Accepting connection request 0x%08x...\n", MyName,
ConnectMsg.Header.MessageId);

View file

@ -1,4 +1,3 @@
#define NTOS_USER_MODE
#include <ntos.h>
#include <stdio.h>

View file

@ -2,8 +2,7 @@
#include <string.h>
#include <stdio.h>
#include <windows.h>
#define NTOS_USER_MODE
#include <ntos.h>
#include <ddk/ntddk.h>
HANDLE OutputHandle;
HANDLE InputHandle;

View file

@ -1,8 +1,7 @@
/* $Id: sectest.c,v 1.3 2002/09/07 15:11:55 chorns Exp $ */
/* $Id: sectest.c,v 1.4 2002/09/08 10:22:01 chorns Exp $ */
#define UNICODE
#define _UNICODE
#include <windows.h>
#include <tchar.h>
int main(int argc, char* argv[])
{
@ -69,3 +68,4 @@ int main(int argc, char* argv[])
return 0;
}

View file

@ -6,17 +6,16 @@
#define INCLUDE_THE_DDK_HEADERS
#ifdef INCLUDE_THE_DDK_HEADERS
#define NTOS_USER_MODE
#include <ntos.h>
#define ROS_ACE_HEADER ROS_ACE_HEADER
#define ROS_ACE IACE
#include <ddk/ntddk.h>
#define ROS_ACE_HEADER ACE_HEADER
#define ROS_ACE ACE
//
// 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 }
@ -252,7 +251,7 @@ DisplayDacl(PACL pAcl)
LPWSTR wszType = 0;
PSID pSid;
status = RtlGetAce(pAcl, i, (PACE*) &pAce);
status = RtlGetAce(pAcl, i, (ROS_ACE**) &pAce);
if ( ! NT_SUCCESS(status) )
{
printf("RtlGetAce(): status = 0x%08x\n", status);

View file

@ -1,4 +1,4 @@
/* $Id: objdir.c,v 1.9 2002/09/07 15:11:56 chorns Exp $
/* $Id: objdir.c,v 1.10 2002/09/08 10:22:01 chorns Exp $
*
* DESCRIPTION: Object Manager Simple Explorer
* PROGRAMMER: David Welch
@ -16,8 +16,8 @@
* 2001-05-02 (ea)
* Added -r option.
*/
#define NTOS_USER_MODE
#include <ntos.h>
#include <ddk/ntddk.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
@ -75,6 +75,8 @@ 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:

View file

@ -3,8 +3,6 @@
*/
#include <windows.h>
#define NTOS_USER_MODE
#include <ntos.h>
//#include <winioctl.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -3,34 +3,23 @@
REACTOS
# 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
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
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

View file

@ -1,4 +1,4 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
* $Revision: 1.2 $
* $Revision: 1.3 $
*
*****************************************************************************/
@ -163,12 +163,8 @@
* 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)

View file

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
* $Revision: 1.2 $
* $Revision: 1.3 $
*
*****************************************************************************/
@ -26,8 +26,6 @@
#ifndef __ACTYPES_H__
#define __ACTYPES_H__
#include <ddk/ntddk.h>
/*! [Begin] no source code translation (keep the typedefs) */
/*
@ -116,16 +114,12 @@ 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;

View file

@ -14,12 +14,783 @@
#ifndef __INCLUDE_ACPI_TYPES_H
#define __INCLUDE_ACPI_TYPES_H
#include <ddk/ntddk.h>
#include <ddk/ntapi.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
/* Undefine some duplicate defined defines */
#undef EXCLUSIVE
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>
#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

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.8 2002/09/07 15:11:56 chorns Exp $
# $Id: makefile,v 1.9 2002/09/08 10:22:02 chorns Exp $
PATH_TO_TOP = ../../..
@ -6,7 +6,7 @@ TARGET_TYPE = driver
TARGET_NAME = acpi
TARGET_CFLAGS = -I./include -I./ospm/include -I$(PATH_TO_TOP)/include
TARGET_CFLAGS = -I./include -I./ospm/include
OBJECTS_PATH = objects

View file

@ -4,8 +4,11 @@
* PURPOSE: ACPI bus driver definitions
*/
#define ACPI_DEBUG
#include <platform/types.h>
#include <acpi.h>
#define __INCLUDE_TYPES_H
#include <platform/types.h>
#undef ROUND_UP
#include <ddk/ntddk.h>
#include <bm.h>
typedef ACPI_STATUS (*ACPI_DRIVER_FUNCTION)(VOID);

View file

@ -1,4 +1,4 @@
/* $Id: isapnp.c,v 1.3 2002/09/07 15:11:57 chorns Exp $
/* $Id: isapnp.c,v 1.4 2002/09/08 10:22:03 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_DEFAULT;
ULONG Option = IO_RESOURCE_REQUIRED;
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_DEFAULT;
Option = IO_RESOURCE_REQUIRED;
compat = 0;
break;
@ -1011,7 +1011,7 @@ static BOOLEAN CreateLogicalDevice(PISAPNP_DEVICE_EXTENSION DeviceExtension,
if (Size != 0)
goto skip;
Priority = 0;
Option = IO_RESOURCE_DEFAULT;
Option = IO_RESOURCE_REQUIRED;
LogicalDevice->CurrentDescriptorCount = 0;
break;
@ -1558,7 +1558,7 @@ ISAPNPDispatchOpenClose(
DPRINT("Called\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
Irp->IoStatus.Information = FILE_OPENED;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: beep.c,v 1.13 2002/09/07 15:11:58 chorns Exp $
/* $Id: beep.c,v 1.14 2002/09/08 10:22:04 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,8 +12,7 @@
/* INCLUDES ****************************************************************/
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ddk/ntddk.h>
#include <ddk/ntddbeep.h>
#define NDEBUG

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: blue.c,v 1.34 2002/09/07 15:11:58 chorns Exp $
/* $Id: blue.c,v 1.35 2002/09/08 10:22:04 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -11,9 +11,10 @@
/* INCLUDES ******************************************************************/
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ddk/ntddk.h>
#include <ddk/ntddblue.h>
#include <string.h>
#include <defines.h>
#define NDEBUG
#include <debug.h>

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -15,7 +15,6 @@
*/
#include <ddk/ntddk.h>
#include <ddk/ntdddisk.h>
#include "floppy.h"
#define NDEBUG
@ -102,7 +101,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject,
DeviceDescription.Master = FALSE;
DeviceDescription.ScatterGather = FALSE;
DeviceDescription.AutoInitialize = FALSE;
DeviceDescription.Dma32BitAddresses = FALSE;
DeviceDescription.Dma32BitAddress = FALSE;
DeviceDescription.DmaChannel = ControllerParameters->DmaChannel;
DeviceDescription.InterfaceType = Isa;
// DeviceDescription.DmaWidth = Width8Bits;
@ -123,7 +122,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject,
#endif
/* FIXME: Let's assume one drive and one controller for the moment */
RtlInitUnicodeString(&DeviceName, L"\\Device\\Floppy0");
RtlInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\Floppy0");
Status = IoCreateDevice(DriverObject,
sizeof(FLOPPY_DEVICE_EXTENSION),
&DeviceName,
@ -217,7 +216,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject,
CHECKPOINT;
Status = IoAllocateAdapterChannel( ControllerExtension->AdapterObject,
DeviceObject,
0x3000/PAGE_SIZE, // max track size is 12k
0x3000/PAGESIZE, // max track size is 12k
FloppyAdapterControl,
ControllerExtension );
if( !NT_SUCCESS( Status ) )

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: ide.c,v 1.55 2002/09/07 15:11:58 chorns Exp $
/* $Id: ide.c,v 1.56 2002/09/08 10:22:04 chorns Exp $
*
* IDE.C - IDE Disk driver
* written by Rex Jolliff
@ -68,7 +68,6 @@
// -------------------------------------------------------------------------
#include <ddk/ntddk.h>
#include <winioctl.h>
#define NDEBUG
#include <debug.h>

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: null.c,v 1.9 2002/09/07 15:11:58 chorns Exp $
/* $Id: null.c,v 1.10 2002/09/08 10:22:05 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 */
RtlInitUnicodeString(&wstrDeviceName, L"\\Device\\Null");
RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Null");
nErrCode = IoCreateDevice
(
@ -135,7 +135,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
pdoNullDevice->DeviceExtension = (PVOID)&nxNull;
/* create zero device */
RtlInitUnicodeString(&wstrDeviceName, L"\\Device\\Zero");
RtlInitUnicodeStringFromLiteral(&wstrDeviceName, L"\\Device\\Zero");
nErrCode = IoCreateDevice
(

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
@ -35,3 +36,4 @@ BEGIN
VALUE "Translation", 0x409, 1200
END
END

View file

@ -1,6 +1,6 @@
# $Id: makefile,v 1.8 2002/09/07 15:11:59 chorns Exp $
# $Id: makefile,v 1.9 2002/09/08 10:22:05 chorns Exp $
# $Id: makefile,v 1.8 2002/09/07 15:11:59 chorns Exp $
# $Id: makefile,v 1.9 2002/09/08 10:22:05 chorns Exp $
PATH_TO_TOP = ../../..
@ -12,7 +12,9 @@ TARGET_OBJECTS = ramdrv.o
TARGET_DDKLIBS = unbzip2.a
TARGET_CFLAGS=-I$(PATH_TO_TOP)/ntoskrnl/include -g
TARGET_NORC = yes
TARGET_CFLAGS=-I../../../ntoskrnl/include -g
include $(PATH_TO_TOP)/rules.mak

View file

@ -1,4 +1,4 @@
#include <ddk/ntddk.h>
#include <ntddk.h>
#include "ramdrv.h"
#include <debug.h>
#include "../../lib/bzip2/bzlib.h"

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,9 +1,9 @@
/*
* entry.c
*
* $Revision: 1.21 $
* $Revision: 1.22 $
* $Author: chorns $
* $Date: 2002/09/07 15:11:59 $
* $Date: 2002/09/08 10:22:07 $
*
*/
@ -74,7 +74,7 @@ DrvEnableDriver(IN ULONG EngineVersion,
DriveEnableData->pdrvfn = FuncList;
DriveEnableData->c = sizeof(FuncList) / sizeof(DRVFN);
DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION_NT4;
DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION;
return TRUE;
}
@ -115,6 +115,7 @@ 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,
@ -124,7 +125,7 @@ DrvEnablePDEV(IN DEVMODEW *DM,
OUT ULONG *DevCaps,
IN ULONG DevInfoSize,
OUT DEVINFO *DI,
IN HDEV hDev,
IN LPWSTR DevDataFile,
IN LPWSTR DeviceName,
IN HANDLE Driver)
{

View file

@ -1,4 +1,4 @@
#include <ddk/ntddk.h>
#include <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;
SURFOBJ *TargetBitmapSurf;
PSURFOBJ TargetBitmapSurf;
HBITMAP hTargetBitmap;
SIZEL InterSize;
POINTL ZeroPoint;

View file

@ -35,10 +35,10 @@ BOOL InitPointer(PPDEV ppdev)
VOID STDCALL
DrvMovePointer(IN SURFOBJ *pso,
DrvMovePointer(IN PSURFOBJ pso,
IN LONG x,
IN LONG y,
IN RECTL *prcl)
IN PRECTL prcl)
{
PPDEV ppdev = (PPDEV)pso->dhpdev;
@ -60,15 +60,15 @@ DrvMovePointer(IN SURFOBJ *pso,
ULONG STDCALL
DrvSetPointerShape(SURFOBJ *pso,
SURFOBJ *psoMask,
SURFOBJ *psoColor,
XLATEOBJ *pxlo,
DrvSetPointerShape(PSURFOBJ pso,
PSURFOBJ psoMask,
PSURFOBJ psoColor,
PXLATEOBJ pxlo,
LONG xHot,
LONG yHot,
LONG x,
LONG y,
RECTL *prcl,
PRECTL prcl,
ULONG fl)
{
PPDEV ppdev = (PPDEV)pso->dhpdev;

View file

@ -1,4 +1,4 @@
#include <ddk/ntddk.h>
#include <ntddk.h>
#define NDEBUG
#include <debug.h>
#include "../vgaddi.h"
@ -7,12 +7,12 @@
#include "bitblt.h"
BOOL STDCALL
DrvTransparentBlt(SURFOBJ *Dest,
SURFOBJ *Source,
CLIPOBJ *Clip,
XLATEOBJ *ColorTranslation,
RECTL *DestRect,
RECTL *SourceRect,
DrvTransparentBlt(PSURFOBJ Dest,
PSURFOBJ Source,
PCLIPOBJ Clip,
PXLATEOBJ ColorTranslation,
PRECTL DestRect,
PRECTL SourceRect,
ULONG TransparentColor,
ULONG Reserved)
{

View file

@ -1,6 +1,6 @@
#include <ddk/ntddk.h>
#include <ddk/winddi.h>
#include <ddk/ntddvdeo.h>
#include <ddk/ntddvid.h>
HANDLE GdiHeap;

View file

@ -1,5 +1,5 @@
#include <windows.h>
#include <reactos/resource.h>
#include "../../../../include/defines.h"
#include "../../../../include/reactos/resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,5 +1,5 @@
#include <ddk/ntddk.h>
#include <ddk/ntddvdeo.h>
#include <ddk/ntddvid.h>
#include <ddk/winddi.h>
#include <ntos/minmax.h>
#include "vgavideo.h"

View file

@ -7,7 +7,8 @@
#define VGA_OR 16
#define VGA_XOR 24
typedef struct { int quot, rem; } div_t;
//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];

View file

@ -1,7 +1,4 @@
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ntos/ntddvid.h>
#include <ddk/ntddk.h>
#include <ntddk.h>
#include <debug.h>
#include "vgavideo.h"
@ -71,7 +68,7 @@ void InitVGAMode()
{
int i;
VIDEO_X86_BIOS_ARGUMENTS vxba;
NTSTATUS vps;
VP_STATUS vps;
// FIXME: Use Vidport to map the memory properly
vidmem = (char *)(0xd0000000 + 0xa0000);
@ -105,7 +102,7 @@ VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
UNICODE_STRING Name = UNICODE_STRING_INITIALIZER(L"\\TextConsoleRefreshEvent");
NTSTATUS Status;
VIDEO_X86_BIOS_ARGUMENTS vxba;
NTSTATUS vps;
VP_STATUS vps;
ULONG ThreadRelease = 1;
CHECKPOINT;
@ -126,3 +123,6 @@ VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
ZwClose( Event );
}
}

View file

@ -3,10 +3,8 @@
*
*/
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ddk/ntddvdeo.h>
#include <ntos/ntddvid.h>
#include <ddk/ntddk.h>
#include <ddk/ntddvid.h>
#define UNIMPLEMENTED do {DbgPrint("%s:%d: Function not implemented", __FILE__, __LINE__); for(;;);} while (0)

View file

@ -1,5 +1,5 @@
#include <windows.h>
#include <reactos/resource.h>
#include "../../../../include/defines.h"
#include "../../../../include/reactos/resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,13 +1,12 @@
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ntos/ntddvid.h>
#include <ddk/ntddvdeo.h>
#include <ddk/ntddk.h>
#include <ddk/ntddvid.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];

View file

@ -1,12 +1,12 @@
/* $Id: vidport.c,v 1.24 2002/09/07 15:12:00 chorns Exp $
/* $Id: vidport.c,v 1.25 2002/09/08 10:22:08 chorns Exp $
*
* VideoPort driver
* Written by Rex Jolliff
*/
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ntos/ntddvid.h>
#include <ddk/ntddk.h>
#include <ddk/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
((PDRIVER_STARTIO)DeviceObject->DriverObject->DriverStartIo)(DeviceObject->DeviceExtension, (PIRP)vrp);
DeviceObject->DriverObject->DriverStartIo(DeviceObject->DeviceExtension, (PIRP)vrp);
// Translate the VRP back into the IRP for OutputBuffer
Irp->UserBuffer = vrp->OutputBuffer;

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,12 +1,8 @@
#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
@ -206,9 +202,7 @@ 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')
@ -350,7 +344,7 @@ CdfsSwapString(PWCHAR Out,
VOID
CdfsDateTimeToFileTime(PFCB Fcb,
LARGE_INTEGER *FileTime);
TIME *FileTime);
VOID
CdfsFileFlagsToAttributes(PFCB Fcb,

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -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.5 2002/09/07 15:12:00 chorns Exp $
/* $Id: create.c,v 1.6 2002/09/08 10:22:08 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -243,4 +243,4 @@ ByeBye:
return(Status);
}
/* EOF */
/* EOF */

View file

@ -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.8 2002/09/07 15:12:00 chorns Exp $
/* $Id: dirctl.c,v 1.9 2002/09/08 10:22:08 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;
PEXTENDED_IO_STACK_LOCATION Stack;
PIO_STACK_LOCATION Stack;
PFILE_OBJECT FileObject;
NTSTATUS Status = STATUS_SUCCESS;
DPRINT("CdfsQueryDirectory() called\n");
DeviceExtension = DeviceObject->DeviceExtension;
Stack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
Stack = IoGetCurrentIrpStackLocation(Irp);
FileObject = Stack->FileObject;
Ccb = (PCCB)FileObject->FsContext2;

View file

@ -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.8 2002/09/07 15:12:00 chorns Exp $
/* $Id: fcb.c,v 1.9 2002/09/08 10:22:09 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -38,10 +38,7 @@
/* 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))
@ -240,7 +237,7 @@ CdfsFCBInitializeCache(PVCB Vcb,
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
FileObject->FsContext = (PVOID) &Fcb->RFCB;
FileObject->FsContext2 = newCCB;
newCCB->Fcb = Fcb;
@ -250,7 +247,7 @@ CdfsFCBInitializeCache(PVCB Vcb,
Status = CcRosInitializeFileCache(FileObject,
&Fcb->RFCB.Bcb,
PAGE_SIZE);
PAGESIZE);
if (!NT_SUCCESS(Status))
{
DbgPrint("CcRosInitializeFileCache failed\n");
@ -417,7 +414,7 @@ CdfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
FileObject->Flags = FileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
FileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
FileObject->FsContext = (PVOID)&Fcb->RFCB;
FileObject->FsContext2 = newCCB;
newCCB->Fcb = Fcb;
@ -428,7 +425,7 @@ CdfsAttachFCBToFileObject(PDEVICE_EXTENSION Vcb,
{
Status = CcRosInitializeFileCache(FileObject,
&Fcb->RFCB.Bcb,
PAGE_SIZE);
PAGESIZE);
if (!NT_SUCCESS(Status))
{
DbgPrint("CcRosInitializeFileCache failed\n");

View file

@ -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/09/07 15:12:00 chorns Exp $
/* $Id: fsctl.c,v 1.9 2002/09/08 10:22:09 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 / sizeof(WCHAR)) && *pc != ' '; i++)
for (i = 0; i < MAXIMUM_VOLUME_LABEL_LENGTH && *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->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->SectionObjectPointers = &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,
PAGE_SIZE);
PAGESIZE);
if (!NT_SUCCESS (Status))
{
DbgPrint("CcRosInitializeFileCache failed\n");

View file

@ -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.3 2002/09/07 15:12:01 chorns Exp $
/* $Id: misc.c,v 1.4 2002/09/08 10:22:09 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -103,7 +103,7 @@ CdfsSwapString(PWCHAR Out,
VOID
CdfsDateTimeToFileTime(PFCB Fcb,
LARGE_INTEGER *FileTime)
TIME *FileTime)
{
TIME_FIELDS TimeFields;
@ -134,4 +134,4 @@ CdfsFileFlagsToAttributes(PFCB Fcb,
(Fcb->Entry.FileFlags & 0x10) ? FILE_ATTRIBUTE_READONLY : 0;
}
/* EOF */
/* EOF */

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -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.6 2002/09/07 15:12:01 chorns Exp $
/* $Id: cdfs.c,v 1.7 2002/09/08 10:22:09 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -28,9 +28,6 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <ddk/ntdddisk.h>
#include <ddk/ntddcdrm.h>
#define NDEBUG
#include <debug.h>
@ -122,7 +119,7 @@ FsRecCdfsFsControl(IN PDEVICE_OBJECT DeviceObject,
case IRP_MN_LOAD_FILE_SYSTEM:
DPRINT("Cdfs: IRP_MN_LOAD_FILE_SYSTEM\n");
RtlInitUnicodeString(&RegistryPath,
RtlInitUnicodeStringFromLiteral(&RegistryPath,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Cdfs");
Status = ZwLoadDriver(&RegistryPath);
if (!NT_SUCCESS(Status))

View file

@ -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.5 2002/09/07 15:12:01 chorns Exp $
/* $Id: fat.c,v 1.6 2002/09/08 10:22:09 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -28,8 +28,6 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <ddk/ntdddisk.h>
#define NDEBUG
#include <debug.h>
@ -119,7 +117,7 @@ FsRecVfatFsControl(IN PDEVICE_OBJECT DeviceObject,
case IRP_MN_LOAD_FILE_SYSTEM:
DPRINT("FAT: IRP_MN_LOAD_FILE_SYSTEM\n");
RtlInitUnicodeString(&RegistryPath,
RtlInitUnicodeStringFromLiteral(&RegistryPath,
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Vfatfs");
Status = ZwLoadDriver(&RegistryPath);
if (!NT_SUCCESS(Status))

View file

@ -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.3 2002/09/07 15:12:01 chorns Exp $
/* $Id: fs_rec.c,v 1.4 2002/09/08 10:22:09 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -28,7 +28,6 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#define NDEBUG
#include <debug.h>
@ -151,7 +150,7 @@ FsRecRegisterFs(PDRIVER_OBJECT DriverObject,
NULL,
0,
FILE_SHARE_READ | FILE_SHARE_WRITE,
FILE_OPEN_IF,
OPEN_EXISTING,
0,
NULL,
0);
@ -205,7 +204,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
ConfigInfo = IoGetConfigurationInformation();
if (ConfigInfo->CdRomCount > 0)
if (ConfigInfo->CDRomCount > 0)
{
Status = FsRecRegisterFs(DriverObject,
L"\\Cdfs",

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -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.5 2002/09/07 15:12:01 chorns Exp $
/* $Id: ntfs.c,v 1.6 2002/09/08 10:22:09 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -28,8 +28,6 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <ddk/ntdddisk.h>
#define NDEBUG
#include <debug.h>

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.3 2002/09/07 15:12:02 chorns Exp $
/* $Id: create.c,v 1.4 2002/09/08 10:22:10 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "msfs.h"
#define NDEBUG

View file

@ -1,4 +1,4 @@
/* $Id: finfo.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
/* $Id: finfo.c,v 1.5 2002/09/08 10:22:10 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "msfs.h"
#define NDEBUG
@ -30,19 +31,19 @@ MsfsQueryMailslotInformation(PMSFS_FCB Fcb,
Mailslot = Fcb->Mailslot;
Buffer->MaximumMessageSize = Mailslot->MaxMessageSize;
Buffer->ReadTimeout = Mailslot->TimeOut;
Buffer->MaxMessageSize = Mailslot->MaxMessageSize;
Buffer->Timeout = Mailslot->TimeOut;
KeAcquireSpinLock(&Mailslot->MessageListLock, &oldIrql);
Buffer->MessagesAvailable = Mailslot->MessageCount;
Buffer->MessageCount = Mailslot->MessageCount;
if (Mailslot->MessageCount == 0)
{
Buffer->NextMessageSize = 0;
Buffer->NextSize = 0;
}
else
{
/* FIXME: read size of first message (head) */
Buffer->NextMessageSize = 0;
Buffer->NextSize = 0;
}
KeReleaseSpinLock(&Mailslot->MessageListLock, oldIrql);
@ -60,7 +61,7 @@ MsfsSetMailslotInformation(PMSFS_FCB Fcb,
if (*BufferLength < sizeof(FILE_MAILSLOT_SET_INFORMATION))
return(STATUS_BUFFER_OVERFLOW);
Fcb->Mailslot->TimeOut = Buffer->ReadTimeout;
Fcb->Mailslot->TimeOut = Buffer->Timeout;
return(STATUS_SUCCESS);
}

View file

@ -1,4 +1,4 @@
/* $Id: fsctrl.c,v 1.2 2002/09/07 15:12:02 chorns Exp $
/* $Id: fsctrl.c,v 1.3 2002/09/08 10:22:10 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,9 +9,10 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "msfs.h"
#define NDEBUG
//#define NDEBUG
#include <debug.h>
@ -21,7 +22,7 @@ NTSTATUS STDCALL
MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PEXTENDED_IO_STACK_LOCATION IoStack;
PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PMSFS_MAILSLOT Mailslot;
PMSFS_FCB Fcb;
@ -29,14 +30,14 @@ MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
DPRINT1("MsfsFileSystemControl(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
Fcb = FileObject->FsContext;
Mailslot = Fcb->Mailslot;
DPRINT1("Mailslot name: %wZ\n", &Mailslot->Name);
switch (IoStack->Parameters.FileSystemControl.FsControlCode)
switch (IoStack->Parameters.FileSystemControl.IoControlCode)
{
#if 0
case FSCTL_WAIT_PIPE:

View file

@ -1,4 +1,4 @@
/* $Id: msfs.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
/* $Id: msfs.c,v 1.5 2002/09/08 10:22:10 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "msfs.h"
#define NDEBUG

View file

@ -1,9 +1,6 @@
#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;

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: rw.c,v 1.3 2002/09/07 15:12:02 chorns Exp $
/* $Id: rw.c,v 1.4 2002/09/08 10:22:10 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,8 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include <ntos/minmax.h>
#include "msfs.h"
#define NDEBUG

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.13 2002/09/07 15:12:02 chorns Exp $
/* $Id: create.c,v 1.14 2002/09/08 10:22:11 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,8 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "npfs.h"
#define NDEBUG

View file

@ -1,4 +1,4 @@
/* $Id: finfo.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
/* $Id: finfo.c,v 1.5 2002/09/08 10:22:11 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "npfs.h"
#define NDEBUG

View file

@ -1,4 +1,4 @@
/* $Id: fsctrl.c,v 1.9 2002/09/07 15:12:02 chorns Exp $
/* $Id: fsctrl.c,v 1.10 2002/09/08 10:22:11 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -10,6 +10,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "npfs.h"
#define NDEBUG
@ -394,7 +395,7 @@ NTSTATUS STDCALL
NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PEXTENDED_IO_STACK_LOCATION IoStack;
PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
NTSTATUS Status;
PNPFS_DEVICE_EXTENSION DeviceExt;
@ -404,7 +405,7 @@ NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
DPRINT("NpfsFileSystemContol(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
IoStack = IoGetCurrentIrpStackLocation(Irp);
DPRINT("IoStack: %p\n", IoStack);
FileObject = IoStack->FileObject;
DPRINT("FileObject: %p\n", FileObject);
@ -414,7 +415,7 @@ NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
DPRINT("Pipe: %p\n", Pipe);
DPRINT("PipeName: %wZ\n", &Pipe->PipeName);
switch (IoStack->Parameters.FileSystemControl.FsControlCode)
switch (IoStack->Parameters.FileSystemControl.IoControlCode)
{
case FSCTL_PIPE_ASSIGN_EVENT:
DPRINT("Assign event\n");

View file

@ -1,4 +1,4 @@
/* $Id: npfs.c,v 1.4 2002/09/07 15:12:02 chorns Exp $
/* $Id: npfs.c,v 1.5 2002/09/08 10:22:11 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "npfs.h"
#define NDEBUG

View file

@ -1,10 +1,8 @@
/* $Id: npfs.h,v 1.12 2002/09/07 15:12:02 chorns Exp $ */
/* $Id: npfs.h,v 1.13 2002/09/08 10:22:11 chorns Exp $ */
#ifndef __SERVICES_FS_NP_NPFS_H
#define __SERVICES_FS_NP_NPFS_H
#define NTOS_KERNEL_MODE
#include <ntos.h>
typedef struct
{

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: rw.c,v 1.7 2002/09/07 15:12:02 chorns Exp $
/* $Id: rw.c,v 1.8 2002/09/08 10:22:11 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include "npfs.h"
#define NDEBUG

View file

@ -1,4 +1,4 @@
/* $Id: volume.c,v 1.3 2002/09/07 15:12:02 chorns Exp $
/* $Id: volume.c,v 1.4 2002/09/08 10:22:11 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -9,6 +9,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#define NDEBUG

View file

@ -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.2 2002/09/07 15:12:02 chorns Exp $
/* $Id: dirctl.c,v 1.3 2002/09/08 10:22:11 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;
PEXTENDED_IO_STACK_LOCATION Stack;
PIO_STACK_LOCATION Stack;
PFILE_OBJECT FileObject;
NTSTATUS Status = STATUS_SUCCESS;
DPRINT1("NtfsQueryDirectory() called\n");
DeviceExtension = DeviceObject->DeviceExtension;
Stack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
Stack = IoGetCurrentIrpStackLocation(Irp);
FileObject = Stack->FileObject;
Ccb = (PCCB)FileObject->FsContext2;

View file

@ -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.2 2002/09/07 15:12:02 chorns Exp $
/* $Id: fcb.c,v 1.3 2002/09/08 10:22:11 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->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->SectionObjectPointers = &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 = PAGE_SIZE;//Vcb->CdInfo.RootSize;
Fcb->RFCB.ValidDataLength.QuadPart = PAGE_SIZE;//Vcb->CdInfo.RootSize;
Fcb->RFCB.AllocationSize.QuadPart = PAGE_SIZE;//Vcb->CdInfo.RootSize;
Fcb->RFCB.FileSize.QuadPart = PAGESIZE;//Vcb->CdInfo.RootSize;
Fcb->RFCB.ValidDataLength.QuadPart = PAGESIZE;//Vcb->CdInfo.RootSize;
Fcb->RFCB.AllocationSize.QuadPart = PAGESIZE;//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->SectionObjectPointer = &Fcb->SectionObjectPointers;
FileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
FileObject->FsContext = (PVOID)&Fcb->RFCB;
FileObject->FsContext2 = newCCB;
newCCB->Fcb = Fcb;

View file

@ -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.3 2002/09/07 15:12:03 chorns Exp $
/* $Id: fsctl.c,v 1.4 2002/09/08 10:22:11 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->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
DeviceExt->StreamFileObject->PrivateCacheMap = NULL;
DeviceExt->StreamFileObject->Vpb = DeviceExt->Vpb;
Ccb->Fcb = Fcb;

View file

@ -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 > PAGE_SIZE ? \
(pDeviceExt)->NtfsInfo.BytesPerCluster : PAGE_SIZE)
((pDeviceExt)->NtfsInfo.BytesPerCluster > PAGESIZE ? \
(pDeviceExt)->NtfsInfo.BytesPerCluster : PAGESIZE)
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
@ -118,6 +118,8 @@ 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

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -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.45 2002/09/07 15:12:03 chorns Exp $
/* $Id: create.c,v 1.46 2002/09/08 10:22:12 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: services/fs/vfat/create.c
@ -38,7 +38,7 @@
/* GLOBALS *******************************************************************/
#define ENTRIES_PER_PAGE (PAGE_SIZE / sizeof (FATDirEntry))
#define ENTRIES_PER_PAGE (PAGESIZE / sizeof (FATDirEntry))
/* FUNCTIONS *****************************************************************/
@ -175,7 +175,7 @@ GetEntryName(PVOID *pContext,
Offset = 0;
CcUnpinData(*pContext);
FileOffset.QuadPart = *pIndex * sizeof(FATDirEntry);
if(!CcMapData(FileObject, &FileOffset, PAGE_SIZE, TRUE, pContext, Block))
if(!CcMapData(FileObject, &FileOffset, PAGESIZE, 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, PAGE_SIZE, TRUE, pContext, Block))
if(!CcMapData(FileObject, &FileOffset, PAGESIZE, 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, PAGE_SIZE, TRUE, &Context, (PVOID*)&Entry))
if (!CcMapData(pFcb->FileObject, &FileOffset, PAGESIZE, 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, PAGE_SIZE, TRUE,
if (!CcMapData(Parent->FileObject, &FileOffset, PAGESIZE, 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->SectionObjectPointer = &pFcb->SectionObjectPointers;
FileObject->SectionObjectPointers = &pFcb->SectionObjectPointers;
FileObject->FsContext = (PVOID) &pFcb->RFCB;
FileObject->FsContext2 = pCcb;
pCcb->pFcb = pFcb;

View file

@ -1,5 +1,5 @@
/*
* $Id: dir.c,v 1.25 2002/09/07 15:12:03 chorns Exp $
* $Id: dir.c,v 1.26 2002/09/08 10:22:12 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, LARGE_INTEGER * FileTime)
BOOL FsdDosDateTimeToFileTime (WORD wDosDate, WORD wDosTime, TIME * FileTime)
{
PDOSTIME pdtime = (PDOSTIME) & wDosTime;
PDOSDATE pddate = (PDOSDATE) & wDosDate;
@ -46,7 +46,7 @@ BOOL FsdDosDateTimeToFileTime (WORD wDosDate, WORD wDosTime, LARGE_INTEGER * Fil
// function like FileTimeToDosDateTime
BOOL
FsdFileTimeToDosDateTime (LARGE_INTEGER * FileTime, WORD * pwDosDate, WORD * pwDosTime)
FsdFileTimeToDosDateTime (TIME * FileTime, WORD * pwDosDate, WORD * pwDosTime)
{
PDOSTIME pdtime = (PDOSTIME) pwDosTime;
PDOSDATE pddate = (PDOSDATE) pwDosDate;
@ -235,11 +235,9 @@ 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))
{
@ -247,11 +245,11 @@ NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
}
// Obtain the callers parameters
BufferLength = IoStack->Parameters.QueryDirectory.Length;
pSearchPattern = IoStack->Parameters.QueryDirectory.FileName;
BufferLength = IrpContext->Stack->Parameters.QueryDirectory.Length;
pSearchPattern = IrpContext->Stack->Parameters.QueryDirectory.FileName;
FileInformationClass =
IoStack->Parameters.QueryDirectory.FileInformationClass;
FileIndex = IoStack->Parameters.QueryDirectory.FileIndex;
IrpContext->Stack->Parameters.QueryDirectory.FileInformationClass;
FileIndex = IrpContext->Stack->Parameters.QueryDirectory.FileIndex;
if (pSearchPattern)
{
if (!pCcb->DirectorySearchPattern)

View file

@ -1,4 +1,4 @@
/* $Id: direntry.c,v 1.7 2002/09/07 15:12:03 chorns Exp $
/* $Id: direntry.c,v 1.8 2002/09/08 10:22:12 chorns Exp $
*
*
* FILE: DirEntry.c
@ -20,8 +20,8 @@
#include "vfat.h"
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGE_SIZE ? \
(pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGESIZE ? \
(pDeviceExt)->FatInfo.BytesPerCluster : PAGESIZE)
#define ENTRIES_PER_CACHEPAGE(pDeviceExt) (ENTRIES_PER_SECTOR * \
(CACHEPAGESIZE(pDeviceExt) / ((pDeviceExt)->FatInfo.BytesPerSector)))

View file

@ -1,4 +1,4 @@
/* $Id: dirwr.c,v 1.29 2002/09/07 15:12:03 chorns Exp $
/* $Id: dirwr.c,v 1.30 2002/09/08 10:22:12 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 ((LARGE_INTEGER *) & LocalTime, &pEntry->CreationDate,
FsdFileTimeToDosDateTime ((TIME *) & 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)) % PAGE_SIZE) == 0)
if (Context == NULL || ((i * sizeof(FATDirEntry)) % PAGESIZE) == 0)
{
if (Context)
{
CcSetDirtyPinnedData(Context, NULL);
CcUnpinData(Context);
}
Offset.u.LowPart = (i * sizeof(FATDirEntry) / PAGE_SIZE) * PAGE_SIZE;
CcMapData (pDirFcb->FileObject, &Offset, PAGE_SIZE, TRUE,
Offset.u.LowPart = (i * sizeof(FATDirEntry) / PAGESIZE) * PAGESIZE;
CcMapData (pDirFcb->FileObject, &Offset, PAGESIZE, TRUE,
&Context, (PVOID*)&pDirEntry);
}
pDirEntry[i % (PAGE_SIZE / sizeof(FATDirEntry))].Filename[0] = 0xe5;
pDirEntry[i % (PAGESIZE / sizeof(FATDirEntry))].Filename[0] = 0xe5;
if (i == Entry)
{
CurrentCluster =
vfatDirEntryGetFirstCluster (DeviceExt,
&pDirEntry[i % (PAGE_SIZE / sizeof(FATDirEntry))]);
&pDirEntry[i % (PAGESIZE / sizeof(FATDirEntry))]);
}
}
if (Context)

View file

@ -1,5 +1,5 @@
/*
* $Id: fat.c,v 1.38 2002/09/07 15:12:03 chorns Exp $
* $Id: fat.c,v 1.39 2002/09/08 10:22:12 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 CACHEPAGE_SIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGE_SIZE ? \
(pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGESIZE ? \
(pDeviceExt)->FatInfo.BytesPerCluster : PAGESIZE)
/* FUNCTIONS ****************************************************************/
@ -45,7 +45,7 @@ Fat32GetNextCluster(PDEVICE_EXTENSION DeviceExt,
PVOID Context;
LARGE_INTEGER Offset;
ChunkSize = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(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 = CACHEPAGE_SIZE(DeviceExt);
ChunkSize = CACHEPAGESIZE(DeviceExt);
FATOffset = (ClusterToWrite * 4);
Offset.QuadPart = ROUND_DOWN(FATOffset, ChunkSize);

View file

@ -1,4 +1,4 @@
/* $Id: fcb.c,v 1.19 2002/09/07 15:12:03 chorns Exp $
/* $Id: fcb.c,v 1.20 2002/09/08 10:22:12 chorns Exp $
*
*
* FILE: fcb.c
@ -21,9 +21,8 @@
#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))
@ -179,7 +178,7 @@ vfatFCBInitializeCacheFromVolume (PVCB vcb, PVFATFCB fcb)
fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
fileObject->SectionObjectPointers = &fcb->SectionObjectPointers;
fileObject->FsContext = (PVOID) &fcb->RFCB;
fileObject->FsContext2 = newCCB;
newCCB->pFcb = fcb;
@ -188,8 +187,8 @@ vfatFCBInitializeCacheFromVolume (PVCB vcb, PVFATFCB fcb)
fcb->pDevExt = vcb;
fileCacheQuantum = (vcb->FatInfo.BytesPerCluster >= PAGE_SIZE) ?
vcb->FatInfo.BytesPerCluster : PAGE_SIZE;
fileCacheQuantum = (vcb->FatInfo.BytesPerCluster >= PAGESIZE) ?
vcb->FatInfo.BytesPerCluster : PAGESIZE;
status = CcRosInitializeFileCache (fileObject,
&fcb->RFCB.Bcb,
@ -352,13 +351,12 @@ vfatAttachFCBToFileObject (PDEVICE_EXTENSION vcb,
fileObject->Flags = fileObject->Flags | FO_FCB_IS_VALID |
FO_DIRECT_CACHE_PAGING_READ;
fileObject->SectionObjectPointer = &fcb->SectionObjectPointers;
fileObject->SectionObjectPointers = &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;

View file

@ -1,4 +1,4 @@
/* $Id: finfo.c,v 1.19 2002/09/07 15:12:03 chorns Exp $
/* $Id: finfo.c,v 1.20 2002/09/08 10:22:12 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->SectionObjectPointer->SharedCacheMap != NULL)
if (FileObject->SectionObjectPointers->SharedCacheMap != NULL)
{
CcSetFileSizes(FileObject, (PCC_FILE_SIZES)&Fcb->RFCB.AllocationSize);
}

View file

@ -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.9 2002/09/07 15:12:03 chorns Exp $
/* $Id: fsctl.c,v 1.10 2002/09/08 10:22:12 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -27,18 +27,17 @@
/* 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 > PAGE_SIZE ? \
(pDeviceExt)->FatInfo.BytesPerCluster : PAGE_SIZE)
#define CACHEPAGESIZE(pDeviceExt) ((pDeviceExt)->FatInfo.BytesPerCluster > PAGESIZE ? \
(pDeviceExt)->FatInfo.BytesPerCluster : PAGESIZE)
static NTSTATUS
@ -182,14 +181,14 @@ VfatMountDevice(PDEVICE_EXTENSION DeviceExt,
return(Status);
}
if (DeviceExt->FatInfo.BytesPerCluster >= PAGE_SIZE &&
(DeviceExt->FatInfo.BytesPerCluster % PAGE_SIZE) != 0)
if (DeviceExt->FatInfo.BytesPerCluster >= PAGESIZE &&
(DeviceExt->FatInfo.BytesPerCluster % PAGESIZE) != 0)
{
DbgPrint("(%s:%d) Invalid cluster size\n", __FILE__, __LINE__);
KeBugCheck(0);
}
else if (DeviceExt->FatInfo.BytesPerCluster < PAGE_SIZE &&
(PAGE_SIZE % DeviceExt->FatInfo.BytesPerCluster) != 0)
else if (DeviceExt->FatInfo.BytesPerCluster < PAGESIZE &&
(PAGESIZE % DeviceExt->FatInfo.BytesPerCluster) != 0)
{
DbgPrint("(%s:%d) Invalid cluster size2\n", __FILE__, __LINE__);
KeBugCheck(0);
@ -304,7 +303,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->SectionObjectPointer = &Fcb->SectionObjectPointers;
DeviceExt->FATFileObject->SectionObjectPointers = &Fcb->SectionObjectPointers;
DeviceExt->FATFileObject->PrivateCacheMap = NULL;
DeviceExt->FATFileObject->Vpb = DeviceObject->Vpb;
Ccb->pFcb = Fcb;
@ -324,7 +323,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext)
}
else
{
Status = CcRosInitializeFileCache(DeviceExt->FATFileObject, &Fcb->RFCB.Bcb, 2 * PAGE_SIZE);
Status = CcRosInitializeFileCache(DeviceExt->FATFileObject, &Fcb->RFCB.Bcb, 2 * PAGESIZE);
}
if (!NT_SUCCESS (Status))
{

View file

@ -1,5 +1,5 @@
/* $Id: rw.c,v 1.47 2002/09/07 15:12:03 chorns Exp $
/* $Id: rw.c,v 1.48 2002/09/08 10:22:12 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 < PAGE_SIZE)
if (CacheSize < PAGESIZE)
{
CacheSize = PAGE_SIZE;
CacheSize = PAGESIZE;
}
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 < PAGE_SIZE)
if (CacheSize < PAGESIZE)
{
CacheSize = PAGE_SIZE;
CacheSize = PAGESIZE;
}
CcRosInitializeFileCache(IrpContext->FileObject, &Fcb->RFCB.Bcb, CacheSize);
}

View file

@ -1,7 +1,6 @@
/* $Id: vfat.h,v 1.46 2002/09/07 15:12:03 chorns Exp $ */
/* $Id: vfat.h,v 1.47 2002/09/08 10:22:13 chorns Exp $ */
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ddk/ntifs.h>
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
@ -198,9 +197,7 @@ 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')
@ -273,9 +270,9 @@ NTSTATUS VfatDirectoryControl (PVFAT_IRP_CONTEXT);
BOOL FsdDosDateTimeToFileTime (WORD wDosDate,
WORD wDosTime,
LARGE_INTEGER *FileTime);
TIME *FileTime);
BOOL FsdFileTimeToDosDateTime (LARGE_INTEGER *FileTime,
BOOL FsdFileTimeToDosDateTime (TIME *FileTime,
WORD *pwDosDate,
WORD *pwDosTime);

View file

@ -1,4 +1,5 @@
#include <windows.h>
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View file

@ -1,4 +1,4 @@
/* $Id: volume.c,v 1.16 2002/09/07 15:12:03 chorns Exp $
/* $Id: volume.c,v 1.17 2002/09/08 10:22:13 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -245,7 +245,6 @@ NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
NTSTATUS Status = STATUS_SUCCESS;
PVOID SystemBuffer;
ULONG BufferLength;
PEXTENDED_IO_STACK_LOCATION IoStack;
/* PRECONDITION */
assert(IrpContext);
@ -257,9 +256,8 @@ NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
return VfatQueueRequest (IrpContext);
}
IoStack = (PEXTENDED_IO_STACK_LOCATION)IrpContext->Stack;
FsInformationClass = IoStack->Parameters.SetVolume.FsInformationClass;
BufferLength = IoStack->Parameters.SetVolume.Length;
FsInformationClass = IrpContext->Stack->Parameters.SetVolume.FsInformationClass;
BufferLength = IrpContext->Stack->Parameters.SetVolume.Length;
SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
DPRINT1("FsInformationClass %d\n", FsInformationClass);

View file

@ -9,13 +9,13 @@
/* INCLUDES ****************************************************************/
#define NTOS_KERNEL_MODE
#include <ntos.h>
#include <ddk/ntddk.h>
#include <string.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>

View file

@ -1,6 +1,5 @@
#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