From 1815855fb618991acbb2009c5a8f97adbc008b8d Mon Sep 17 00:00:00 2001 From: Phillip Susi Date: Tue, 5 Feb 2002 02:30:13 +0000 Subject: [PATCH] Fixed linkage to unbzip2.sys, working again svn path=/trunk/; revision=2601 --- reactos/drivers/dd/ramdrv/makefile | 8 +++++--- reactos/drivers/dd/ramdrv/ramdrv.c | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/reactos/drivers/dd/ramdrv/makefile b/reactos/drivers/dd/ramdrv/makefile index 948b2027a60..b71d6b6c1a3 100644 --- a/reactos/drivers/dd/ramdrv/makefile +++ b/reactos/drivers/dd/ramdrv/makefile @@ -1,6 +1,6 @@ -# $Id: makefile,v 1.6 2002/01/31 20:22:12 phreak Exp $ +# $Id: makefile,v 1.7 2002/02/05 02:30:13 phreak Exp $ -# $Id: makefile,v 1.6 2002/01/31 20:22:12 phreak Exp $ +# $Id: makefile,v 1.7 2002/02/05 02:30:13 phreak Exp $ PATH_TO_TOP = ../../.. @@ -8,7 +8,9 @@ TARGET_TYPE = driver TARGET_NAME = ramdrv -TARGET_OBJECTS = ramdrv.o ../../../dk/nkm/lib/unbzip2.a +TARGET_OBJECTS = ramdrv.o + +TARGET_DDKLIBS = unbzip2.a TARGET_NORC = yes diff --git a/reactos/drivers/dd/ramdrv/ramdrv.c b/reactos/drivers/dd/ramdrv/ramdrv.c index 8deea4402d2..386678fcffa 100644 --- a/reactos/drivers/dd/ramdrv/ramdrv.c +++ b/reactos/drivers/dd/ramdrv/ramdrv.c @@ -55,6 +55,7 @@ NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, void *tbuff; unsigned int dstlen = 1024 * 1440; FILE_STANDARD_INFORMATION finfo; + DWORD err; DbgPrint("Ramdisk driver\n"); @@ -169,15 +170,16 @@ NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, DPRINT( "Failed to read floppy\n" ); goto cleantbuff; } - DPRINT( "Read in %d bytes, decompressing now\n", iosb.Information ); - asm( "int3" ); - BZ2_bzBuffToBuffDecompress( devext->Buffer, - &dstlen, - tbuff, - iosb.Information, - 1, - 0 ); - DPRINT( "Decompressed\n" ); + DbgPrint( "RAMDRV: Read in %d bytes, decompressing now\n", iosb.Information ); + err = BZ2_bzBuffToBuffDecompress( devext->Buffer, + &dstlen, + tbuff, + iosb.Information, + 1, + 0 ); + if( err == 0 ) + DbgPrint( "RAMDRV: Image Decompressed\n"); + else DbgPrint( "RAMDRV: Failed to decomparess image, error: %d\n", err ); ExFreePool( tbuff ); NtClose( file ); NtClose( event );