mirror of
https://github.com/pbatard/rufus.git
synced 2024-09-19 11:08:50 -04:00
Merge branch 'master' into localization
This commit is contained in:
commit
0fa8c2174c
15 changed files with 686 additions and 635 deletions
20
configure
vendored
20
configure
vendored
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68 for rufus 1.3.4.
|
||||
# Generated by GNU Autoconf 2.68 for rufus 1.4.0.
|
||||
#
|
||||
# Report bugs to <https://github.com/pbatard/rufus/issues>.
|
||||
#
|
||||
|
@ -559,8 +559,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='rufus'
|
||||
PACKAGE_TARNAME='rufus'
|
||||
PACKAGE_VERSION='1.3.4'
|
||||
PACKAGE_STRING='rufus 1.3.4'
|
||||
PACKAGE_VERSION='1.4.0'
|
||||
PACKAGE_STRING='rufus 1.4.0'
|
||||
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
|
||||
PACKAGE_URL='http://rufus.akeo.ie'
|
||||
|
||||
|
@ -1201,7 +1201,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures rufus 1.3.4 to adapt to many kinds of systems.
|
||||
\`configure' configures rufus 1.4.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
@ -1267,7 +1267,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of rufus 1.3.4:";;
|
||||
short | recursive ) echo "Configuration of rufus 1.4.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
@ -1355,7 +1355,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
rufus configure 1.3.4
|
||||
rufus configure 1.4.0
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
@ -1410,7 +1410,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by rufus $as_me 1.3.4, which was
|
||||
It was created by rufus $as_me 1.4.0, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
@ -2225,7 +2225,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='rufus'
|
||||
VERSION='1.3.4'
|
||||
VERSION='1.4.0'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
@ -4067,7 +4067,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by rufus $as_me 1.3.4, which was
|
||||
This file was extended by rufus $as_me 1.4.0, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
@ -4121,7 +4121,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
rufus config.status 1.3.4
|
||||
rufus config.status 1.4.0
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AC_INIT([rufus], [1.3.4], [https://github.com/pbatard/rufus/issues], [rufus], [http://rufus.akeo.ie])
|
||||
AC_INIT([rufus], [1.4.0], [https://github.com/pbatard/rufus/issues], [rufus], [http://rufus.akeo.ie])
|
||||
AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
|
||||
AC_CONFIG_SRCDIR([src/rufus.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
|
24
src/iso.c
24
src/iso.c
|
@ -54,6 +54,7 @@ void cdio_destroy (CdIo_t* p_cdio) {}
|
|||
|
||||
RUFUS_ISO_REPORT iso_report;
|
||||
int64_t iso_blocking_status = -1;
|
||||
BOOL enable_joliet = TRUE, enable_rockridge = TRUE;
|
||||
#define ISO_BLOCKING(x) do {x; iso_blocking_status++; } while(0)
|
||||
static const char* psz_extract_dir;
|
||||
static const char* bootmgr_efi_name = "bootmgr.efi";
|
||||
|
@ -327,11 +328,13 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path)
|
|||
if ( (strcmp(p_statbuf->filename, ".") == 0)
|
||||
|| (strcmp(p_statbuf->filename, "..") == 0) )
|
||||
continue;
|
||||
// Rock Ridge requires an exception (Can't people just use Joliet?)
|
||||
if (p_statbuf->rr.b3_rock != yep) {
|
||||
iso9660_name_translate_ext(p_statbuf->filename, psz_basename, i_joliet_level);
|
||||
} else {
|
||||
// Rock Ridge requires an exception
|
||||
if ((p_statbuf->rr.b3_rock == yep) && enable_rockridge) {
|
||||
safe_strcpy(psz_basename, sizeof(psz_fullpath)-i_length-1, p_statbuf->filename);
|
||||
if (safe_strlen(p_statbuf->filename) > 64)
|
||||
iso_report.has_long_filename = TRUE;
|
||||
} else {
|
||||
iso9660_name_translate_ext(p_statbuf->filename, psz_basename, i_joliet_level);
|
||||
}
|
||||
if (p_statbuf->type == _STAT_DIR) {
|
||||
if (!scan_only) _mkdirU(psz_fullpath);
|
||||
|
@ -418,6 +421,7 @@ BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan)
|
|||
char path[64];
|
||||
const char* basedir[] = { "i386", "minint" };
|
||||
const char* tmp_sif = ".\\txtsetup.sif~";
|
||||
iso_extension_mask_t iso_extension_mask = ISO_EXTENSION_ALL;
|
||||
|
||||
if ((src_iso == NULL) || (dest_dir == NULL))
|
||||
return FALSE;
|
||||
|
@ -471,7 +475,17 @@ BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan)
|
|||
goto out;
|
||||
|
||||
try_iso:
|
||||
p_iso = iso9660_open_ext(src_iso, ISO_EXTENSION_ALL);
|
||||
// Perform our first scan with Joliet disabled (if Rock Ridge is enabled), so that we can find if
|
||||
// there exists a Rock Ridge file with a name > 64 chars. If that is the case (has_long_filename)
|
||||
// then we also disable Joliet during the extract phase.
|
||||
if ((!enable_joliet) || (scan_only && enable_rockridge) || (iso_report.has_long_filename && enable_rockridge)) {
|
||||
iso_extension_mask &= ~ISO_EXTENSION_JOLIET;
|
||||
}
|
||||
if (!enable_rockridge) {
|
||||
iso_extension_mask &= ~ISO_EXTENSION_ROCK_RIDGE;
|
||||
}
|
||||
|
||||
p_iso = iso9660_open_ext(src_iso, iso_extension_mask);
|
||||
if (p_iso == NULL) {
|
||||
uprintf("Unable to open image '%s'.\n", src_iso);
|
||||
goto out;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* -*- c -*-
|
||||
|
||||
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012 Rocky Bernstein
|
||||
<rocky@gnu.org>
|
||||
Copyright (C) 2005-2006, 2008-2013 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -427,6 +426,14 @@ LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MAX_DEVICE_DRIVER, "please use
|
|||
*/
|
||||
const char * cdio_get_driver_name (const CdIo_t *p_cdio);
|
||||
|
||||
/**
|
||||
Return a string containing the name of the driver in use from the driver_id.
|
||||
if CdIo is NULL (we haven't initialized a specific device driver),
|
||||
then return NULL.
|
||||
*/
|
||||
const char * cdio_get_driver_name_from_id (driver_id_t driver_id);
|
||||
|
||||
|
||||
/**
|
||||
Get the driver id.
|
||||
if CdIo_t is NULL (we haven't initialized a specific device driver),
|
||||
|
|
|
@ -63,6 +63,14 @@ extern cdio_log_level_t cdio_loglevel_default;
|
|||
typedef void (*cdio_log_handler_t) (cdio_log_level_t level,
|
||||
const char message[]);
|
||||
|
||||
/**
|
||||
* The initial or default log handler in effect.
|
||||
*
|
||||
* @param level The log level.
|
||||
* @param message The log message.
|
||||
*/
|
||||
extern void cdio_default_log_handler(cdio_log_level_t level, const char message[]);
|
||||
|
||||
/**
|
||||
* Set a custom log handler for libcdio. The return value is the log
|
||||
* handler being replaced. If the provided parameter is NULL, then
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2004, 2005, 2006, 2008, 2009, 2012
|
||||
Copyright (C) 2004-2006, 2008-2009, 2012-2013
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -61,7 +61,7 @@ extern "C" {
|
|||
track_t i_first_track; /**< The starting track number. */
|
||||
track_t i_tracks; /**< The number of tracks. */
|
||||
|
||||
uint8_t i_joliet_level; /**< 0 = no Joliet extensions.
|
||||
uint8_t u_joliet_level; /**< 0 = no Joliet extensions.
|
||||
1-3: Joliet level. */
|
||||
iso9660_pvd_t pvd;
|
||||
iso9660_svd_t svd;
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN;
|
||||
|
||||
static void
|
||||
default_cdio_log_handler(cdio_log_level_t level, const char message[])
|
||||
extern void
|
||||
cdio_default_log_handler(cdio_log_level_t level, const char message[])
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ default_cdio_log_handler(cdio_log_level_t level, const char message[])
|
|||
fflush (stdout);
|
||||
}
|
||||
|
||||
static cdio_log_handler_t _handler = default_cdio_log_handler;
|
||||
cdio_log_handler_t _handler = cdio_default_log_handler;
|
||||
|
||||
cdio_log_handler_t
|
||||
cdio_log_set_handler(cdio_log_handler_t new_handler)
|
||||
|
|
|
@ -136,9 +136,12 @@ cdio_read_audio_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn,
|
|||
|
||||
if (0 == i_blocks) return DRIVER_OP_SUCCESS;
|
||||
|
||||
if (p_cdio->op.read_audio_sectors)
|
||||
if (p_cdio->op.read_audio_sectors) {
|
||||
cdio_debug("Reading audio sector(s) lsn %u for %d blocks",
|
||||
i_lsn, i_blocks);
|
||||
return (p_cdio->op.read_audio_sectors) (p_cdio->env, p_buf, i_lsn,
|
||||
i_blocks);
|
||||
}
|
||||
return DRIVER_OP_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -154,9 +157,12 @@ cdio_read_data_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn,
|
|||
|
||||
if (0 == i_blocks) return DRIVER_OP_SUCCESS;
|
||||
|
||||
if (p_cdio->op.read_data_sectors)
|
||||
if (p_cdio->op.read_data_sectors) {
|
||||
cdio_debug("Reading data sector(s) lsn, %u blocksize %d, for %d blocks",
|
||||
i_lsn, i_blocksize, i_blocks);
|
||||
return p_cdio->op.read_data_sectors (p_cdio->env, p_buf, i_lsn,
|
||||
i_blocksize, i_blocks);
|
||||
}
|
||||
return DRIVER_OP_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -177,6 +183,7 @@ cdio_read_mode1_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn,
|
|||
|
||||
check_lsn(i_lsn);
|
||||
if (p_cdio->op.read_mode1_sector) {
|
||||
cdio_debug("Reading mode 1 secto lsn %u", i_lsn);
|
||||
return p_cdio->op.read_mode1_sector(p_cdio->env, p_buf, i_lsn, b_form2);
|
||||
} else if (p_cdio->op.lseek && p_cdio->op.read) {
|
||||
char buf[M2RAW_SECTOR_SIZE] = { 0, };
|
||||
|
|
|
@ -144,7 +144,7 @@ cdio_get_joliet_level(const CdIo_t *p_cdio)
|
|||
{
|
||||
const generic_img_private_t *p_env
|
||||
= (generic_img_private_t *) (p_cdio->env);
|
||||
return p_env->i_joliet_level;
|
||||
return p_env->u_joliet_level;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2003-2009, 2013 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -432,14 +431,14 @@ iso9660_name_translate(const char *psz_oldname, char *psz_newname)
|
|||
@param psz_oldname the ISO-9660 filename to be translated.
|
||||
@param psz_newname returned string. The caller allocates this and
|
||||
it should be at least the size of psz_oldname.
|
||||
@param i_joliet_level 0 if not using Joliet Extension. Otherwise the
|
||||
@param u_joliet_level 0 if not using Joliet Extension. Otherwise the
|
||||
Joliet level.
|
||||
@return length of the translated string is returned. It will be no greater
|
||||
than the length of psz_oldname.
|
||||
*/
|
||||
int
|
||||
iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname,
|
||||
uint8_t i_joliet_level)
|
||||
uint8_t u_joliet_level)
|
||||
{
|
||||
int len = strlen(psz_oldname);
|
||||
int i;
|
||||
|
@ -451,7 +450,7 @@ iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname,
|
|||
break;
|
||||
|
||||
/* Lower case, unless we have Joliet extensions. */
|
||||
if (!i_joliet_level && isupper(c)) c = tolower(c);
|
||||
if (!u_joliet_level && isupper(c)) c = tolower(c);
|
||||
|
||||
/* Drop trailing '.;1' (ISO 9660:1988 7.5.1 requires period) */
|
||||
if (c == '.' && i == len - 3
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2003-2008, 2011-2013 Rocky Bernstein <rocky@gnu.org>
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -54,32 +53,30 @@
|
|||
#include "_cdio_stdio.h"
|
||||
#include "cdio_private.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.47 2008/04/18 16:02:09 karl Exp $";
|
||||
|
||||
/* Implementation of iso9660_t type */
|
||||
/** Implementation of iso9660_t type */
|
||||
struct _iso9660_s {
|
||||
CdioDataSource_t *stream; /* Stream pointer */
|
||||
bool_3way_t b_xa; /* true if has XA attributes. */
|
||||
bool_3way_t b_mode2; /* true if has mode 2, false for mode 1. */
|
||||
uint8_t i_joliet_level; /* 0 = no Joliet extensions.
|
||||
CdioDataSource_t *stream; /**< Stream pointer */
|
||||
bool_3way_t b_xa; /**< true if has XA attributes. */
|
||||
bool_3way_t b_mode2; /**< true if has mode 2, false for mode 1. */
|
||||
uint8_t u_joliet_level; /**< 0 = no Joliet extensions.
|
||||
1-3: Joliet level. */
|
||||
iso9660_pvd_t pvd;
|
||||
iso9660_svd_t svd;
|
||||
iso_extension_mask_t iso_extension_mask; /* What extensions we
|
||||
iso_extension_mask_t iso_extension_mask; /**< What extensions we
|
||||
tolerate. */
|
||||
uint32_t i_datastart; /* Usually 0 when i_framesize is ISO_BLOCKSIZE.
|
||||
uint32_t i_datastart; /**< Usually 0 when i_framesize is ISO_BLOCKSIZE.
|
||||
This is the normal condition. But in a fuzzy
|
||||
read we may be reading a CD-image
|
||||
and not a true ISO 9660 image this might be
|
||||
CDIO_CD_SYNC_SIZE
|
||||
*/
|
||||
uint32_t i_framesize; /* Usually ISO_BLOCKSIZE (2048), but in a
|
||||
uint32_t i_framesize; /**< Usually ISO_BLOCKSIZE (2048), but in a
|
||||
fuzzy read, we may be reading a CD-image
|
||||
and not a true ISO 9660 image this might
|
||||
be CDIO_CD_FRAMESIZE_RAW (2352) or
|
||||
M2RAW_SECTOR_SIZE (2336).
|
||||
*/
|
||||
int i_fuzzy_offset; /* Adjustment in bytes to make ISO_STANDARD_ID
|
||||
int i_fuzzy_offset; /**< Adjustment in bytes to make ISO_STANDARD_ID
|
||||
("CD001") come out as ISO_PVD_SECTOR
|
||||
(frame 16). Normally this should be 0
|
||||
for an ISO 9660 image, but if one is
|
||||
|
@ -89,6 +86,8 @@ struct _iso9660_s {
|
|||
filesystem inside that it may be
|
||||
different.
|
||||
*/
|
||||
bool b_have_superblock; /**< Superblock has been read in? */
|
||||
|
||||
};
|
||||
|
||||
static long int iso9660_seek_read_framesize (const iso9660_t *p_iso,
|
||||
|
@ -168,7 +167,6 @@ iso9660_open_ext_private (const char *psz_path,
|
|||
uint16_t i_fuzz, bool b_fuzzy)
|
||||
{
|
||||
iso9660_t *p_iso = (iso9660_t *) calloc(1, sizeof(iso9660_t)) ;
|
||||
bool b_have_superblock;
|
||||
|
||||
if (!p_iso) return NULL;
|
||||
|
||||
|
@ -178,11 +176,11 @@ iso9660_open_ext_private (const char *psz_path,
|
|||
|
||||
p_iso->i_framesize = ISO_BLOCKSIZE;
|
||||
|
||||
b_have_superblock = (b_fuzzy)
|
||||
p_iso->b_have_superblock = (b_fuzzy)
|
||||
? iso9660_ifs_fuzzy_read_superblock(p_iso, iso_extension_mask, i_fuzz)
|
||||
: iso9660_ifs_read_superblock(p_iso, iso_extension_mask) ;
|
||||
|
||||
if ( ! b_have_superblock ) goto error;
|
||||
if ( ! p_iso->b_have_superblock ) goto error;
|
||||
|
||||
/* Determine if image has XA attributes. */
|
||||
|
||||
|
@ -298,7 +296,7 @@ get_member_id(iso9660_t *p_iso, cdio_utf8_t **p_psz_member_id,
|
|||
return false;
|
||||
}
|
||||
#ifdef HAVE_JOLIET
|
||||
if (p_iso->i_joliet_level) {
|
||||
if (p_iso->u_joliet_level) {
|
||||
/* Translate USC-2 string from Secondary Volume Descriptor */
|
||||
if (cdio_charset_to_utf8(svd_member, max_size,
|
||||
p_psz_member_id, "UCS-2BE")) {
|
||||
|
@ -364,7 +362,7 @@ iso9660_ifs_get_application_id(iso9660_t *p_iso,
|
|||
uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso)
|
||||
{
|
||||
if (!p_iso) return 0;
|
||||
return p_iso->i_joliet_level;
|
||||
return p_iso->u_joliet_level;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -476,7 +474,7 @@ iso9660_ifs_read_superblock (iso9660_t *p_iso,
|
|||
if (!p_iso || !iso9660_ifs_read_pvd(p_iso, &(p_iso->pvd)))
|
||||
return false;
|
||||
|
||||
p_iso->i_joliet_level = 0;
|
||||
p_iso->u_joliet_level = 0;
|
||||
|
||||
/* There may be multiple Secondary Volume Descriptors (eg. El Torito + Joliet) */
|
||||
for (i=1; (0 != iso9660_iso_seek_read (p_iso, &p_svd, ISO_PVD_SECTOR+i, 1)); i++) {
|
||||
|
@ -484,28 +482,28 @@ iso9660_ifs_read_superblock (iso9660_t *p_iso,
|
|||
break;
|
||||
if ( ISO_VD_SUPPLEMENTARY == from_711(p_svd.type) ) {
|
||||
/* We're only interested in Joliet => make sure the SVD isn't overwritten */
|
||||
if (p_iso->i_joliet_level == 0)
|
||||
if (p_iso->u_joliet_level == 0)
|
||||
memcpy(&(p_iso->svd), &p_svd, sizeof(iso9660_svd_t));
|
||||
if (p_svd.escape_sequences[0] == 0x25
|
||||
&& p_svd.escape_sequences[1] == 0x2f) {
|
||||
switch (p_svd.escape_sequences[2]) {
|
||||
case 0x40:
|
||||
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1)
|
||||
p_iso->i_joliet_level = 1;
|
||||
p_iso->u_joliet_level = 1;
|
||||
break;
|
||||
case 0x43:
|
||||
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2)
|
||||
p_iso->i_joliet_level = 2;
|
||||
p_iso->u_joliet_level = 2;
|
||||
break;
|
||||
case 0x45:
|
||||
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3)
|
||||
p_iso->i_joliet_level = 3;
|
||||
p_iso->u_joliet_level = 3;
|
||||
break;
|
||||
default:
|
||||
cdio_info("Supplementary Volume Descriptor found, but not Joliet");
|
||||
}
|
||||
if (p_iso->i_joliet_level > 0) {
|
||||
cdio_info("Found Extension: Joliet Level %d", p_iso->i_joliet_level);
|
||||
if (p_iso->u_joliet_level > 0) {
|
||||
cdio_info("Found Extension: Joliet Level %d", p_iso->u_joliet_level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -631,7 +629,7 @@ iso9660_fs_read_superblock (CdIo_t *p_cdio,
|
|||
if ( !iso9660_fs_read_pvd(p_cdio, p_pvd) )
|
||||
return false;
|
||||
|
||||
p_env->i_joliet_level = 0;
|
||||
p_env->u_joliet_level = 0;
|
||||
|
||||
driver_return =
|
||||
cdio_read_data_sectors ( p_cdio, buf, ISO_PVD_SECTOR+1, ISO_BLOCKSIZE,
|
||||
|
@ -651,22 +649,22 @@ iso9660_fs_read_superblock (CdIo_t *p_cdio,
|
|||
switch (p_svd->escape_sequences[2]) {
|
||||
case 0x40:
|
||||
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1)
|
||||
p_env->i_joliet_level = 1;
|
||||
p_env->u_joliet_level = 1;
|
||||
break;
|
||||
case 0x43:
|
||||
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2)
|
||||
p_env->i_joliet_level = 2;
|
||||
p_env->u_joliet_level = 2;
|
||||
break;
|
||||
case 0x45:
|
||||
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3)
|
||||
p_env->i_joliet_level = 3;
|
||||
p_env->u_joliet_level = 3;
|
||||
break;
|
||||
default:
|
||||
cdio_info("Supplementary Volume Descriptor found, but not Joliet");
|
||||
}
|
||||
if (p_env->i_joliet_level > 0) {
|
||||
if (p_env->u_joliet_level > 0) {
|
||||
cdio_info("Found Extension: Joliet Level %d",
|
||||
p_env->i_joliet_level);
|
||||
p_env->u_joliet_level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -688,8 +686,8 @@ iso9660_seek_read_framesize (const iso9660_t *p_iso, void *ptr,
|
|||
int64_t i_byte_offset;
|
||||
|
||||
if (!p_iso) return 0;
|
||||
i_byte_offset = (start * p_iso->i_framesize) + p_iso->i_fuzzy_offset
|
||||
+ p_iso->i_datastart;
|
||||
i_byte_offset = (start * (int64_t)(p_iso->i_framesize))
|
||||
+ p_iso->i_fuzzy_offset + p_iso->i_datastart;
|
||||
|
||||
ret = cdio_stream_seek (p_iso->stream, i_byte_offset, SEEK_SET);
|
||||
if (ret!=0) return 0;
|
||||
|
@ -710,7 +708,7 @@ iso9660_iso_seek_read (const iso9660_t *p_iso, void *ptr, lsn_t start,
|
|||
|
||||
static iso9660_stat_t *
|
||||
_iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa,
|
||||
uint8_t i_joliet_level)
|
||||
uint8_t u_joliet_level)
|
||||
{
|
||||
uint8_t dir_len= iso9660_get_dir_len(p_iso9660_dir);
|
||||
iso711_t i_fname;
|
||||
|
@ -769,7 +767,7 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa,
|
|||
else if ('\1' == p_iso9660_dir->filename.str[1] && 1 == i_fname)
|
||||
strncpy (p_stat->filename, "..", sizeof(".."));
|
||||
#ifdef HAVE_JOLIET
|
||||
else if (i_joliet_level) {
|
||||
else if (u_joliet_level) {
|
||||
int i_inlen = i_fname;
|
||||
cdio_utf8_t *p_psz_out = NULL;
|
||||
if (cdio_charset_to_utf8(&p_iso9660_dir->filename.str[1], i_inlen,
|
||||
|
@ -883,7 +881,7 @@ _fs_stat_root (CdIo_t *p_cdio)
|
|||
iso9660_stat_t *p_stat;
|
||||
bool_3way_t b_xa;
|
||||
|
||||
if (!p_env->i_joliet_level)
|
||||
if (!p_env->u_joliet_level)
|
||||
iso_extension_mask &= ~ISO_EXTENSION_JOLIET;
|
||||
|
||||
/* FIXME try also with Joliet.*/
|
||||
|
@ -904,7 +902,7 @@ _fs_stat_root (CdIo_t *p_cdio)
|
|||
}
|
||||
|
||||
#ifdef HAVE_JOLIET
|
||||
p_iso9660_dir = p_env->i_joliet_level
|
||||
p_iso9660_dir = p_env->u_joliet_level
|
||||
? &(p_env->svd.root_directory_record)
|
||||
: &(p_env->pvd.root_directory_record) ;
|
||||
#else
|
||||
|
@ -912,7 +910,7 @@ _fs_stat_root (CdIo_t *p_cdio)
|
|||
#endif
|
||||
|
||||
p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, b_xa,
|
||||
p_env->i_joliet_level);
|
||||
p_env->u_joliet_level);
|
||||
return p_stat;
|
||||
}
|
||||
|
||||
|
@ -925,7 +923,7 @@ _ifs_stat_root (iso9660_t *p_iso)
|
|||
iso9660_dir_t *p_iso9660_dir;
|
||||
|
||||
#ifdef HAVE_JOLIET
|
||||
p_iso9660_dir = p_iso->i_joliet_level
|
||||
p_iso9660_dir = p_iso->u_joliet_level
|
||||
? &(p_iso->svd.root_directory_record)
|
||||
: &(p_iso->pvd.root_directory_record) ;
|
||||
#else
|
||||
|
@ -933,7 +931,7 @@ _ifs_stat_root (iso9660_t *p_iso)
|
|||
#endif
|
||||
|
||||
p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa,
|
||||
p_iso->i_joliet_level);
|
||||
p_iso->u_joliet_level);
|
||||
return p_stat;
|
||||
}
|
||||
|
||||
|
@ -986,11 +984,11 @@ _fs_stat_traverse (const CdIo_t *p_cdio, const iso9660_stat_t *_root,
|
|||
}
|
||||
|
||||
p_iso9660_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, dunno,
|
||||
p_env->i_joliet_level);
|
||||
p_env->u_joliet_level);
|
||||
|
||||
cmp = strcmp(splitpath[0], p_iso9660_stat->filename);
|
||||
|
||||
if ( 0 != cmp && 0 == p_env->i_joliet_level
|
||||
if ( 0 != cmp && 0 == p_env->u_joliet_level
|
||||
&& yep != p_iso9660_stat->rr.b3_rock ) {
|
||||
char *trans_fname = NULL;
|
||||
unsigned int i_trans_fname=strlen(p_iso9660_stat->filename);
|
||||
|
@ -1004,7 +1002,7 @@ _fs_stat_traverse (const CdIo_t *p_cdio, const iso9660_stat_t *_root,
|
|||
return NULL;
|
||||
}
|
||||
iso9660_name_translate_ext(p_iso9660_stat->filename, trans_fname,
|
||||
p_env->i_joliet_level);
|
||||
p_env->u_joliet_level);
|
||||
cmp = strcmp(splitpath[0], trans_fname);
|
||||
free(trans_fname);
|
||||
}
|
||||
|
@ -1085,11 +1083,11 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root,
|
|||
}
|
||||
|
||||
p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa,
|
||||
p_iso->i_joliet_level);
|
||||
p_iso->u_joliet_level);
|
||||
|
||||
cmp = strcmp(splitpath[0], p_stat->filename);
|
||||
|
||||
if ( 0 != cmp && 0 == p_iso->i_joliet_level
|
||||
if ( 0 != cmp && 0 == p_iso->u_joliet_level
|
||||
&& yep != p_stat->rr.b3_rock ) {
|
||||
char *trans_fname = NULL;
|
||||
unsigned int i_trans_fname=strlen(p_stat->filename);
|
||||
|
@ -1103,7 +1101,7 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root,
|
|||
return NULL;
|
||||
}
|
||||
iso9660_name_translate_ext(p_stat->filename, trans_fname,
|
||||
p_iso->i_joliet_level);
|
||||
p_iso->u_joliet_level);
|
||||
cmp = strcmp(splitpath[0], trans_fname);
|
||||
free(trans_fname);
|
||||
}
|
||||
|
@ -1291,7 +1289,7 @@ iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2)
|
|||
}
|
||||
|
||||
p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, dunno,
|
||||
p_env->i_joliet_level);
|
||||
p_env->u_joliet_level);
|
||||
_cdio_list_append (retval, p_iso9660_stat);
|
||||
|
||||
offset += iso9660_get_dir_len(p_iso9660_dir);
|
||||
|
@ -1358,7 +1356,7 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[])
|
|||
}
|
||||
|
||||
p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, p_iso->b_xa,
|
||||
p_iso->i_joliet_level);
|
||||
p_iso->u_joliet_level);
|
||||
|
||||
if (p_iso9660_stat)
|
||||
_cdio_list_append (retval, p_iso9660_stat);
|
||||
|
|
27
src/rufus.c
27
src/rufus.c
|
@ -94,7 +94,7 @@ static BOOL existing_key = FALSE; // For LGP set/restore
|
|||
static BOOL size_check = TRUE;
|
||||
static BOOL log_displayed = FALSE;
|
||||
static BOOL iso_provided = FALSE;
|
||||
extern BOOL force_large_fat32;
|
||||
extern BOOL force_large_fat32, enable_joliet, enable_rockridge;
|
||||
static int selection_default;
|
||||
static loc_cmd* selected_locale = NULL;
|
||||
char ClusterSizeLabel[MAX_CLUSTER_SIZES][64];
|
||||
|
@ -1041,8 +1041,10 @@ DWORD WINAPI ISOScanThread(LPVOID param)
|
|||
safe_free(iso_path);
|
||||
goto out;
|
||||
}
|
||||
uprintf("ISO label: '%s'\r\n Size: %lld bytes\r\n Has a >4GB file: %s\r\n Uses EFI: %s%s\r\n Uses Bootmgr: %s\r\n Uses WinPE: %s%s\r\n Uses isolinux: %s %s\n",
|
||||
iso_report.label, iso_report.projected_size, iso_report.has_4GB_file?"Yes":"No", (iso_report.has_efi || iso_report.has_win7_efi)?"Yes":"No",
|
||||
uprintf("ISO label: '%s'\r\n Size: %lld bytes\r\n Has a >64 chars filename: %s\r\n Has a >4GB file: %s\r\n"
|
||||
" Uses EFI: %s%s\r\n Uses Bootmgr: %s\r\n Uses WinPE: %s%s\r\n Uses isolinux: %s %s\n",
|
||||
iso_report.label, iso_report.projected_size, iso_report.has_long_filename?"Yes":"No",
|
||||
iso_report.has_4GB_file?"Yes":"No", (iso_report.has_efi || iso_report.has_win7_efi)?"Yes":"No",
|
||||
(iso_report.has_win7_efi && (!iso_report.has_efi))?" (win7_x64)":"", iso_report.has_bootmgr?"Yes":"No",
|
||||
IS_WINPE(iso_report.winpe)?"Yes":"No", (iso_report.uses_minint)?" (with /minint)":"", iso_report.has_isolinux?"Yes":"No",
|
||||
iso_report.has_syslinux_v5?"(v5.0 or later)":iso_report.has_isolinux?"(v4.x or earlier)":"");
|
||||
|
@ -2061,12 +2063,27 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
existing_key = FALSE;
|
||||
continue;
|
||||
}
|
||||
// Alt K => Toggle fake drive detection during bad blocks check
|
||||
// Alt J => Toggle Joliet support for ISO9660 images
|
||||
// Some ISOs (Ubuntu) have Joliet extensions but expect applications not to use them,
|
||||
// due to their reliance on filenames that are > 64 chars (the Joliet max length for
|
||||
// a file name). This option allows users to ignore Joliet when using such images.
|
||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'J')) {
|
||||
enable_joliet = !enable_joliet;
|
||||
PrintStatus2000("Joliet support", enable_joliet);
|
||||
continue;
|
||||
}
|
||||
// Alt K => Toggle Rock Ridge support for ISO9660 image
|
||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'K')) {
|
||||
enable_rockridge = !enable_rockridge;
|
||||
PrintStatus2000("Rock Ridge support", enable_rockridge);
|
||||
continue;
|
||||
}
|
||||
// Alt L => Toggle fake drive detection during bad blocks check
|
||||
// By default, Rufus will check for fake USB flash drives that mistakenly present
|
||||
// more capacity than they already have by looping over the flash. This check which
|
||||
// is enabled by default is performed by writing the block number sequence and reading
|
||||
// it back during the bad block check.
|
||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'K')) {
|
||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'L')) {
|
||||
detect_fakes = !detect_fakes;
|
||||
PrintStatus2000(lmprintf(MSG_256), detect_fakes);
|
||||
continue;
|
||||
|
|
|
@ -216,6 +216,7 @@ typedef struct {
|
|||
// TODO: use a bitmask and #define tests for the following
|
||||
uint8_t winpe;
|
||||
BOOL has_4GB_file;
|
||||
BOOL has_long_filename;
|
||||
BOOL has_bootmgr;
|
||||
BOOL has_efi;
|
||||
BOOL has_win7_efi;
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.3.4.278"
|
||||
CAPTION "Rufus v1.4.0.280"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -278,8 +278,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,4,278
|
||||
PRODUCTVERSION 1,3,4,278
|
||||
FILEVERSION 1,4,0,280
|
||||
PRODUCTVERSION 1,4,0,280
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -296,13 +296,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.3.4.278"
|
||||
VALUE "FileVersion", "1.4.0.280"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.3.4.278"
|
||||
VALUE "ProductVersion", "1.4.0.280"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue