mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-19 17:35:10 -04:00
[iso] update libcdio to latest
* Also remove MSG_176 from English version * Also perform additional cleanup and remove a Clang warning * Closes #224
This commit is contained in:
parent
f97f60d55a
commit
fcf16fed25
8 changed files with 338 additions and 223 deletions
|
@ -11,7 +11,10 @@ s/[ \t]*$//
|
||||||
|
|
||||||
# remove the UI controls for "en-US" as they are just here for translators
|
# remove the UI controls for "en-US" as they are just here for translators
|
||||||
# 1,300 means we only do this for the the first 300 lines
|
# 1,300 means we only do this for the the first 300 lines
|
||||||
1,300 {/g IDD_DIALOG/,/g IDD_MESSAGES/{/g IDD_MESSAGES/!d}}
|
1,300 {/^g IDD_DIALOG/,/^g IDD_MESSAGES/{/^g IDD_MESSAGES/!d}}
|
||||||
|
|
||||||
|
# also remove the "translated by" line for English
|
||||||
|
1,500{/^t MSG_176/d}
|
||||||
|
|
||||||
# output file *MUST* be CR/LF
|
# output file *MUST* be CR/LF
|
||||||
s/$/\r/
|
s/$/\r/
|
|
@ -367,7 +367,6 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
||||||
// Debug temp vars
|
// Debug temp vars
|
||||||
ULONGLONG FatNeeded, ClusterCount;
|
ULONGLONG FatNeeded, ClusterCount;
|
||||||
|
|
||||||
// TODO: use another lmsg for Large FAT32
|
|
||||||
PrintStatus(0, TRUE, lmprintf(MSG_222, "Large FAT32"));
|
PrintStatus(0, TRUE, lmprintf(MSG_222, "Large FAT32"));
|
||||||
VolumeId = GetVolumeID();
|
VolumeId = GetVolumeID();
|
||||||
|
|
||||||
|
@ -1439,7 +1438,7 @@ DWORD WINAPI FormatThread(LPVOID param)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) {
|
if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) {
|
||||||
// TODO: (v1.4.0) check ISO with EFI only
|
// TODO: Check ISO with EFI only
|
||||||
PrintStatus(0, TRUE, lmprintf(MSG_232));
|
PrintStatus(0, TRUE, lmprintf(MSG_232));
|
||||||
wim_image[0] = drive_name[0];
|
wim_image[0] = drive_name[0];
|
||||||
efi_dst[0] = drive_name[0];
|
efi_dst[0] = drive_name[0];
|
||||||
|
|
|
@ -1048,6 +1048,22 @@ lsn_t iso9660_get_dir_extent(const iso9660_dir_t *p_idr);
|
||||||
*/
|
*/
|
||||||
char *iso9660_get_system_id(const iso9660_pvd_t *p_pvd);
|
char *iso9660_get_system_id(const iso9660_pvd_t *p_pvd);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Return "yup" if any file has Rock-Ridge extensions. Warning: this can
|
||||||
|
be time consuming. On an ISO 9600 image with lots of files but no Rock-Ridge
|
||||||
|
extensions, the entire directory structure will be scanned up to u_file_limit.
|
||||||
|
|
||||||
|
@param p_iso the ISO-9660 file image to get data from
|
||||||
|
|
||||||
|
@param u_file_limit the maximimum number of (non-rock-ridge) files
|
||||||
|
to consider before giving up and returning "dunno".
|
||||||
|
|
||||||
|
"dunno" can also be returned if there was some error encountered
|
||||||
|
such as not being able to allocate memory in processing.
|
||||||
|
|
||||||
|
*/
|
||||||
|
bool_3way_t iso9660_have_rr(iso9660_t *p_iso, uint64_t u_file_limit);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Get the system ID. psz_system_id is set to NULL if there
|
Get the system ID. psz_system_id is set to NULL if there
|
||||||
is some problem in getting this and false is returned.
|
is some problem in getting this and false is returned.
|
||||||
|
|
|
@ -1519,3 +1519,102 @@ iso9660_ifs_is_xa (const iso9660_t * p_iso)
|
||||||
if (!p_iso) return false;
|
if (!p_iso) return false;
|
||||||
return yep == p_iso->b_xa;
|
return yep == p_iso->b_xa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool_3way_t
|
||||||
|
iso_have_rr_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root,
|
||||||
|
char **splitpath, uint64_t *pu_file_limit)
|
||||||
|
{
|
||||||
|
unsigned offset = 0;
|
||||||
|
uint8_t *_dirbuf = NULL;
|
||||||
|
int ret;
|
||||||
|
bool_3way_t have_rr = nope;
|
||||||
|
|
||||||
|
if (!splitpath[0]) return false;
|
||||||
|
|
||||||
|
if (_root->type == _STAT_FILE) return nope;
|
||||||
|
if (*pu_file_limit == 0) return dunno;
|
||||||
|
|
||||||
|
cdio_assert (_root->type == _STAT_DIR);
|
||||||
|
|
||||||
|
_dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE);
|
||||||
|
if (!_dirbuf)
|
||||||
|
{
|
||||||
|
cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE);
|
||||||
|
return dunno;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn, _root->secsize);
|
||||||
|
if (ret!=ISO_BLOCKSIZE*_root->secsize) return false;
|
||||||
|
|
||||||
|
while (offset < (_root->secsize * ISO_BLOCKSIZE))
|
||||||
|
{
|
||||||
|
iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset];
|
||||||
|
iso9660_stat_t *p_stat;
|
||||||
|
|
||||||
|
if (!iso9660_get_dir_len(p_iso9660_dir))
|
||||||
|
{
|
||||||
|
offset++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa,
|
||||||
|
p_iso->u_joliet_level);
|
||||||
|
have_rr = p_stat->rr.b3_rock;
|
||||||
|
if ( have_rr != yep) {
|
||||||
|
have_rr = iso_have_rr_traverse (p_iso, p_stat, &splitpath[1], pu_file_limit);
|
||||||
|
}
|
||||||
|
if (have_rr != nope) {
|
||||||
|
free (_dirbuf);
|
||||||
|
return have_rr;
|
||||||
|
}
|
||||||
|
free(p_stat);
|
||||||
|
|
||||||
|
offset += iso9660_get_dir_len(p_iso9660_dir);
|
||||||
|
*pu_file_limit = (*pu_file_limit)-1;
|
||||||
|
if ((*pu_file_limit) == 0) {
|
||||||
|
free (_dirbuf);
|
||||||
|
return dunno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE));
|
||||||
|
|
||||||
|
/* not found */
|
||||||
|
free (_dirbuf);
|
||||||
|
return nope;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Return "yup" if any file has Rock-Ridge extensions. Warning: this can
|
||||||
|
be time consuming. On an ISO 9600 image with lots of files but no Rock-Ridge
|
||||||
|
extensions, the entire directory structure will be scanned up to u_file_limit.
|
||||||
|
|
||||||
|
@param p_iso the ISO-9660 file image to get data from
|
||||||
|
|
||||||
|
@param u_file_limit the maximimum number of (non-rock-ridge) files
|
||||||
|
to consider before giving up and returning "dunno".
|
||||||
|
|
||||||
|
"dunno" can also be returned if there was some error encountered
|
||||||
|
such as not being able to allocate memory in processing.
|
||||||
|
|
||||||
|
*/
|
||||||
|
extern bool_3way_t
|
||||||
|
iso9660_have_rr(iso9660_t *p_iso, uint64_t u_file_limit)
|
||||||
|
{
|
||||||
|
iso9660_stat_t *p_root;
|
||||||
|
char *p_psz_splitpath[2] = {strdup("/"), strdup("")};
|
||||||
|
bool_3way_t is_rr = nope;
|
||||||
|
|
||||||
|
if (!p_iso) return false;
|
||||||
|
|
||||||
|
p_root = _ifs_stat_root (p_iso);
|
||||||
|
if (!p_root) return dunno;
|
||||||
|
|
||||||
|
if (u_file_limit == 0) u_file_limit = UINT64_MAX;
|
||||||
|
|
||||||
|
is_rr = iso_have_rr_traverse (p_iso, p_root, p_psz_splitpath, &u_file_limit);
|
||||||
|
free(p_root);
|
||||||
|
// _cdio_strfreev (p_psz_splitpath);
|
||||||
|
|
||||||
|
return is_rr;
|
||||||
|
}
|
||||||
|
|
|
@ -246,7 +246,7 @@ void add_dialog_command(int index, loc_cmd* lcmd)
|
||||||
{
|
{
|
||||||
char str[128];
|
char str[128];
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
if ((lcmd == NULL) || (index < 0) || (index >= ARRAYSIZE(loc_dlg))) {
|
if ((lcmd == NULL) || (lcmd->txt[0] == NULL) || (index < 0) || (index >= ARRAYSIZE(loc_dlg))) {
|
||||||
uprintf("localization: invalid parameter for add_dialog_command\n");
|
uprintf("localization: invalid parameter for add_dialog_command\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2099,10 +2099,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
if ( (!get_supported_locales(loc_file))
|
if ( (!get_supported_locales(loc_file))
|
||||||
|| ((selected_locale = ((locale_name == NULL)?get_locale_from_lcid(lcid, TRUE):get_locale_from_name(locale_name, TRUE))) == NULL) ) {
|
|| ((selected_locale = ((locale_name == NULL)?get_locale_from_lcid(lcid, TRUE):get_locale_from_name(locale_name, TRUE))) == NULL) ) {
|
||||||
uprintf("FATAL: Could not access locale!\n");
|
uprintf("FATAL: Could not access locale!\n");
|
||||||
MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit."
|
MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit.", "Fatal error", MB_ICONSTOP);
|
||||||
// TODO: remove this line for release!
|
|
||||||
"\n\nTRANSLATORS: You need to add a 'v 1.0.0' line to your loc file. See the latest 'new_translation.loc'",
|
|
||||||
"Fatal error", MB_ICONSTOP);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_APPWINDOW
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
CAPTION "Rufus v1.4.0.327"
|
CAPTION "Rufus v1.4.0.328"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||||
|
@ -288,8 +288,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,4,0,327
|
FILEVERSION 1,4,0,328
|
||||||
PRODUCTVERSION 1,4,0,327
|
PRODUCTVERSION 1,4,0,328
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -306,13 +306,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "1.4.0.327"
|
VALUE "FileVersion", "1.4.0.328"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus.exe"
|
VALUE "OriginalFilename", "rufus.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "1.4.0.327"
|
VALUE "ProductVersion", "1.4.0.328"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "smart.h"
|
#include "smart.h"
|
||||||
#include "hdd_vs_ufd.h"
|
#include "hdd_vs_ufd.h"
|
||||||
|
|
||||||
|
#if defined(RUFUS_TEST)
|
||||||
/* Helper functions */
|
/* Helper functions */
|
||||||
static uint8_t GetAtaDirection(uint8_t AtaCmd, uint8_t Features) {
|
static uint8_t GetAtaDirection(uint8_t AtaCmd, uint8_t Features) {
|
||||||
// Far from complete -- only the commands we *may* use.
|
// Far from complete -- only the commands we *may* use.
|
||||||
|
@ -352,6 +352,7 @@ BOOL Identify(HANDLE hPhysical)
|
||||||
_aligned_free(idd);
|
_aligned_free(idd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Generic SMART access. Kept for reference, as it doesn't work for USB to ATA/SATA bridges */
|
/* Generic SMART access. Kept for reference, as it doesn't work for USB to ATA/SATA bridges */
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue