v1.4.9 (build 506)

* Fix listing of drives on Windows XP and Windows Vista (Could not allocate Device ID list)
* Closes #343
This commit is contained in:
Pete Batard 2014-06-08 18:02:03 +01:00
parent 8007fc0915
commit 201843dbf3
6 changed files with 30 additions and 23 deletions

View File

@ -1,4 +1,7 @@
o Version 1.4.8 (2014.06.??) o Version 1.4.9 (2014.06.08) [BUGFIX RELEASE]
Fix listing of drives for Windows XP and Windows Vista (reported by Alex Andrews)
o Version 1.4.8 (2014.06.03)
Add KolibriOS ISO support Add KolibriOS ISO support
Add Arabic translation, courtesy of عمر الصمد Add Arabic translation, courtesy of عمر الصمد
Add Croatian translation, courtesy of Dario Komar Add Croatian translation, courtesy of Dario Komar

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.4.8. # Generated by GNU Autoconf 2.68 for rufus 1.4.9.
# #
# Report bugs to <https://github.com/pbatard/rufus/issues>. # Report bugs to <https://github.com/pbatard/rufus/issues>.
# #
@ -560,8 +560,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.4.8' PACKAGE_VERSION='1.4.9'
PACKAGE_STRING='rufus 1.4.8' PACKAGE_STRING='rufus 1.4.9'
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'
@ -1203,7 +1203,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.4.8 to adapt to many kinds of systems. \`configure' configures rufus 1.4.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1269,7 +1269,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.4.8:";; short | recursive ) echo "Configuration of rufus 1.4.9:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1357,7 +1357,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.4.8 rufus configure 1.4.9
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.
@ -1412,7 +1412,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.4.8, which was It was created by rufus $as_me 1.4.9, which was
generated by GNU Autoconf 2.68. Invocation command line was generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@ $ $0 $@
@ -2227,7 +2227,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='rufus' PACKAGE='rufus'
VERSION='1.4.8' VERSION='1.4.9'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -4140,7 +4140,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.4.8, which was This file was extended by rufus $as_me 1.4.9, 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
@ -4194,7 +4194,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.4.8 rufus config.status 1.4.9
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.4.8], [https://github.com/pbatard/rufus/issues], [rufus], [http://rufus.akeo.ie]) AC_INIT([rufus], [1.4.9], [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

@ -32,7 +32,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
CAPTION "Rufus 1.4.8.505" CAPTION "Rufus 1.4.9.506"
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
@ -165,7 +165,7 @@ END
RTL_IDD_DIALOG DIALOGEX 12, 12, 206, 329 RTL_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_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 1.4.8.505" CAPTION "Rufus 1.4.9.506"
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
@ -428,8 +428,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,8,505 FILEVERSION 1,4,9,506
PRODUCTVERSION 1,4,8,505 PRODUCTVERSION 1,4,9,506
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -446,13 +446,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.8.505" VALUE "FileVersion", "1.4.9.506"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2014 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.8.505" VALUE "ProductVersion", "1.4.9.506"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -126,7 +126,7 @@ BOOL GetUSBDevices(DWORD devnum)
PSP_DEVICE_INTERFACE_DETAIL_DATA_A devint_detail_data; PSP_DEVICE_INTERFACE_DETAIL_DATA_A devint_detail_data;
DEVINST parent_inst, device_inst; DEVINST parent_inst, device_inst;
DWORD size, i, j, k, datatype, drive_index; DWORD size, i, j, k, datatype, drive_index;
ULONG list_size[ARRAYSIZE(storage_name)], full_list_size; ULONG list_size[ARRAYSIZE(storage_name)] = { 0 }, full_list_size, ulFlags;
HANDLE hDrive; HANDLE hDrive;
LONG maxwidth = 0; LONG maxwidth = 0;
int s, score, drive_number; int s, score, drive_number;
@ -191,11 +191,14 @@ BOOL GetUSBDevices(DWORD devnum)
// Build a single list of Device IDs from all the storage enumerators we know of // Build a single list of Device IDs from all the storage enumerators we know of
full_list_size = 0; full_list_size = 0;
ulFlags = CM_GETIDLIST_FILTER_SERVICE;
if (nWindowsVersion >= WINDOWS_7)
ulFlags |= CM_GETIDLIST_FILTER_PRESENT;
for (s=0; s<ARRAYSIZE(storage_name); s++) { for (s=0; s<ARRAYSIZE(storage_name); s++) {
// Get a list of device IDs for all USB storage devices // Get a list of device IDs for all USB storage devices
// This will be used to find if a device is UASP // This will be used to find if a device is UASP
CM_Get_Device_ID_List_SizeA(&list_size[s], storage_name[s], if (CM_Get_Device_ID_List_SizeA(&list_size[s], storage_name[s], ulFlags) != CR_SUCCESS)
CM_GETIDLIST_FILTER_SERVICE|CM_GETIDLIST_FILTER_PRESENT); list_size[s] = 0;
if (list_size[s] != 0) if (list_size[s] != 0)
full_list_size += list_size[s]-1; // remove extra NUL terminator full_list_size += list_size[s]-1; // remove extra NUL terminator
} }
@ -209,8 +212,8 @@ BOOL GetUSBDevices(DWORD devnum)
} }
for (s=0, i=0; s<ARRAYSIZE(storage_name); s++) { for (s=0, i=0; s<ARRAYSIZE(storage_name); s++) {
if (list_size[s] > 1) { if (list_size[s] > 1) {
CM_Get_Device_ID_ListA(storage_name[s], &devid_list[i], list_size[s], if (CM_Get_Device_ID_ListA(storage_name[s], &devid_list[i], list_size[s], ulFlags) != CR_SUCCESS)
CM_GETIDLIST_FILTER_SERVICE|CM_GETIDLIST_FILTER_PRESENT); // continue;
// The list_size is sometimes larger than required thus we need to find the real end // The list_size is sometimes larger than required thus we need to find the real end
for (i += list_size[s]; i > 2; i--) { for (i += list_size[s]; i > 2; i--) {
if ((devid_list[i-2] != '\0') && (devid_list[i-1] == '\0') && (devid_list[i] == '\0')) if ((devid_list[i-2] != '\0') && (devid_list[i-1] == '\0') && (devid_list[i] == '\0'))

View File

@ -49,6 +49,7 @@ typedef CHAR *DEVINSTID_A;
#define CR_SUCCESS 0x00000000 #define CR_SUCCESS 0x00000000
#define CR_NO_SUCH_DEVNODE 0x0000000D #define CR_NO_SUCH_DEVNODE 0x0000000D
#define CM_GETIDLIST_FILTER_SERVICE 0x00000002 #define CM_GETIDLIST_FILTER_SERVICE 0x00000002
// /!\ The following flag is only available on Windows 7 or later!
#define CM_GETIDLIST_FILTER_PRESENT 0x00000100 #define CM_GETIDLIST_FILTER_PRESENT 0x00000100
#define CM_DRP_ADDRESS 0x0000001D #define CM_DRP_ADDRESS 0x0000001D