forked from FreeApophis/TrueCrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3e7058
commit f9b325a
Showing
80 changed files
with
2,071 additions
and
1,608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
/* DeviceIoControl values. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "tcdefs.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
extern char szDriverPassword[4][MAX_PASSWORD + 1]; | ||
extern int nDriverPasswordLen[4]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#define HAS_ARGUMENT 1 | ||
#define HAS_NO_ARGUMENT !HAS_ARGUMENT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
#include "combo.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
|
||
/* Everything below this line is automatically updated by the -mkproto-tool- */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
#include "crc.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
extern unsigned long crc_32_tab[]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
#include "crypto.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
|
||
// User text input limits | ||
|
@@ -30,6 +34,7 @@ | |
// PKCS5 PRF hash algorithm ID | ||
#define SHA1 1 | ||
#define RIPEMD160 2 | ||
#define LAST_PRF_ID 2 // Last PRF used for volume encryption | ||
|
||
/* The encryption algorithm ID */ | ||
#define NONE 0 | ||
|
@@ -59,9 +64,9 @@ | |
#include "blowfish.h" | ||
#include "aes.h" | ||
#include "idea.h" | ||
#include "sha.h" | ||
#include "sha1.h" | ||
#include "cast.h" | ||
#include "sha1.h" | ||
#include "rmd160.h" | ||
|
||
/* _cdecl is needed here because the device driver defaults to stdcall */ | ||
typedef void (_cdecl * sector_func) (unsigned long *, unsigned __int64, unsigned long, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
/* WARNING: The code for unmounting volumes is ugly for all Windows versions; | ||
becarefull what you change here as there might be unintended side effects | ||
|
@@ -31,8 +35,8 @@ UnmountAllVolumes (HWND hwndDlg, DWORD * os_error, int *err) | |
{ | ||
MOUNT_LIST_STRUCT driver; | ||
DWORD dwResult; | ||
BOOL bResult, bOK = TRUE; | ||
int i; | ||
BOOL bResult; | ||
int i, nMounted = 0; | ||
|
||
*os_error = 0; | ||
*err = 0; | ||
|
@@ -48,20 +52,27 @@ UnmountAllVolumes (HWND hwndDlg, DWORD * os_error, int *err) | |
} | ||
|
||
for (i = 0; i < 26; i++) | ||
if (driver.ulMountedDrives & 1 << i) nMounted++; | ||
|
||
// Dismount is tried in multiple rounds to ensure dismount of nested containers | ||
while (driver.ulMountedDrives != 0 && nMounted--) | ||
{ | ||
if ((driver.ulMountedDrives & 1 << i)) | ||
for (i = 0; i < 26; i++) | ||
{ | ||
UnmountVolume (i, os_error, err); | ||
if (driver.ulMountedDrives & 1 << i) | ||
{ | ||
UnmountVolume (i, os_error, err); | ||
|
||
if (*err != 0) | ||
bOK = FALSE; | ||
if (*err == 0) | ||
driver.ulMountedDrives &= ~(1 << i); | ||
|
||
if (*err != 0 && *err == ERR_OS_ERROR) | ||
handleWin32Error (hwndDlg); | ||
if (*err != 0 && *err == ERR_OS_ERROR) | ||
handleWin32Error (hwndDlg); | ||
} | ||
} | ||
} | ||
|
||
return bOK; | ||
return driver.ulMountedDrives == 0; | ||
} | ||
|
||
BOOL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
/* Everything below this line is automatically updated by the -mkproto-tool- */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#define IDC_ABOUT 0x7fff /* ID for AboutBox on system menu in wm_user | ||
range */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
#include "endian.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#define mputLong(memPtr,data) \ | ||
*memPtr++ = ( unsigned char ) ( ( ( data ) >> 24 ) & 0xFF ), \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
#include "TCdefs.h" | ||
|
||
#include "crypto.h" | ||
#include "random.h" | ||
#include "format.h" | ||
#include "fat.h" | ||
#include "progress.h" | ||
|
||
|
||
#include <time.h> | ||
|
||
#define WRITE_BUF_SIZE 65536 | ||
|
||
void | ||
GetFatParams (fatparams * ft) | ||
|
@@ -236,47 +239,17 @@ PutFSInfo (unsigned char *sector) | |
sector[508+0]=0x00; | ||
} | ||
|
||
BOOL | ||
WriteSector (HFILE dev, char *sector, | ||
char *write_buf, int *write_buf_cnt, | ||
__int64 *nSecNo, int *progress, PCRYPTO_INFO cryptoInfo, | ||
int nFrequency, diskio_f write) | ||
{ | ||
(*cryptoInfo->encrypt_sector) ((unsigned long *) sector, | ||
(*nSecNo)++, 1, cryptoInfo->ks, cryptoInfo->iv, cryptoInfo->cipher); | ||
memcpy (write_buf + *write_buf_cnt, sector, SECTOR_SIZE); | ||
(*write_buf_cnt) += SECTOR_SIZE; | ||
|
||
|
||
if (*write_buf_cnt == WRITE_BUF_SIZE) | ||
{ | ||
if ((*write) (dev, write_buf, WRITE_BUF_SIZE) == HFILE_ERROR) | ||
return FALSE; | ||
else | ||
*write_buf_cnt = 0; | ||
} | ||
|
||
if (++(*progress) == nFrequency) | ||
{ | ||
if (UpdateProgressBar (*nSecNo) == TRUE) | ||
return FALSE; | ||
*progress = 0; | ||
} | ||
|
||
return TRUE; | ||
|
||
} | ||
|
||
int | ||
Format (fatparams * ft, HFILE dev, PCRYPTO_INFO cryptoInfo, int nFrequency, diskio_f write, BOOL quickFormat) | ||
FormatFat (fatparams * ft, char *header, HFILE dev, PCRYPTO_INFO cryptoInfo, int nFrequency, diskio_f write, BOOL quickFormat) | ||
{ | ||
int write_buf_cnt = 0; | ||
char sector[SECTOR_SIZE], *write_buf; | ||
int progress = 0; | ||
unsigned __int64 nSecNo = 1; | ||
int x, n; | ||
|
||
if ((*write) (dev, (char *) &ft->header, SECTOR_SIZE) == HFILE_ERROR) | ||
if ((*write) (dev, header, SECTOR_SIZE) == HFILE_ERROR) | ||
return ERR_OS_ERROR; | ||
|
||
write_buf = TCalloc (WRITE_BUF_SIZE); | ||
|
@@ -406,13 +379,14 @@ Format (fatparams * ft, HFILE dev, PCRYPTO_INFO cryptoInfo, int nFrequency, disk | |
cryptoInfo, nFrequency, write) == FALSE) | ||
goto fail; | ||
} | ||
UpdateProgressBar (nSecNo); | ||
} | ||
|
||
else | ||
UpdateProgressBar (ft->num_sectors); | ||
|
||
if (write_buf_cnt != 0 && (*write) (dev, write_buf, write_buf_cnt) == HFILE_ERROR) | ||
goto fail; | ||
|
||
UpdateProgressBar (nSecNo); | ||
|
||
TCfree (write_buf); | ||
return 0; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
/* Copyright (C) 2004 TrueCrypt Foundation | ||
This product uses components written by Paul Le Roux <[email protected]> */ | ||
/* The source code contained in this file has been derived from the source code | ||
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and | ||
additions to that source code contained in this file are Copyright (c) 2004 | ||
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified | ||
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation | ||
release. Please see the file license.txt for full license details. */ | ||
|
||
typedef struct fatparams_t | ||
{ | ||
char volume_name[11]; | ||
int num_sectors; /* total number of sectors */ | ||
unsigned int num_sectors; /* total number of sectors */ | ||
int cluster_count; /* number of clusters */ | ||
int size_root_dir; /* size of the root directory in bytes */ | ||
int size_fat; /* size of FAT */ | ||
|
@@ -22,7 +26,6 @@ typedef struct fatparams_t | |
int heads; | ||
int secs_track; | ||
|
||
char header[SECTOR_SIZE]; | ||
} fatparams; | ||
|
||
|
||
|
@@ -60,5 +63,4 @@ struct msdos_boot_sector | |
|
||
void GetFatParams ( fatparams *ft ); | ||
void PutBoot ( fatparams *ft , unsigned char *boot ); | ||
BOOL WriteSector ( HFILE dev , char *sector , char *write_buf , int *write_buf_cnt , __int64 *nSecNo , int *progress , PCRYPTO_INFO cryptoInfo , int nFrequency , diskio_f write ); | ||
int Format (fatparams * ft, HFILE dev, PCRYPTO_INFO cryptoInfo, int nFrequency, diskio_f write, BOOL quickFormat); | ||
int FormatFat (fatparams * ft, char * header, HFILE dev, PCRYPTO_INFO cryptoInfo, int nFrequency, diskio_f write, BOOL quickFormat); |
Oops, something went wrong.