if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
set vtback_cfg_find=1
+ elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
+ syslinux_configfile (loop)/boot/syslinux/porteus.cfg
+ set vtback_cfg_find=1
fi
fi
if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
set vtback_cfg_find=1
+ elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
+ syslinux_configfile (loop)/boot/syslinux/porteus.cfg
+ set vtback_cfg_find=1
fi
fi
get_os_type (loop)
+ ventoy_debug_pause
+
if vt_need_secondary_menu "$vt_chosen_name"; then
vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size
if [ "$VTOY_SECOND_EXIT" = "1" ]; then
return bRet;\r
}\r
\r
-static CHAR GetIMDiskMountLogicalDrive(void)\r
+static CHAR GetIMDiskMountLogicalDrive(const char *suffix)\r
{\r
CHAR Letter = 'Y';\r
DWORD Drives;\r
return 'M';\r
}\r
\r
+ //fixed use Z as mountpoint for Lenovo Product Recovery\r
+ if (strcmp(suffix, "VTLRI") == 0)\r
+ {\r
+ return 'Z';\r
+ }\r
+\r
Drives = GetLogicalDrives();\r
Log("Drives=0x%x", Drives);\r
\r
return rc;\r
}\r
\r
-static int VentoyRunImdisk(const char *IsoPath, const char *imdiskexe, const char *opt)\r
+static int VentoyRunImdisk(const char *suffix, const char *IsoPath, const char *imdiskexe, const char *opt)\r
{\r
CHAR Letter;\r
CHAR Cmdline[512];\r
WCHAR CmdlineW[512];\r
PROCESS_INFORMATION Pi;\r
\r
- Log("VentoyRunImdisk <%s> <%s> <%s>", IsoPath, imdiskexe, opt);\r
+ Log("VentoyRunImdisk <%s> <%s> <%s> <%s>", suffix, IsoPath, imdiskexe, opt);\r
\r
- Letter = GetIMDiskMountLogicalDrive();\r
+ Letter = GetIMDiskMountLogicalDrive(suffix);\r
\r
- if (opt)\r
- {\r
- sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o %s -f \"%s\" -m %C:", imdiskexe, opt, IsoPath, Letter);\r
- }\r
- else\r
- {\r
- sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -f \"%s\" -m %C:", imdiskexe, IsoPath, Letter);\r
- }\r
- \r
+ sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o %s -f \"%s\" -m %C:", imdiskexe, opt, IsoPath, Letter); \r
Log("mount iso to %C: use imdisk cmd <%s>", Letter, Cmdline);\r
\r
if (IsUTF8Encode(IsoPath))\r
\r
if (0 == VentoyCopyImdisk(PhyDrive, ImPath))\r
{\r
- VentoyRunImdisk(IsoPath, ImPath, "ro");\r
+ VentoyRunImdisk("iso", IsoPath, ImPath, "ro");\r
rc = 0;\r
}\r
\r
\r
VentoyCopyImdisk(PhyDrive, ImDiskPath);\r
\r
- VentoyRunImdisk(ImgPath, ImDiskPath, "rem");\r
+ VentoyRunImdisk("VTLRI", ImgPath, ImDiskPath, "ro,rem");\r
\r
return 0;\r
}\r