diff --git a/reactos/drivers/dd/parallel/makefile b/reactos/drivers/dd/parallel/makefile index 563f5cce215..82cf77616ca 100644 --- a/reactos/drivers/dd/parallel/makefile +++ b/reactos/drivers/dd/parallel/makefile @@ -3,7 +3,7 @@ # OBJECTS= parallel.o ../../../ntoskrnl/ntoskrnl.a -all: parallel.o +all: parallel.sys .phony: all diff --git a/reactos/drivers/dd/parallel/parallel.c b/reactos/drivers/dd/parallel/parallel.c index 7cdcc4d7502..625e2ce02eb 100644 --- a/reactos/drivers/dd/parallel/parallel.c +++ b/reactos/drivers/dd/parallel/parallel.c @@ -12,9 +12,14 @@ /* FUNCTIONS **************************************************************/ #include +#include #include "parallel.h" +#define NDEBUG +#include + + #define LP_B (0x378) #define LP_S (inb_p(LP_B+1)) #define LP_C (LP_B+2) @@ -52,7 +57,7 @@ static void Parallel_putchar(unsigned char ch) if (count==500000) { - printk("printer_putchar(): timed out\n"); + DPRINT("printer_putchar(): timed out\n"); return; } @@ -79,7 +84,7 @@ NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) switch (Stack->MajorFunction) { case IRP_MJ_CREATE: - printk("(Parallel Port Driver) Creating\n"); + DPRINT("(Parallel Port Driver) Creating\n"); Parallel_Reset(); status = STATUS_SUCCESS; break; @@ -89,7 +94,7 @@ NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) break; case IRP_MJ_WRITE: - printk("(Parallel Port Driver) Writing %d bytes\n", + DPRINT("(Parallel Port Driver) Writing %d bytes\n", Stack->Parameters.Write.Length); for (i=0;iParameters.Write.Length;i++) { @@ -110,7 +115,8 @@ NTSTATUS Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) return(status); } -NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) +STDCALL NTSTATUS +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) /* * FUNCTION: Called by the system to initalize the driver * ARGUMENTS: @@ -121,12 +127,20 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { PDEVICE_OBJECT DeviceObject; NTSTATUS ret; + ANSI_STRING ansi_device_name; + UNICODE_STRING device_name; - printk("Parallel Port Driver 0.0.1\n"); + DbgPrint("Parallel Port Driver 0.0.1\n"); - - ret = IoCreateDevice(DriverObject,0,"\\Device\\Parallel", - FILE_DEVICE_PARALLEL_PORT,0,FALSE,&DeviceObject); + RtlInitAnsiString (&ansi_device_name, "\\Device\\Parallel"); + RtlAnsiStringToUnicodeString (&device_name, &ansi_device_name, TRUE); + ret = IoCreateDevice(DriverObject, + 0, + &device_name, + FILE_DEVICE_PARALLEL_PORT, + 0, + FALSE, + &DeviceObject); if (ret!=STATUS_SUCCESS) { return(ret); diff --git a/reactos/drivers/dd/serial/makefile b/reactos/drivers/dd/serial/makefile index 094e6b37caf..fcfd518146e 100644 --- a/reactos/drivers/dd/serial/makefile +++ b/reactos/drivers/dd/serial/makefile @@ -3,7 +3,7 @@ # OBJECTS= serial.o ../../../ntoskrnl/ntoskrnl.a -all: serial.o +all: serial.sys .phony: all diff --git a/reactos/drivers/dd/serial/serial.c b/reactos/drivers/dd/serial/serial.c index 38b7ebcffae..b69e5c2c4b6 100644 --- a/reactos/drivers/dd/serial/serial.c +++ b/reactos/drivers/dd/serial/serial.c @@ -10,6 +10,10 @@ #include #include +#define NDEBUG +#include + + #define COM1 0x3F8 #define COM2 0x2F8 #define COM3 0x3E8 @@ -141,7 +145,8 @@ void testserial(void) }; }; -NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) +STDCALL NTSTATUS +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { DbgPrint("Serial Driver 0.0.2\n"); InitializeSerial();