mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[iso] iso standalone test improvements
* memleaks check * cleanup
This commit is contained in:
		
							parent
							
								
									668e2d54f5
								
							
						
					
					
						commit
						9ba3b885ff
					
				
					 2 changed files with 20 additions and 17 deletions
				
			
		
							
								
								
									
										25
									
								
								src/iso.c
									
										
									
									
									
								
							
							
						
						
									
										25
									
								
								src/iso.c
									
										
									
									
									
								
							|  | @ -62,35 +62,31 @@ static void print_file_info(const udf_dirent_t *p_udf_dirent, const char* psz_di | |||
| 	const char *psz_fname = psz_dirname?psz_dirname:udf_get_filename(p_udf_dirent); | ||||
| 
 | ||||
| 	/* Print directory attributes*/ | ||||
| 	uprintf("%s %4d %lu %s %s\n", udf_mode_string(udf_get_posix_filemode(p_udf_dirent), psz_mode), | ||||
| 	uprintf("%s %4d %lu %s %s", udf_mode_string(udf_get_posix_filemode(p_udf_dirent), psz_mode), | ||||
| 		udf_get_link_count(p_udf_dirent), (long unsigned int)udf_get_file_length(p_udf_dirent), | ||||
| 		(*psz_fname?psz_fname:"/"), ctime(&mod_time)); | ||||
| } | ||||
| 
 | ||||
| static udf_dirent_t* list_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const char *psz_path) | ||||
| static void list_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const char *psz_path) | ||||
| { | ||||
| 	if (!p_udf_dirent) | ||||
| 		return NULL; | ||||
| 		return; | ||||
| 	print_file_info(p_udf_dirent, psz_path); | ||||
| 	while (udf_readdir(p_udf_dirent)) { | ||||
| 		if (udf_is_dir(p_udf_dirent)) { | ||||
| 			udf_dirent_t *p_udf_dirent2 = udf_opendir(p_udf_dirent); | ||||
| 			if (p_udf_dirent2) { | ||||
| 				const char *psz_dirname = udf_get_filename(p_udf_dirent); | ||||
| 				const unsigned int i_newlen=2 + strlen(psz_path) + strlen(psz_dirname); | ||||
| 				const unsigned int i_newlen = 2 + strlen(psz_path) + strlen(psz_dirname); | ||||
| 				char* psz_newpath = (char*)calloc(sizeof(char), i_newlen); | ||||
| 				_snprintf(psz_newpath, i_newlen, "%s%s/", psz_path, psz_dirname); | ||||
| 				uprintf("psz_newpath = %s\n", psz_newpath); | ||||
| 				list_files(p_udf, p_udf_dirent2, psz_newpath); | ||||
| 				free(psz_newpath); | ||||
| 			} else { | ||||
| 				uprintf("Could not open UDF directory!\n"); | ||||
| 			} | ||||
| 		} else { | ||||
| 			print_file_info(p_udf_dirent, NULL); | ||||
| 		} | ||||
| 	} | ||||
| 	return p_udf_dirent; | ||||
| } | ||||
| 
 | ||||
| BOOL ExtractISO(const char* src_iso, const char* dest_dir) | ||||
|  | @ -128,7 +124,6 @@ BOOL ExtractISO(const char* src_iso, const char* dest_dir) | |||
| 	} | ||||
| 	uprintf("partition number: %d\n", udf_get_part_number(p_udf)); | ||||
| 	list_files(p_udf, p_udf_root, ""); | ||||
| 	udf_dirent_free(p_udf_root); | ||||
| 
 | ||||
| 	r = TRUE; | ||||
| 	goto out; | ||||
|  | @ -225,7 +220,15 @@ out: | |||
| #ifdef ISO_TEST | ||||
| int main(int argc, char** argv) | ||||
| { | ||||
| 	ExtractISO("D:\\src\\libcdio\\test\\udf102.iso", NULL); | ||||
| 	return 0; | ||||
| //	ExtractISO("D:\\src\\libcdio\\test\\udf102.iso", NULL);
 | ||||
| 	ExtractISO("D:\\Incoming\\en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso", NULL); | ||||
| 
 | ||||
| 	while(getchar() != 0x0a); | ||||
| 
 | ||||
| #ifdef _CRTDBG_MAP_ALLOC | ||||
| 	_CrtDumpMemoryLeaks(); | ||||
| #endif | ||||
| 
 | ||||
| 	exit(0); | ||||
| } | ||||
| #endif | ||||
|  |  | |||
							
								
								
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL | |||
| IDD_DIALOG DIALOGEX 12, 12, 206, 278 | ||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||
| EXSTYLE WS_EX_APPWINDOW | ||||
| CAPTION "Rufus v1.0.7.128" | ||||
| CAPTION "Rufus v1.0.7.129" | ||||
| FONT 8, "MS Shell Dlg", 400, 0, 0x1 | ||||
| BEGIN | ||||
|     DEFPUSHBUTTON   "Start",IDC_START,94,236,50,14 | ||||
|  | @ -70,7 +70,7 @@ BEGIN | |||
|     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP | ||||
|     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, | ||||
|                     "SysLink",WS_TABSTOP,46,47,114,9 | ||||
|     LTEXT           "Version 1.0.7 (Build 128)",IDC_STATIC,46,19,78,8 | ||||
|     LTEXT           "Version 1.0.7 (Build 129)",IDC_STATIC,46,19,78,8 | ||||
|     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP | ||||
|     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL | ||||
|     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 | ||||
|  | @ -208,8 +208,8 @@ END | |||
| // | ||||
| 
 | ||||
| VS_VERSION_INFO VERSIONINFO | ||||
|  FILEVERSION 1,0,7,128 | ||||
|  PRODUCTVERSION 1,0,7,128 | ||||
|  FILEVERSION 1,0,7,129 | ||||
|  PRODUCTVERSION 1,0,7,129 | ||||
|  FILEFLAGSMASK 0x3fL | ||||
| #ifdef _DEBUG | ||||
|  FILEFLAGS 0x1L | ||||
|  | @ -226,13 +226,13 @@ BEGIN | |||
|         BEGIN | ||||
|             VALUE "CompanyName", "akeo.ie" | ||||
|             VALUE "FileDescription", "Rufus" | ||||
|             VALUE "FileVersion", "1.0.7.128" | ||||
|             VALUE "FileVersion", "1.0.7.129" | ||||
|             VALUE "InternalName", "Rufus" | ||||
|             VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" | ||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||
|             VALUE "OriginalFilename", "rufus.exe" | ||||
|             VALUE "ProductName", "Rufus" | ||||
|             VALUE "ProductVersion", "1.0.7.128" | ||||
|             VALUE "ProductVersion", "1.0.7.129" | ||||
|         END | ||||
|     END | ||||
|     BLOCK "VarFileInfo" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue