mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-30 14:35:21 -04:00
[ui] UI redesign
* Better guide the user through the flow of operations * Also follow a concept design by Fahad Al-Riyami * Closes #117
This commit is contained in:
parent
95db209b04
commit
a44518355f
31 changed files with 3114 additions and 3572 deletions
24
src/iso.c
24
src/iso.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Rufus: The Reliable USB Formatting Utility
|
||||
* ISO file extraction
|
||||
* Copyright © 2011-2016 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2011-2018 Pete Batard <pete@akeo.ie>
|
||||
* Based on libcdio's iso & udf samples:
|
||||
* Copyright © 2003-2014 Rocky Bernstein <rocky@gnu.org>
|
||||
*
|
||||
|
@ -1170,7 +1170,7 @@ BOOL ExtractEfiImgFiles(const char* dir)
|
|||
iso9660_readfat_private* p_private = NULL;
|
||||
libfat_sector_t s;
|
||||
int32_t dc, c;
|
||||
struct libfat_filesystem *fs = NULL;
|
||||
struct libfat_filesystem *lf_fs = NULL;
|
||||
struct libfat_direntry direntry;
|
||||
char name[12] = { 0 };
|
||||
char path[64];
|
||||
|
@ -1201,17 +1201,17 @@ BOOL ExtractEfiImgFiles(const char* dir)
|
|||
uprintf("Error reading ISO-9660 file %s at LSN %lu\n", img_report.efi_img_path, (long unsigned int)p_private->lsn);
|
||||
goto out;
|
||||
}
|
||||
fs = libfat_open(iso9660_readfat, (intptr_t)p_private);
|
||||
if (fs == NULL) {
|
||||
lf_fs = libfat_open(iso9660_readfat, (intptr_t)p_private);
|
||||
if (lf_fs == NULL) {
|
||||
uprintf("FAT access error");
|
||||
goto out;
|
||||
}
|
||||
|
||||
// Navigate to /EFI/BOOT
|
||||
if (libfat_searchdir(fs, 0, "EFI ", &direntry) < 0)
|
||||
if (libfat_searchdir(lf_fs, 0, "EFI ", &direntry) < 0)
|
||||
goto out;
|
||||
dc = direntry.entry[26] + (direntry.entry[27] << 8);
|
||||
if (libfat_searchdir(fs, dc, "BOOT ", &direntry) < 0)
|
||||
if (libfat_searchdir(lf_fs, dc, "BOOT ", &direntry) < 0)
|
||||
goto out;
|
||||
dc = direntry.entry[26] + (direntry.entry[27] << 8);
|
||||
|
||||
|
@ -1228,7 +1228,7 @@ BOOL ExtractEfiImgFiles(const char* dir)
|
|||
} else
|
||||
name[k++] = toupper(efi_bootname[i][j]);
|
||||
}
|
||||
c = libfat_searchdir(fs, dc, name, &direntry);
|
||||
c = libfat_searchdir(lf_fs, dc, name, &direntry);
|
||||
if (c > 0) {
|
||||
if (dir == NULL) {
|
||||
if (!ret)
|
||||
|
@ -1265,9 +1265,9 @@ BOOL ExtractEfiImgFiles(const char* dir)
|
|||
}
|
||||
|
||||
written = 0;
|
||||
s = libfat_clustertosector(fs, c);
|
||||
s = libfat_clustertosector(lf_fs, c);
|
||||
while ((s != 0) && (s < 0xFFFFFFFFULL) && (written < file_size)) {
|
||||
buf = libfat_get_sector(fs, s);
|
||||
buf = libfat_get_sector(lf_fs, s);
|
||||
size = MIN(LIBFAT_SECTOR_SIZE, file_size - written);
|
||||
if (!WriteFileWithRetry(handle, buf, size, &size, WRITE_RETRIES) ||
|
||||
(size != MIN(LIBFAT_SECTOR_SIZE, file_size - written))) {
|
||||
|
@ -1276,7 +1276,7 @@ BOOL ExtractEfiImgFiles(const char* dir)
|
|||
continue;
|
||||
}
|
||||
written += size;
|
||||
s = libfat_nextsector(fs, s);
|
||||
s = libfat_nextsector(lf_fs, s);
|
||||
}
|
||||
CloseHandle(handle);
|
||||
ret = TRUE;
|
||||
|
@ -1285,8 +1285,8 @@ BOOL ExtractEfiImgFiles(const char* dir)
|
|||
}
|
||||
|
||||
out:
|
||||
if (fs != NULL)
|
||||
libfat_close(fs);
|
||||
if (lf_fs != NULL)
|
||||
libfat_close(lf_fs);
|
||||
if (p_statbuf != NULL)
|
||||
safe_free(p_statbuf->rr.psz_symlink);
|
||||
safe_free(p_statbuf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue