Fixed linkage to unbzip2.sys, working again

svn path=/trunk/; revision=2601
This commit is contained in:
Phillip Susi 2002-02-05 02:30:13 +00:00
parent 2a7825f502
commit 1815855fb6
2 changed files with 16 additions and 12 deletions

View file

@ -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

View file

@ -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 );