1. Change the UTF-16 languages.ini to UTF-8 languages.json

2. The update button is available even if data corrupted in VTOYEFI partition.
3. Set the default focus to No when you click Install button in Ventoy2Disk.exe.
4. Fix a BUG when booting Windows VHD(x) with the latest ventoy_vhdboot.img.
5. Support boot Windows VHD(x) files in local disk.
This commit is contained in:
longpanda 2021-05-08 14:22:37 +08:00
parent 7715bd705c
commit 849dfb463d
28 changed files with 7477 additions and 4512 deletions

View file

@ -464,10 +464,13 @@ static int vtoy_check_device(ventoy_os_param *param, const char *device)
static int vtoy_print_os_param(ventoy_os_param *param, char *diskname)
{
int cnt = 0;
int fd, size;
int cnt = 0;
char *path = param->vtoy_img_path;
const char *fs;
char diskpath[256] = {0};
char sizebuf[64] = {0};
cnt = vtoy_find_disk_by_size(param->vtoy_disk_size, diskname);
debug("find disk by size %llu, cnt=%d...\n", (unsigned long long)param->vtoy_disk_size, cnt);
if (1 == cnt)
@ -494,6 +497,37 @@ static int vtoy_print_os_param(ventoy_os_param *param, char *diskname)
if (1 == cnt)
{
if (strstr(diskname, "nvme") || strstr(diskname, "mmc") || strstr(diskname, "nbd"))
{
snprintf(diskpath, sizeof(diskpath) - 1, "/sys/class/block/%sp2/size", diskname);
}
else
{
snprintf(diskpath, sizeof(diskpath) - 1, "/sys/class/block/%s2/size", diskname);
}
if (access(diskpath, F_OK) >= 0)
{
debug("get part size from sysfs for %s\n", diskpath);
fd = open(diskpath, O_RDONLY | O_BINARY);
if (fd >= 0)
{
read(fd, sizebuf, sizeof(sizebuf));
size = (int)strtoull(sizebuf, NULL, 10);
close(fd);
if ((size != (64 * 1024)) && (size != (8 * 1024)))
{
debug("sizebuf=<%s> size=%d\n", sizebuf, size);
return 1;
}
}
}
else
{
debug("%s not exist \n", diskpath);
}
printf("/dev/%s#%s#%s\n", diskname, fs, path);
return 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.