Author: sginsberg
Date: Thu Nov 27 14:05:12 2008
New Revision: 37691
URL:
http://svn.reactos.org/svn/reactos?rev=37691&view=rev
Log:
- Videoprt should only use the error codes provided in dderror.h, fix that. Also include
dderror.h and make the windef.h dependency explicit.
- Include dderror.h in vbemp/vgamp/xboxvmp too, and make sure vbemp gets its precious
HIWORD/LOWORD
Modified:
trunk/reactos/drivers/video/miniport/vbe/vbemp.c
trunk/reactos/drivers/video/miniport/vbe/vbemp.h
trunk/reactos/drivers/video/miniport/vga/vgamp.h
trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h
trunk/reactos/drivers/video/videoprt/interrupt.c
trunk/reactos/drivers/video/videoprt/resource.c
trunk/reactos/drivers/video/videoprt/services.c
trunk/reactos/drivers/video/videoprt/videoprt.c
trunk/reactos/drivers/video/videoprt/videoprt.h
Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe…
==============================================================================
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/miniport/vbe/vbemp.c [iso-8859-1] Thu Nov 27 14:05:12
2008
@@ -28,6 +28,11 @@
/* INCLUDES *******************************************************************/
#include "vbemp.h"
+
+#undef LOWORD
+#undef HIWORD
+#define LOWORD(l) ((USHORT)((ULONG_PTR)(l)))
+#define HIWORD(l) ((USHORT)(((ULONG_PTR)(l)>>16)&0xFFFF))
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe…
==============================================================================
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/miniport/vbe/vbemp.h [iso-8859-1] Thu Nov 27 14:05:12
2008
@@ -30,6 +30,7 @@
#include <ntddk.h>
#endif
+#include "dderror.h"
#include "miniport.h"
#include "ntddvdeo.h"
#include "video.h"
Modified: trunk/reactos/drivers/video/miniport/vga/vgamp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vga…
==============================================================================
--- trunk/reactos/drivers/video/miniport/vga/vgamp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/miniport/vga/vgamp.h [iso-8859-1] Thu Nov 27 14:05:12
2008
@@ -30,6 +30,7 @@
#include <ntddk.h>
#endif
+#include "dderror.h"
#include "miniport.h"
#include "ntddvdeo.h"
#include "video.h"
Modified: trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/xbo…
==============================================================================
--- trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h [iso-8859-1] Thu Nov 27
14:05:12 2008
@@ -33,6 +33,7 @@
#include <ntddk.h>
#endif
+#include "dderror.h"
#include "miniport.h"
#include "ntddvdeo.h"
#include "video.h"
Modified: trunk/reactos/drivers/video/videoprt/interrupt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/int…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/interrupt.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/interrupt.c [iso-8859-1] Thu Nov 27 14:05:12
2008
@@ -123,7 +123,7 @@
0,
DeviceExtension->InterruptLevel);
- return Status ? NO_ERROR : ERROR_INVALID_ACCESS;
+ return Status ? NO_ERROR : ERROR_INVALID_PARAMETER;
}
/*
@@ -144,5 +144,5 @@
DeviceExtension->InterruptVector,
0);
- return Status ? NO_ERROR : ERROR_INVALID_ACCESS;
+ return Status ? NO_ERROR : ERROR_INVALID_PARAMETER;
}
Modified: trunk/reactos/drivers/video/videoprt/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/res…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/resource.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/resource.c [iso-8859-1] Thu Nov 27 14:05:12 2008
@@ -332,7 +332,7 @@
{
TRACE_(VIDEOPRT, "VideoPortMapBankedMemory\n");
UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
}
@@ -437,7 +437,7 @@
if (ReturnedLength != sizeof(PCI_COMMON_CONFIG))
{
- return ERROR_NO_SYSTEM_RESOURCES;
+ return ERROR_NOT_ENOUGH_MEMORY;
}
}
else
@@ -504,7 +504,7 @@
DeviceExtension->AllocatedResources = AllocatedResources;
}
if (AllocatedResources == NULL)
- return ERROR_NO_SYSTEM_RESOURCES;
+ return ERROR_NOT_ENOUGH_MEMORY;
AssignedCount = 0;
for (FullList = AllocatedResources->List;
@@ -524,14 +524,14 @@
AssignedCount >= NumAccessRanges)
{
WARN_(VIDEOPRT, "Too many access ranges found\n");
- return ERROR_NO_SYSTEM_RESOURCES;
+ return ERROR_NOT_ENOUGH_MEMORY;
}
if (Descriptor->Type == CmResourceTypeMemory)
{
if (NumAccessRanges <= AssignedCount)
{
WARN_(VIDEOPRT, "Too many access ranges found\n");
- return ERROR_NO_SYSTEM_RESOURCES;
+ return ERROR_NOT_ENOUGH_MEMORY;
}
INFO_(VIDEOPRT, "Memory range starting at 0x%08x length
0x%08x\n",
Descriptor->u.Memory.Start.u.LowPart,
Descriptor->u.Memory.Length);
@@ -667,7 +667,7 @@
{
TRACE_(VIDEOPRT, "VideoPortGetDeviceData\n");
UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
}
/*
Modified: trunk/reactos/drivers/video/videoprt/services.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/ser…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/services.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/services.c [iso-8859-1] Thu Nov 27 14:05:12 2008
@@ -77,11 +77,11 @@
case VideoPortServicesI2C:
UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
case VideoPortServicesHeadless:
UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
default:
break;
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] Thu Nov 27 14:05:12 2008
@@ -856,7 +856,7 @@
UNIMPLEMENTED;
}
- return ERROR_SUCCESS;
+ return NO_ERROR;
}
/*
@@ -884,7 +884,7 @@
ValueData,
ValueLength);
- if (Status != ERROR_SUCCESS)
+ if (Status != NO_ERROR)
WARN_(VIDEOPRT, "VideoPortSetRegistryParameters error 0x%x\n", Status);
return Status;
Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.h [iso-8859-1] Thu Nov 27 14:05:12 2008
@@ -32,6 +32,8 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
#include <reactos/helper.h>
+#include <dderror.h>
+#include <windef.h>
#include <debug.h>