mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[core] don't list non-USB removable devices by default
* Unless specifically requested with Ctrl-Alt-H * Closes #727 * Also rename usb.c to dev.c, since we may be listing more than USB devices
This commit is contained in:
		
							parent
							
								
									fc5d64618a
								
							
						
					
					
						commit
						43d9ac046b
					
				
					 10 changed files with 53 additions and 49 deletions
				
			
		|  | @ -200,7 +200,7 @@ | ||||||
|     <ClCompile Include="..\stdio.c" /> |     <ClCompile Include="..\stdio.c" /> | ||||||
|     <ClCompile Include="..\stdlg.c" /> |     <ClCompile Include="..\stdlg.c" /> | ||||||
|     <ClCompile Include="..\syslinux.c" /> |     <ClCompile Include="..\syslinux.c" /> | ||||||
|     <ClCompile Include="..\usb.c" /> |     <ClCompile Include="..\dev.c" /> | ||||||
|     <ClCompile Include="..\vhd.c" /> |     <ClCompile Include="..\vhd.c" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | @ -224,7 +224,7 @@ | ||||||
|     <ClInclude Include="..\license.h" /> |     <ClInclude Include="..\license.h" /> | ||||||
|     <ClInclude Include="..\smart.h" /> |     <ClInclude Include="..\smart.h" /> | ||||||
|     <ClInclude Include="..\sys_types.h" /> |     <ClInclude Include="..\sys_types.h" /> | ||||||
|     <ClInclude Include="..\usb.h" /> |     <ClInclude Include="..\dev.h" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <Manifest Include="..\rufus.manifest" /> |     <Manifest Include="..\rufus.manifest" /> | ||||||
|  |  | ||||||
|  | @ -66,15 +66,15 @@ | ||||||
|     <ClCompile Include="..\smart.c"> |     <ClCompile Include="..\smart.c"> | ||||||
|       <Filter>Source Files</Filter> |       <Filter>Source Files</Filter> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <ClCompile Include="..\usb.c"> |  | ||||||
|       <Filter>Source Files</Filter> |  | ||||||
|     </ClCompile> |  | ||||||
|     <ClCompile Include="..\checksum.c"> |     <ClCompile Include="..\checksum.c"> | ||||||
|       <Filter>Source Files</Filter> |       <Filter>Source Files</Filter> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <ClCompile Include="..\pki.c"> |     <ClCompile Include="..\pki.c"> | ||||||
|       <Filter>Source Files</Filter> |       <Filter>Source Files</Filter> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|  |     <ClCompile Include="..\dev.c"> | ||||||
|  |       <Filter>Source Files</Filter> | ||||||
|  |     </ClCompile> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <ClInclude Include="..\rufus.h"> |     <ClInclude Include="..\rufus.h"> | ||||||
|  | @ -128,9 +128,6 @@ | ||||||
|     <ClInclude Include="..\drive.h"> |     <ClInclude Include="..\drive.h"> | ||||||
|       <Filter>Header Files</Filter> |       <Filter>Header Files</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
|     <ClInclude Include="..\usb.h"> |  | ||||||
|       <Filter>Header Files</Filter> |  | ||||||
|     </ClInclude> |  | ||||||
|     <ClInclude Include="..\bled\bled.h"> |     <ClInclude Include="..\bled\bled.h"> | ||||||
|       <Filter>Header Files</Filter> |       <Filter>Header Files</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
|  | @ -140,6 +137,9 @@ | ||||||
|     <ClInclude Include="..\missing.h"> |     <ClInclude Include="..\missing.h"> | ||||||
|       <Filter>Header Files</Filter> |       <Filter>Header Files</Filter> | ||||||
|     </ClInclude> |     </ClInclude> | ||||||
|  |     <ClInclude Include="..\dev.h"> | ||||||
|  |       <Filter>Header Files</Filter> | ||||||
|  |     </ClInclude> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <None Include="..\..\res\rufus.ico"> |     <None Include="..\..\res\rufus.ico"> | ||||||
|  |  | ||||||
|  | @ -36,6 +36,7 @@ SXS_APPLICATION_MANIFEST=..\rufus.manifest | ||||||
| 
 | 
 | ||||||
| SOURCES=badblocks.c      \ | SOURCES=badblocks.c      \ | ||||||
|         checksum.c       \ |         checksum.c       \ | ||||||
|  |         dev.c            \ | ||||||
|         dos.c            \ |         dos.c            \ | ||||||
|         dos_locale.c     \ |         dos_locale.c     \ | ||||||
|         drive.c          \ |         drive.c          \ | ||||||
|  | @ -52,6 +53,5 @@ SOURCES=badblocks.c      \ | ||||||
|         stdio.c          \ |         stdio.c          \ | ||||||
|         stdlg.c          \ |         stdlg.c          \ | ||||||
|         syslinux.c       \ |         syslinux.c       \ | ||||||
|         usb.c            \ |  | ||||||
|         vhd.c            \ |         vhd.c            \ | ||||||
|         rufus.rc |         rufus.rc | ||||||
|  |  | ||||||
|  | @ -10,8 +10,8 @@ AM_V_WINDRES   = $(AM_V_WINDRES_$(V)) | ||||||
| %_rc.o: %.rc ../res/localization/embedded.loc | %_rc.o: %.rc ../res/localization/embedded.loc | ||||||
| 	$(AM_V_WINDRES) $(AM_RCFLAGS) -i $< -o $@ | 	$(AM_V_WINDRES) $(AM_RCFLAGS) -i $< -o $@ | ||||||
| 
 | 
 | ||||||
| rufus_SOURCES = badblocks.c checksum.c dos.c dos_locale.c drive.c format.c icon.c iso.c localization.c net.c parser.c \ | rufus_SOURCES = badblocks.c checksum.c dev.c dos.c dos_locale.c drive.c format.c icon.c iso.c localization.c \ | ||||||
| 	pki.c rufus.c smart.c stdfn.c stdio.c stdlg.c syslinux.c usb.c vhd.c | 	net.c parser.c pki.c rufus.c smart.c stdfn.c stdio.c stdlg.c syslinux.c vhd.c | ||||||
| rufus_CFLAGS = -I./ms-sys/inc -I./syslinux/libfat -I./syslinux/libinstaller -I./syslinux/win -I./libcdio $(AM_CFLAGS) | rufus_CFLAGS = -I./ms-sys/inc -I./syslinux/libfat -I./syslinux/libinstaller -I./syslinux/win -I./libcdio $(AM_CFLAGS) | ||||||
| rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows | rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows | ||||||
| rufus_LDADD = rufus_rc.o bled/libbled.a ms-sys/libmssys.a syslinux/libfat/libfat.a syslinux/libinstaller/libinstaller.a syslinux/win/libwin.a \ | rufus_LDADD = rufus_rc.o bled/libbled.a ms-sys/libmssys.a syslinux/libfat/libfat.a syslinux/libinstaller/libinstaller.a syslinux/win/libwin.a \ | ||||||
|  |  | ||||||
|  | @ -88,15 +88,15 @@ CONFIG_CLEAN_FILES = | ||||||
| CONFIG_CLEAN_VPATH_FILES = | CONFIG_CLEAN_VPATH_FILES = | ||||||
| PROGRAMS = $(noinst_PROGRAMS) | PROGRAMS = $(noinst_PROGRAMS) | ||||||
| am_rufus_OBJECTS = rufus-badblocks.$(OBJEXT) rufus-checksum.$(OBJEXT) \
 | am_rufus_OBJECTS = rufus-badblocks.$(OBJEXT) rufus-checksum.$(OBJEXT) \
 | ||||||
| 	rufus-dos.$(OBJEXT) rufus-dos_locale.$(OBJEXT) \
 | 	rufus-dev.$(OBJEXT) rufus-dos.$(OBJEXT) \
 | ||||||
| 	rufus-drive.$(OBJEXT) rufus-format.$(OBJEXT) \
 | 	rufus-dos_locale.$(OBJEXT) rufus-drive.$(OBJEXT) \
 | ||||||
| 	rufus-icon.$(OBJEXT) rufus-iso.$(OBJEXT) \
 | 	rufus-format.$(OBJEXT) rufus-icon.$(OBJEXT) \
 | ||||||
| 	rufus-localization.$(OBJEXT) rufus-net.$(OBJEXT) \
 | 	rufus-iso.$(OBJEXT) rufus-localization.$(OBJEXT) \
 | ||||||
| 	rufus-parser.$(OBJEXT) rufus-pki.$(OBJEXT) \
 | 	rufus-net.$(OBJEXT) rufus-parser.$(OBJEXT) rufus-pki.$(OBJEXT) \
 | ||||||
| 	rufus-rufus.$(OBJEXT) rufus-smart.$(OBJEXT) \
 | 	rufus-rufus.$(OBJEXT) rufus-smart.$(OBJEXT) \
 | ||||||
| 	rufus-stdfn.$(OBJEXT) rufus-stdio.$(OBJEXT) \
 | 	rufus-stdfn.$(OBJEXT) rufus-stdio.$(OBJEXT) \
 | ||||||
| 	rufus-stdlg.$(OBJEXT) rufus-syslinux.$(OBJEXT) \
 | 	rufus-stdlg.$(OBJEXT) rufus-syslinux.$(OBJEXT) \
 | ||||||
| 	rufus-usb.$(OBJEXT) rufus-vhd.$(OBJEXT) | 	rufus-vhd.$(OBJEXT) | ||||||
| rufus_OBJECTS = $(am_rufus_OBJECTS) | rufus_OBJECTS = $(am_rufus_OBJECTS) | ||||||
| rufus_DEPENDENCIES = rufus_rc.o bled/libbled.a ms-sys/libmssys.a \
 | rufus_DEPENDENCIES = rufus_rc.o bled/libbled.a ms-sys/libmssys.a \
 | ||||||
| 	syslinux/libfat/libfat.a syslinux/libinstaller/libinstaller.a \
 | 	syslinux/libfat/libfat.a syslinux/libinstaller/libinstaller.a \
 | ||||||
|  | @ -270,8 +270,8 @@ AM_V_WINDRES_0 = @echo "  RC     $@";$(WINDRES) | ||||||
| AM_V_WINDRES_1 = $(WINDRES) | AM_V_WINDRES_1 = $(WINDRES) | ||||||
| AM_V_WINDRES_ = $(AM_V_WINDRES_$(AM_DEFAULT_VERBOSITY)) | AM_V_WINDRES_ = $(AM_V_WINDRES_$(AM_DEFAULT_VERBOSITY)) | ||||||
| AM_V_WINDRES = $(AM_V_WINDRES_$(V)) | AM_V_WINDRES = $(AM_V_WINDRES_$(V)) | ||||||
| rufus_SOURCES = badblocks.c checksum.c dos.c dos_locale.c drive.c format.c icon.c iso.c localization.c net.c parser.c \
 | rufus_SOURCES = badblocks.c checksum.c dev.c dos.c dos_locale.c drive.c format.c icon.c iso.c localization.c \
 | ||||||
| 	pki.c rufus.c smart.c stdfn.c stdio.c stdlg.c syslinux.c usb.c vhd.c | 	net.c parser.c pki.c rufus.c smart.c stdfn.c stdio.c stdlg.c syslinux.c vhd.c | ||||||
| 
 | 
 | ||||||
| rufus_CFLAGS = -I./ms-sys/inc -I./syslinux/libfat -I./syslinux/libinstaller -I./syslinux/win -I./libcdio $(AM_CFLAGS) | rufus_CFLAGS = -I./ms-sys/inc -I./syslinux/libfat -I./syslinux/libinstaller -I./syslinux/win -I./libcdio $(AM_CFLAGS) | ||||||
| rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows | rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows | ||||||
|  | @ -344,6 +344,12 @@ rufus-checksum.o: checksum.c | ||||||
| rufus-checksum.obj: checksum.c | rufus-checksum.obj: checksum.c | ||||||
| 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-checksum.obj `if test -f 'checksum.c'; then $(CYGPATH_W) 'checksum.c'; else $(CYGPATH_W) '$(srcdir)/checksum.c'; fi` | 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-checksum.obj `if test -f 'checksum.c'; then $(CYGPATH_W) 'checksum.c'; else $(CYGPATH_W) '$(srcdir)/checksum.c'; fi` | ||||||
| 
 | 
 | ||||||
|  | rufus-dev.o: dev.c | ||||||
|  | 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-dev.o `test -f 'dev.c' || echo '$(srcdir)/'`dev.c | ||||||
|  | 
 | ||||||
|  | rufus-dev.obj: dev.c | ||||||
|  | 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-dev.obj `if test -f 'dev.c'; then $(CYGPATH_W) 'dev.c'; else $(CYGPATH_W) '$(srcdir)/dev.c'; fi` | ||||||
|  | 
 | ||||||
| rufus-dos.o: dos.c | rufus-dos.o: dos.c | ||||||
| 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-dos.o `test -f 'dos.c' || echo '$(srcdir)/'`dos.c | 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-dos.o `test -f 'dos.c' || echo '$(srcdir)/'`dos.c | ||||||
| 
 | 
 | ||||||
|  | @ -440,12 +446,6 @@ rufus-syslinux.o: syslinux.c | ||||||
| rufus-syslinux.obj: syslinux.c | rufus-syslinux.obj: syslinux.c | ||||||
| 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-syslinux.obj `if test -f 'syslinux.c'; then $(CYGPATH_W) 'syslinux.c'; else $(CYGPATH_W) '$(srcdir)/syslinux.c'; fi` | 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-syslinux.obj `if test -f 'syslinux.c'; then $(CYGPATH_W) 'syslinux.c'; else $(CYGPATH_W) '$(srcdir)/syslinux.c'; fi` | ||||||
| 
 | 
 | ||||||
| rufus-usb.o: usb.c |  | ||||||
| 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-usb.o `test -f 'usb.c' || echo '$(srcdir)/'`usb.c |  | ||||||
| 
 |  | ||||||
| rufus-usb.obj: usb.c |  | ||||||
| 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-usb.obj `if test -f 'usb.c'; then $(CYGPATH_W) 'usb.c'; else $(CYGPATH_W) '$(srcdir)/usb.c'; fi` |  | ||||||
| 
 |  | ||||||
| rufus-vhd.o: vhd.c | rufus-vhd.o: vhd.c | ||||||
| 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-vhd.o `test -f 'vhd.c' || echo '$(srcdir)/'`vhd.c | 	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-vhd.o `test -f 'vhd.c' || echo '$(srcdir)/'`vhd.c | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| /*
 | /*
 | ||||||
|  * Rufus: The Reliable USB Formatting Utility |  * Rufus: The Reliable USB Formatting Utility | ||||||
|  * USB device listing |  * Device detection and enumeration | ||||||
|  * Copyright © 2014-2016 Pete Batard <pete@akeo.ie> |  * Copyright © 2014-2016 Pete Batard <pete@akeo.ie> | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  * This program is free software: you can redistribute it and/or modify | ||||||
|  | @ -40,7 +40,7 @@ | ||||||
| #include "localization.h" | #include "localization.h" | ||||||
| 
 | 
 | ||||||
| #include "drive.h" | #include "drive.h" | ||||||
| #include "usb.h" | #include "dev.h" | ||||||
| 
 | 
 | ||||||
| extern StrArray DriveID, DriveLabel; | extern StrArray DriveID, DriveLabel; | ||||||
| extern BOOL enable_HDDs, use_fake_units, enable_vmdk, usb_debug, list_non_usb_removable_drives; | extern BOOL enable_HDDs, use_fake_units, enable_vmdk, usb_debug, list_non_usb_removable_drives; | ||||||
|  | @ -157,7 +157,7 @@ static __inline BOOL IsRemovable(const char* buffer) | ||||||
| /*
 | /*
 | ||||||
|  * Refresh the list of USB devices |  * Refresh the list of USB devices | ||||||
|  */ |  */ | ||||||
| BOOL GetUSBDevices(DWORD devnum) | BOOL GetDevices(DWORD devnum) | ||||||
| { | { | ||||||
| 	// List of USB storage drivers we know - list may be incomplete!
 | 	// List of USB storage drivers we know - list may be incomplete!
 | ||||||
| 	const char* usbstor_name[] = { | 	const char* usbstor_name[] = { | ||||||
|  | @ -461,14 +461,18 @@ BOOL GetUSBDevices(DWORD devnum) | ||||||
| 			uprintf("Found VHD device '%s'", buffer); | 			uprintf("Found VHD device '%s'", buffer); | ||||||
| 		} else if ((props.is_CARD) && ((!props.is_USB) || ((props.vid == 0) && (props.pid == 0)))) { | 		} else if ((props.is_CARD) && ((!props.is_USB) || ((props.vid == 0) && (props.pid == 0)))) { | ||||||
| 			uprintf("Found card reader device '%s'", buffer); | 			uprintf("Found card reader device '%s'", buffer); | ||||||
| 		} else if ((!props.is_USB) && (props.is_Removable) && (!props.is_UASP)) { | 		} else if ((!props.is_USB) && (!props.is_UASP) && (props.is_Removable)) { | ||||||
| 			uprintf("Found non-USB removable device '%s'", buffer); | 			uprintf("Found non-USB removable device '%s' => Eliminated", buffer); | ||||||
|  | 			if (!list_non_usb_removable_drives) { | ||||||
|  | 				uuprintf("If you *REALLY* need, you can enable listing of this device with <Ctrl><Alt><F>"); | ||||||
|  | 				continue; | ||||||
|  | 			} | ||||||
| 		} else { | 		} else { | ||||||
| 			if ((props.vid == 0) && (props.pid == 0)) { | 			if ((props.vid == 0) && (props.pid == 0)) { | ||||||
| 				if (!props.is_USB) { | 				if (!props.is_USB) { | ||||||
| 					// If we have a non removable SCSI drive and couldn't get a VID:PID,
 | 					// If we have a non removable SCSI drive and couldn't get a VID:PID,
 | ||||||
| 					// we are most likely dealing with a system drive => eliminate it!
 | 					// we are most likely dealing with a system drive => eliminate it!
 | ||||||
| 					uuprintf("  Non-USB or non-removable => Eliminated"); | 					uuprintf("Found non-USB non-removable device '%s' => Eliminated", buffer); | ||||||
| 					continue; | 					continue; | ||||||
| 				} | 				} | ||||||
| 				safe_strcpy(str, sizeof(str), "????:????");	// Couldn't figure VID:PID
 | 				safe_strcpy(str, sizeof(str), "????:????");	// Couldn't figure VID:PID
 | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| /*
 | /*
 | ||||||
|  * Rufus: The Reliable USB Formatting Utility |  * Rufus: The Reliable USB Formatting Utility | ||||||
|  * USB device listing |  * Device listing | ||||||
|  * Copyright © 2014-2016 Pete Batard <pete@akeo.ie> |  * Copyright © 2014-2016 Pete Batard <pete@akeo.ie> | ||||||
|  * |  * | ||||||
|  * This program is free software: you can redistribute it and/or modify |  * This program is free software: you can redistribute it and/or modify | ||||||
							
								
								
									
										22
									
								
								src/rufus.c
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								src/rufus.c
									
										
									
									
									
								
							|  | @ -2093,7 +2093,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 			case DBT_CUSTOMEVENT:	// Sent by our timer refresh function or for card reader media change
 | 			case DBT_CUSTOMEVENT:	// Sent by our timer refresh function or for card reader media change
 | ||||||
| 				LastRefresh = _GetTickCount64(); | 				LastRefresh = _GetTickCount64(); | ||||||
| 				KillTimer(hMainDialog, TID_REFRESH_TIMER); | 				KillTimer(hMainDialog, TID_REFRESH_TIMER); | ||||||
| 				GetUSBDevices((DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList))); | 				GetDevices((DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList))); | ||||||
| 				user_changed_label = FALSE; | 				user_changed_label = FALSE; | ||||||
| 				return (INT_PTR)TRUE; | 				return (INT_PTR)TRUE; | ||||||
| 			case DBT_DEVNODES_CHANGED: | 			case DBT_DEVNODES_CHANGED: | ||||||
|  | @ -2124,7 +2124,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 		log_displayed = FALSE; | 		log_displayed = FALSE; | ||||||
| 		hLogDlg = MyCreateDialog(hMainInstance, IDD_LOG, hDlg, (DLGPROC)LogProc); | 		hLogDlg = MyCreateDialog(hMainInstance, IDD_LOG, hDlg, (DLGPROC)LogProc); | ||||||
| 		InitDialog(hDlg); | 		InitDialog(hDlg); | ||||||
| 		GetUSBDevices(0); | 		GetDevices(0); | ||||||
| 		CheckForUpdates(FALSE); | 		CheckForUpdates(FALSE); | ||||||
| 		// Register MEDIA_INSERTED/MEDIA_REMOVED notifications for card readers
 | 		// Register MEDIA_INSERTED/MEDIA_REMOVED notifications for card readers
 | ||||||
| 		if ((pfSHChangeNotifyRegister != NULL) && (SUCCEEDED(SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, &pidlDesktop)))) { | 		if ((pfSHChangeNotifyRegister != NULL) && (SUCCEEDED(SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, &pidlDesktop)))) { | ||||||
|  | @ -2429,7 +2429,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 			if ((HIWORD(wParam)) == BN_CLICKED) { | 			if ((HIWORD(wParam)) == BN_CLICKED) { | ||||||
| 				enable_HDDs = !enable_HDDs; | 				enable_HDDs = !enable_HDDs; | ||||||
| 				PrintStatus2000(lmprintf(MSG_253), enable_HDDs); | 				PrintStatus2000(lmprintf(MSG_253), enable_HDDs); | ||||||
| 				GetUSBDevices(0); | 				GetDevices(0); | ||||||
| 			} | 			} | ||||||
| 			break; | 			break; | ||||||
| 		case IDC_START: | 		case IDC_START: | ||||||
|  | @ -2669,7 +2669,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 		EnableControls(TRUE); | 		EnableControls(TRUE); | ||||||
| 		if (wParam) { | 		if (wParam) { | ||||||
| 			uprintf("\r\n"); | 			uprintf("\r\n"); | ||||||
| 			GetUSBDevices(DeviceNum); | 			GetDevices(DeviceNum); | ||||||
| 		} | 		} | ||||||
| 		if (!IS_ERROR(FormatStatus)) { | 		if (!IS_ERROR(FormatStatus)) { | ||||||
| 			// This is the only way to achieve instantaneous progress transition to 100%
 | 			// This is the only way to achieve instantaneous progress transition to 100%
 | ||||||
|  | @ -3073,7 +3073,7 @@ relaunch: | ||||||
| 			usb_debug = !usb_debug; | 			usb_debug = !usb_debug; | ||||||
| 			WriteSettingBool(SETTING_ENABLE_USB_DEBUG, usb_debug); | 			WriteSettingBool(SETTING_ENABLE_USB_DEBUG, usb_debug); | ||||||
| 			PrintStatus2000(lmprintf(MSG_270), usb_debug); | 			PrintStatus2000(lmprintf(MSG_270), usb_debug); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| 		// Alt-, => Disable physical drive locking
 | 		// Alt-, => Disable physical drive locking
 | ||||||
|  | @ -3123,7 +3123,7 @@ relaunch: | ||||||
| 		if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'F')) { | 		if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'F')) { | ||||||
| 			enable_HDDs = !enable_HDDs; | 			enable_HDDs = !enable_HDDs; | ||||||
| 			PrintStatus2000(lmprintf(MSG_253), enable_HDDs); | 			PrintStatus2000(lmprintf(MSG_253), enable_HDDs); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			CheckDlgButton(hMainDialog, IDC_ENABLE_FIXED_DISKS, enable_HDDs?BST_CHECKED:BST_UNCHECKED); | 			CheckDlgButton(hMainDialog, IDC_ENABLE_FIXED_DISKS, enable_HDDs?BST_CHECKED:BST_UNCHECKED); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
|  | @ -3160,7 +3160,7 @@ relaunch: | ||||||
| 			force_large_fat32 = !force_large_fat32; | 			force_large_fat32 = !force_large_fat32; | ||||||
| 			WriteSettingBool(SETTING_FORCE_LARGE_FAT32_FORMAT, force_large_fat32); | 			WriteSettingBool(SETTING_FORCE_LARGE_FAT32_FORMAT, force_large_fat32); | ||||||
| 			PrintStatus2000(lmprintf(MSG_254), force_large_fat32); | 			PrintStatus2000(lmprintf(MSG_254), force_large_fat32); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| 		// Alt N => Enable NTFS compression
 | 		// Alt N => Enable NTFS compression
 | ||||||
|  | @ -3182,7 +3182,7 @@ relaunch: | ||||||
| 		if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'S')) { | 		if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'S')) { | ||||||
| 			size_check = !size_check; | 			size_check = !size_check; | ||||||
| 			PrintStatus2000(lmprintf(MSG_252), size_check); | 			PrintStatus2000(lmprintf(MSG_252), size_check); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| 		// Alt-T => Preserve timestamps when extracting ISO files
 | 		// Alt-T => Preserve timestamps when extracting ISO files
 | ||||||
|  | @ -3197,7 +3197,7 @@ relaunch: | ||||||
| 			use_fake_units = !use_fake_units; | 			use_fake_units = !use_fake_units; | ||||||
| 			WriteSettingBool(SETTING_USE_PROPER_SIZE_UNITS, !use_fake_units); | 			WriteSettingBool(SETTING_USE_PROPER_SIZE_UNITS, !use_fake_units); | ||||||
| 			PrintStatus2000(lmprintf(MSG_263), !use_fake_units); | 			PrintStatus2000(lmprintf(MSG_263), !use_fake_units); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| 		// Alt-V => Save selected device to *UNCOMPRESSED* VHD
 | 		// Alt-V => Save selected device to *UNCOMPRESSED* VHD
 | ||||||
|  | @ -3210,7 +3210,7 @@ relaunch: | ||||||
| 			enable_vmdk = !enable_vmdk; | 			enable_vmdk = !enable_vmdk; | ||||||
| 			WriteSettingBool(SETTING_ENABLE_VMDK_DETECTION, enable_vmdk); | 			WriteSettingBool(SETTING_ENABLE_VMDK_DETECTION, enable_vmdk); | ||||||
| 			PrintStatus2000(lmprintf(MSG_265), enable_vmdk); | 			PrintStatus2000(lmprintf(MSG_265), enable_vmdk); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| 		// Alt-X => Delete the 'rufus_files' subdirectory
 | 		// Alt-X => Delete the 'rufus_files' subdirectory
 | ||||||
|  | @ -3243,7 +3243,7 @@ relaunch: | ||||||
| 			uprintf("NOTE: Listing of non-USB removable drives has been %s.", (list_non_usb_removable_drives)?"enabled (CAUTION!)":"disabled"); | 			uprintf("NOTE: Listing of non-USB removable drives has been %s.", (list_non_usb_removable_drives)?"enabled (CAUTION!)":"disabled"); | ||||||
| 			if (list_non_usb_removable_drives) | 			if (list_non_usb_removable_drives) | ||||||
| 				uprintf("By using this unofficial cheat mode you forfeit ANY RIGHT to complain if you lose valuable data!"); | 				uprintf("By using this unofficial cheat mode you forfeit ANY RIGHT to complain if you lose valuable data!"); | ||||||
| 			GetUSBDevices(0); | 			GetDevices(0); | ||||||
| 			continue; | 			continue; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -421,7 +421,7 @@ extern unsigned char* GetResource(HMODULE module, char* name, char* type, const | ||||||
| extern DWORD GetResourceSize(HMODULE module, char* name, char* type, const char* desc); | extern DWORD GetResourceSize(HMODULE module, char* name, char* type, const char* desc); | ||||||
| extern DWORD RunCommand(const char* cmdline, const char* dir, BOOL log); | extern DWORD RunCommand(const char* cmdline, const char* dir, BOOL log); | ||||||
| extern BOOL CompareGUID(const GUID *guid1, const GUID *guid2); | extern BOOL CompareGUID(const GUID *guid1, const GUID *guid2); | ||||||
| extern BOOL GetUSBDevices(DWORD devnum); | extern BOOL GetDevices(DWORD devnum); | ||||||
| extern BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue); | extern BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue); | ||||||
| extern LONG GetEntryWidth(HWND hDropDown, const char* entry); | extern LONG GetEntryWidth(HWND hDropDown, const char* entry); | ||||||
| extern DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog); | extern DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog); | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 242, 376 | IDD_DIALOG DIALOGEX 12, 12, 242, 376 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| EXSTYLE WS_EX_ACCEPTFILES | EXSTYLE WS_EX_ACCEPTFILES | ||||||
| CAPTION "Rufus 2.9.891" | CAPTION "Rufus 2.9.892" | ||||||
| FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 |     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 | ||||||
|  | @ -320,8 +320,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 2,9,891,0 |  FILEVERSION 2,9,892,0 | ||||||
|  PRODUCTVERSION 2,9,891,0 |  PRODUCTVERSION 2,9,892,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -338,13 +338,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", "2.9.891" |             VALUE "FileVersion", "2.9.892" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2016 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", "2.9.891" |             VALUE "ProductVersion", "2.9.892" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue