Index: /branches/fat32-0.10/src/ufat32/format.c =================================================================== --- /branches/fat32-0.10/src/ufat32/format.c (revision 132) +++ /branches/fat32-0.10/src/ufat32/format.c (revision 133) @@ -148,6 +148,6 @@ ret = write_file ( hDevice, pZeroSect, WriteSize * BytesPerSect, &dwWritten ); - //if ( !ret ) - // die ( "Failed to write", ret ); + if ( !ret ) + die ( "Failed to write", ret ); qBytesWritten += dwWritten; Index: /branches/fat32-0.10/src/ufat32/makefile.wcc =================================================================== --- /branches/fat32-0.10/src/ufat32/makefile.wcc (revision 132) +++ /branches/fat32-0.10/src/ufat32/makefile.wcc (revision 133) @@ -1,8 +1,7 @@ +!include ..\makefile.mk + CC=wcc386 LNK=wlink op q MAPCNV=..\mapsym.awk -_VENDOR=Netlabs -_VERSION=0.10a6 -FILEVER=@$#$(_VENDOR):$(_VERSION)$#@ DESC="UFAT32 Helper DLL, Henk Kelder & Netlabs" DESC2="Fat32Format, standalone version" Index: /branches/fat32-0.10/src/ufat32/os2.c =================================================================== --- /branches/fat32-0.10/src/ufat32/os2.c (revision 132) +++ /branches/fat32-0.10/src/ufat32/os2.c (revision 133) @@ -7,4 +7,5 @@ #include #include +#include #include @@ -302,6 +303,10 @@ ULONG rc = 0; - if ( rc = DosWrite ( hDevice, pData, (ULONG)ulNumBytes, (PULONG)dwWritten ) ) + assert(! (ulNumBytes % 512)); + + if ( rc = DosWrite ( hDevice, pData, (ULONG)ulNumBytes>> 9, (PULONG)dwWritten ) ) ret = FALSE; + + //printf("write_file: ulNumBytes=%lu, rc=%lu\n", ulNumBytes, rc); //printf("write_file: hDevice=%lu, pData=0x%lx, ulNumBytes=%lu, dwWritten=0x%lx\n", @@ -334,5 +339,5 @@ OPEN_FLAGS_FAIL_ON_ERROR | // OPEN_FLAGS_WRITE_THROUGH | OPEN_SHARE_DENYREADWRITE | // OPEN_FLAGS_NO_CACHE | - OPEN_ACCESS_READWRITE | OPEN_FLAGS_DASD, + OPEN_ACCESS_READWRITE | OPEN_FLAGS_DASD, NULL); // peaop2 @@ -354,6 +359,6 @@ if ( rc != 0 || hDevice == 0 ) - die( "Failed to open device - close any files before formatting," - "and make sure you have Admin rights when using fat32format" + die( "Failed to open device - close any files before formatting,\n" + "and make sure you have Admin rights when using fat32format\n" "Are you SURE you're formatting the RIGHT DRIVE!!!", rc );

AltStyle によって変換されたページ (->オリジナル) /