[iso] upgrade to libcdio latest

* This should fix #179
* Also bump rufus-next to v1.4.0
This commit is contained in:
Pete Batard 2013-10-14 00:31:20 +01:00
parent 3c438db3fd
commit cf3964c8a3
12 changed files with 644 additions and 625 deletions

20
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # 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>. # Report bugs to <https://github.com/pbatard/rufus/issues>.
# #
@ -559,8 +559,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='rufus' PACKAGE_NAME='rufus'
PACKAGE_TARNAME='rufus' PACKAGE_TARNAME='rufus'
PACKAGE_VERSION='1.3.4' PACKAGE_VERSION='1.4.0'
PACKAGE_STRING='rufus 1.3.4' PACKAGE_STRING='rufus 1.4.0'
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
PACKAGE_URL='http://rufus.akeo.ie' 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. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF 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]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1267,7 +1267,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of rufus 1.3.4:";; short | recursive ) echo "Configuration of rufus 1.4.0:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1355,7 +1355,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
rufus configure 1.3.4 rufus configure 1.4.0
generated by GNU Autoconf 2.68 generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc. Copyright (C) 2010 Free Software Foundation, Inc.
@ -1410,7 +1410,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. 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 generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@ $ $0 $@
@ -2225,7 +2225,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='rufus' PACKAGE='rufus'
VERSION='1.3.4' VERSION='1.4.0'
cat >>confdefs.h <<_ACEOF 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 # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" 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 generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -4121,7 +4121,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
rufus config.status 1.3.4 rufus config.status 1.4.0
configured by $0, generated by GNU Autoconf 2.68, configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View file

@ -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]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_SRCDIR([src/rufus.c])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])

View file

@ -1,7 +1,6 @@
/* -*- c -*- /* -*- c -*-
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012 Rocky Bernstein Copyright (C) 2005-2006, 2008-2013 Rocky Bernstein <rocky@gnu.org>
<rocky@gnu.org>
This program is free software: you can redistribute it and/or modify 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 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); 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. Get the driver id.
if CdIo_t is NULL (we haven't initialized a specific device driver), if CdIo_t is NULL (we haven't initialized a specific device driver),

View file

@ -63,6 +63,14 @@ extern cdio_log_level_t cdio_loglevel_default;
typedef void (*cdio_log_handler_t) (cdio_log_level_t level, typedef void (*cdio_log_handler_t) (cdio_log_level_t level,
const char message[]); 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 * Set a custom log handler for libcdio. The return value is the log
* handler being replaced. If the provided parameter is NULL, then * handler being replaced. If the provided parameter is NULL, then

View file

@ -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> Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify 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_first_track; /**< The starting track number. */
track_t i_tracks; /**< The number of tracks. */ 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. */ 1-3: Joliet level. */
iso9660_pvd_t pvd; iso9660_pvd_t pvd;
iso9660_svd_t svd; iso9660_svd_t svd;

View file

@ -38,8 +38,8 @@
cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN; cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN;
static void extern void
default_cdio_log_handler(cdio_log_level_t level, const char message[]) cdio_default_log_handler(cdio_log_level_t level, const char message[])
{ {
switch (level) switch (level)
{ {
@ -80,7 +80,7 @@ default_cdio_log_handler(cdio_log_level_t level, const char message[])
fflush (stdout); 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_handler_t
cdio_log_set_handler(cdio_log_handler_t new_handler) cdio_log_set_handler(cdio_log_handler_t new_handler)

View file

@ -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 (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, return (p_cdio->op.read_audio_sectors) (p_cdio->env, p_buf, i_lsn,
i_blocks); i_blocks);
}
return DRIVER_OP_UNSUPPORTED; 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 (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, return p_cdio->op.read_data_sectors (p_cdio->env, p_buf, i_lsn,
i_blocksize, i_blocks); i_blocksize, i_blocks);
}
return DRIVER_OP_UNSUPPORTED; 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); check_lsn(i_lsn);
if (p_cdio->op.read_mode1_sector) { 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); 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) { } else if (p_cdio->op.lseek && p_cdio->op.read) {
char buf[M2RAW_SECTOR_SIZE] = { 0, }; char buf[M2RAW_SECTOR_SIZE] = { 0, };

View file

@ -144,7 +144,7 @@ cdio_get_joliet_level(const CdIo_t *p_cdio)
{ {
const generic_img_private_t *p_env const generic_img_private_t *p_env
= (generic_img_private_t *) (p_cdio->env); = (generic_img_private_t *) (p_cdio->env);
return p_env->i_joliet_level; return p_env->u_joliet_level;
} }
} }

View file

@ -310,7 +310,7 @@ bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst,
} }
bool cdio_charset_to_utf8(const char *src, size_t src_len, cdio_utf8_t **dst, bool cdio_charset_to_utf8(const char *src, size_t src_len, cdio_utf8_t **dst,
const char * src_charset) const char *src_charset)
{ {
wchar_t* le_src; wchar_t* le_src;
int i; int i;

View file

@ -1,6 +1,5 @@
/* /*
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Copyright (C) 2003-2009, 2013 Rocky Bernstein <rocky@gnu.org>
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify 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_oldname the ISO-9660 filename to be translated.
@param psz_newname returned string. The caller allocates this and @param psz_newname returned string. The caller allocates this and
it should be at least the size of psz_oldname. 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. Joliet level.
@return length of the translated string is returned. It will be no greater @return length of the translated string is returned. It will be no greater
than the length of psz_oldname. than the length of psz_oldname.
*/ */
int int
iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname, 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 len = strlen(psz_oldname);
int i; int i;
@ -451,7 +450,7 @@ iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname,
break; break;
/* Lower case, unless we have Joliet extensions. */ /* 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) */ /* Drop trailing '.;1' (ISO 9660:1988 7.5.1 requires period) */
if (c == '.' && i == len - 3 if (c == '.' && i == len - 3

View file

@ -1,6 +1,5 @@
/* /*
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Copyright (C) 2003-2008, 2011-2013 Rocky Bernstein <rocky@gnu.org>
Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -54,32 +53,30 @@
#include "_cdio_stdio.h" #include "_cdio_stdio.h"
#include "cdio_private.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 { struct _iso9660_s {
CdioDataSource_t *stream; /* Stream pointer */ CdioDataSource_t *stream; /**< Stream pointer */
bool_3way_t b_xa; /* true if has XA attributes. */ bool_3way_t b_xa; /**< true if has XA attributes. */
bool_3way_t b_mode2; /* true if has mode 2, false for mode 1. */ bool_3way_t b_mode2; /**< true if has mode 2, false for mode 1. */
uint8_t i_joliet_level; /* 0 = no Joliet extensions. uint8_t u_joliet_level; /**< 0 = no Joliet extensions.
1-3: Joliet level. */ 1-3: Joliet level. */
iso9660_pvd_t pvd; iso9660_pvd_t pvd;
iso9660_svd_t svd; 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. */ 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 This is the normal condition. But in a fuzzy
read we may be reading a CD-image read we may be reading a CD-image
and not a true ISO 9660 image this might be and not a true ISO 9660 image this might be
CDIO_CD_SYNC_SIZE 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 fuzzy read, we may be reading a CD-image
and not a true ISO 9660 image this might and not a true ISO 9660 image this might
be CDIO_CD_FRAMESIZE_RAW (2352) or be CDIO_CD_FRAMESIZE_RAW (2352) or
M2RAW_SECTOR_SIZE (2336). 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 ("CD001") come out as ISO_PVD_SECTOR
(frame 16). Normally this should be 0 (frame 16). Normally this should be 0
for an ISO 9660 image, but if one is for an ISO 9660 image, but if one is
@ -89,6 +86,8 @@ struct _iso9660_s {
filesystem inside that it may be filesystem inside that it may be
different. different.
*/ */
bool b_have_superblock; /**< Superblock has been read in? */
}; };
static long int iso9660_seek_read_framesize (const iso9660_t *p_iso, 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) uint16_t i_fuzz, bool b_fuzzy)
{ {
iso9660_t *p_iso = (iso9660_t *) calloc(1, sizeof(iso9660_t)) ; iso9660_t *p_iso = (iso9660_t *) calloc(1, sizeof(iso9660_t)) ;
bool b_have_superblock;
if (!p_iso) return NULL; if (!p_iso) return NULL;
@ -178,11 +176,11 @@ iso9660_open_ext_private (const char *psz_path,
p_iso->i_framesize = ISO_BLOCKSIZE; 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_fuzzy_read_superblock(p_iso, iso_extension_mask, i_fuzz)
: iso9660_ifs_read_superblock(p_iso, iso_extension_mask) ; : 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. */ /* 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; return false;
} }
#ifdef HAVE_JOLIET #ifdef HAVE_JOLIET
if (p_iso->i_joliet_level) { if (p_iso->u_joliet_level) {
/* Translate USC-2 string from Secondary Volume Descriptor */ /* Translate USC-2 string from Secondary Volume Descriptor */
if (cdio_charset_to_utf8(svd_member, max_size, if (cdio_charset_to_utf8(svd_member, max_size,
p_psz_member_id, "UCS-2BE")) { 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) uint8_t iso9660_ifs_get_joliet_level(iso9660_t *p_iso)
{ {
if (!p_iso) return 0; 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))) if (!p_iso || !iso9660_ifs_read_pvd(p_iso, &(p_iso->pvd)))
return false; 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) */ /* 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++) { 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; break;
if ( ISO_VD_SUPPLEMENTARY == from_711(p_svd.type) ) { if ( ISO_VD_SUPPLEMENTARY == from_711(p_svd.type) ) {
/* We're only interested in Joliet => make sure the SVD isn't overwritten */ /* 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)); memcpy(&(p_iso->svd), &p_svd, sizeof(iso9660_svd_t));
if (p_svd.escape_sequences[0] == 0x25 if (p_svd.escape_sequences[0] == 0x25
&& p_svd.escape_sequences[1] == 0x2f) { && p_svd.escape_sequences[1] == 0x2f) {
switch (p_svd.escape_sequences[2]) { switch (p_svd.escape_sequences[2]) {
case 0x40: case 0x40:
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1) if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1)
p_iso->i_joliet_level = 1; p_iso->u_joliet_level = 1;
break; break;
case 0x43: case 0x43:
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2) if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2)
p_iso->i_joliet_level = 2; p_iso->u_joliet_level = 2;
break; break;
case 0x45: case 0x45:
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3) if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3)
p_iso->i_joliet_level = 3; p_iso->u_joliet_level = 3;
break; break;
default: default:
cdio_info("Supplementary Volume Descriptor found, but not Joliet"); cdio_info("Supplementary Volume Descriptor found, but not Joliet");
} }
if (p_iso->i_joliet_level > 0) { if (p_iso->u_joliet_level > 0) {
cdio_info("Found Extension: Joliet Level %d", p_iso->i_joliet_level); 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) ) if ( !iso9660_fs_read_pvd(p_cdio, p_pvd) )
return false; return false;
p_env->i_joliet_level = 0; p_env->u_joliet_level = 0;
driver_return = driver_return =
cdio_read_data_sectors ( p_cdio, buf, ISO_PVD_SECTOR+1, ISO_BLOCKSIZE, 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]) { switch (p_svd->escape_sequences[2]) {
case 0x40: case 0x40:
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1) if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL1)
p_env->i_joliet_level = 1; p_env->u_joliet_level = 1;
break; break;
case 0x43: case 0x43:
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2) if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL2)
p_env->i_joliet_level = 2; p_env->u_joliet_level = 2;
break; break;
case 0x45: case 0x45:
if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3) if (iso_extension_mask & ISO_EXTENSION_JOLIET_LEVEL3)
p_env->i_joliet_level = 3; p_env->u_joliet_level = 3;
break; break;
default: default:
cdio_info("Supplementary Volume Descriptor found, but not Joliet"); 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", 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; int64_t i_byte_offset;
if (!p_iso) return 0; if (!p_iso) return 0;
i_byte_offset = (start * p_iso->i_framesize) + p_iso->i_fuzzy_offset i_byte_offset = (start * (int64_t)(p_iso->i_framesize))
+ p_iso->i_datastart; + p_iso->i_fuzzy_offset + p_iso->i_datastart;
ret = cdio_stream_seek (p_iso->stream, i_byte_offset, SEEK_SET); ret = cdio_stream_seek (p_iso->stream, i_byte_offset, SEEK_SET);
if (ret!=0) return 0; 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 * static iso9660_stat_t *
_iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, _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); uint8_t dir_len= iso9660_get_dir_len(p_iso9660_dir);
iso711_t i_fname; 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) else if ('\1' == p_iso9660_dir->filename.str[1] && 1 == i_fname)
strncpy (p_stat->filename, "..", sizeof("..")); strncpy (p_stat->filename, "..", sizeof(".."));
#ifdef HAVE_JOLIET #ifdef HAVE_JOLIET
else if (i_joliet_level) { else if (u_joliet_level) {
int i_inlen = i_fname; int i_inlen = i_fname;
cdio_utf8_t *p_psz_out = NULL; cdio_utf8_t *p_psz_out = NULL;
if (cdio_charset_to_utf8(&p_iso9660_dir->filename.str[1], i_inlen, 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; iso9660_stat_t *p_stat;
bool_3way_t b_xa; bool_3way_t b_xa;
if (!p_env->i_joliet_level) if (!p_env->u_joliet_level)
iso_extension_mask &= ~ISO_EXTENSION_JOLIET; iso_extension_mask &= ~ISO_EXTENSION_JOLIET;
/* FIXME try also with Joliet.*/ /* FIXME try also with Joliet.*/
@ -904,7 +902,7 @@ _fs_stat_root (CdIo_t *p_cdio)
} }
#ifdef HAVE_JOLIET #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->svd.root_directory_record)
: &(p_env->pvd.root_directory_record) ; : &(p_env->pvd.root_directory_record) ;
#else #else
@ -912,7 +910,7 @@ _fs_stat_root (CdIo_t *p_cdio)
#endif #endif
p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, b_xa, p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, b_xa,
p_env->i_joliet_level); p_env->u_joliet_level);
return p_stat; return p_stat;
} }
@ -925,7 +923,7 @@ _ifs_stat_root (iso9660_t *p_iso)
iso9660_dir_t *p_iso9660_dir; iso9660_dir_t *p_iso9660_dir;
#ifdef HAVE_JOLIET #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->svd.root_directory_record)
: &(p_iso->pvd.root_directory_record) ; : &(p_iso->pvd.root_directory_record) ;
#else #else
@ -933,7 +931,7 @@ _ifs_stat_root (iso9660_t *p_iso)
#endif #endif
p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, 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; 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_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); 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 ) { && yep != p_iso9660_stat->rr.b3_rock ) {
char *trans_fname = NULL; char *trans_fname = NULL;
unsigned int i_trans_fname=strlen(p_iso9660_stat->filename); 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; return NULL;
} }
iso9660_name_translate_ext(p_iso9660_stat->filename, trans_fname, 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); cmp = strcmp(splitpath[0], trans_fname);
free(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_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); 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 ) { && yep != p_stat->rr.b3_rock ) {
char *trans_fname = NULL; char *trans_fname = NULL;
unsigned int i_trans_fname=strlen(p_stat->filename); 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; return NULL;
} }
iso9660_name_translate_ext(p_stat->filename, trans_fname, 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); cmp = strcmp(splitpath[0], trans_fname);
free(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_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); _cdio_list_append (retval, p_iso9660_stat);
offset += iso9660_get_dir_len(p_iso9660_dir); 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_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) if (p_iso9660_stat)
_cdio_list_append (retval, p_iso9660_stat); _cdio_list_append (retval, p_iso9660_stat);

View file

@ -30,7 +30,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.3.4.279" CAPTION "Rufus v1.4.0.280"
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
@ -278,8 +278,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,4,279 FILEVERSION 1,4,0,280
PRODUCTVERSION 1,3,4,279 PRODUCTVERSION 1,4,0,280
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -296,13 +296,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.3.4.279" VALUE "FileVersion", "1.4.0.280"
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.3.4.279" VALUE "ProductVersion", "1.4.0.280"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"