Context Navigation



Ignore:
Timestamp:
Oct 14, 2016, 3:29:13 PM (9 years ago)
Author:
Valery V. Sedletski
Message:

format: Use sector mode for formatting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fat32-0.10/src/ufat32/os2.c

    r129 r133
    77#include <stdarg.h>
    88#include <conio.h>
    9(追記) #include <assert.h> (追記ここまで)
    910#include <string.h>
    1011
    302303 ULONG rc = 0;
    303304
    304 if ( rc = DosWrite ( hDevice, pData, (ULONG)ulNumBytes, (PULONG)dwWritten ) )
    305 assert(! (ulNumBytes % 512));
    306
    307 if ( rc = DosWrite ( hDevice, pData, (ULONG)ulNumBytes >> 9, (PULONG)dwWritten ) )
    305308 ret = FALSE;
    309(追記) (追記ここまで)
    310(追記) //printf("write_file: ulNumBytes=%lu, rc=%lu\n", ulNumBytes, rc); (追記ここまで)
    306311
    307312 //printf("write_file: hDevice=%lu, pData=0x%lx, ulNumBytes=%lu, dwWritten=0x%lx\n",
    334339 OPEN_FLAGS_FAIL_ON_ERROR | // OPEN_FLAGS_WRITE_THROUGH |
    335340 OPEN_SHARE_DENYREADWRITE | // OPEN_FLAGS_NO_CACHE |
    336 OPEN_ACCESS_READWRITE (削除) (削除ここまで)| OPEN_FLAGS_DASD,
    341 OPEN_ACCESS_READWRITE (追記) (追記ここまで)| OPEN_FLAGS_DASD,
    337342 NULL); // peaop2
    338343
    354359
    355360 if ( rc != 0 || hDevice == 0 )
    356 die( "Failed to open device - close any files before formatting,(削除) (削除ここまで)"
    357 "and make sure you have Admin rights when using fat32format(削除) (削除ここまで)"
    361 die( "Failed to open device - close any files before formatting,(追記) \n (追記ここまで)"
    362 "and make sure you have Admin rights when using fat32format(追記) \n (追記ここまで)"
    358363 "Are you SURE you're formatting the RIGHT DRIVE!!!", rc );
    359364
Note: See TracChangeset for help on using the changeset viewer.

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