Changeset 366


Ignore:
Timestamp:
Sep 20, 2018, 7:03:37 PM (7 years ago)
Author:
Valery V. Sedletski
Message:

cachef32.exe: Allow to load successfully if UUNIFAT/UFAT32 is missing, avoid a trap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/util/cachef32.c

    r365 r366  
    5656int remount_all(void);
    5757
    58 BOOL (*pLoadTranslateTable)(BOOL fSilent, UCHAR ucSource);
     58BOOL (*pLoadTranslateTable)(BOOL fSilent, UCHAR ucSource) = 0;
    5959   
    60 void (*pbdrv_init)(void);
    61 BlockDriverState *(*pbdrv_new)(const char *device_name);
    62 BlockDriver *(*pbdrv_find_format)(const char *format_name);
    63 void (*pbdrv_delete)(BlockDriverState *bs);
     60void (*pbdrv_init)(void) = 0;
     61BlockDriverState *(*pbdrv_new)(const char *device_name) = 0;
     62BlockDriver *(*pbdrv_find_format)(const char *format_name) = 0;
     63void (*pbdrv_delete)(BlockDriverState *bs) = 0;
    6464int (*pbdrv_open2)(BlockDriverState *bs, const char *filename, int flags,
    65                    BlockDriver *drv);
     65                   BlockDriver *drv) = 0;
    6666int (*pbdrv_pread)(BlockDriverState *bs, int64_t offset,
    67                    void *buf, int count1);
     67                   void *buf, int count1) = 0;
    6868int (*pbdrv_pwrite)(BlockDriverState *bs, int64_t offset,
    69                     void *buf, int count1);
     69                    void *buf, int count1) = 0;
    7070
    7171HMODULE   hMod = 0;
     
    119119   //ProcessFsTab(FALSE);
    120120   //return 0;
    121    
     121
    122122   rc = DosFSCtl( rgFirstInfo, sizeof( rgFirstInfo ), &ulDataSize,
    123123                  NULL, 0, &ulParmSize,
     
    713713      printf("FAT32: Utility DLL not found (%s does not load).\n", rgData);
    714714      printf("FAT32: No UNICODE translate table loaded!\n");
    715       return;
     715      hMod = 0;
    716716      }
    717717   rc = DosQueryProcAddr(hMod, 0L,
     
    720720      {
    721721      printf("FAT32: ERROR: Could not find address of LoadTranslateTable.\n");
    722       return;
     722      pLoadTranslateTable = NULL;
    723723      }
    724724
     
    974974          }
    975975
    976    if ( fForeGround && (*pLoadTranslateTable)(fSilent, TRUE))
     976   if ( fForeGround && pLoadTranslateTable && (*pLoadTranslateTable)(fSilent, TRUE))
    977977          fSetParms = TRUE;
    978978
Note: See TracChangeset for help on using the changeset viewer.