cmd_append (const char *line, struct syslinux_menu *menu)
{
if (!menu->entries)
- return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label");
+ return GRUB_ERR_NONE;
+ //return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label");
menu->entries->append = grub_strdup (line);
if (!menu->entries->append)
}\
}
+#define VTOY_SKIP_SPACE(s) \
+ while (ventoy_isspace(*s)) \
+ {\
+ s++;\
+ }
+
+#define VTOY_SKIP_SPACE_NEXT(s, initial) \
+ s += initial;\
+ while (ventoy_isspace(*s)) \
+ {\
+ s++;\
+ }
+
typedef enum VTOY_FILE_FLT
{
VTOY_FILE_FLT_ISO = 0, /* .iso */
{
nextline = ventoy_get_line(start);
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
offset = 7; // strlen("initrd=") or "INITRD " or "initrd "
pos = grub_strstr(start, "initrd=");
{
nextline = ventoy_get_line(start);
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
if (grub_strncmp(start, "initrd", 6) != 0)
{
start++;
}
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
if (*start == '"')
{
if (*start == ' ' || *start == '\t')
{
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
}
else
{
for (start = buf; start; start = nextline)
{
nextline = ventoy_get_line(start);
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
if (grub_strncmp(start, tag, taglen) == 0 && (start[taglen] == ' ' || start[taglen] == '\t'))
{
start += taglen;
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
return start;
}
}
for (start = filebuf; start; start = nextline)
{
nextline = ventoy_get_line(start);
- while (ventoy_isspace(*start))
- {
- start++;
- }
+ VTOY_SKIP_SPACE(start);
if (start[0] == ':')
{
configfile "mem:${vt_sys_menu_mem_addr}:size:${vt_sys_menu_mem_size}"
fi
fi
+
+ if [ $vtback_cfg_find -eq 0 ]; then
+ if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
+ syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
+ set vtback_cfg_find=1
+ fi
+ fi
if [ "$vtback_cfg_find" = "0" ]; then
echo " "
configfile "mem:${vt_sys_menu_mem_addr}:size:${vt_sys_menu_mem_size}"
fi
fi
+
+ if [ $vtback_cfg_find -eq 0 ]; then
+ if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
+ syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
+ set vtback_cfg_find=1
+ fi
+ fi
vt_unset_boot_opt
set root=$vtback_root