search for: syslinux_setadv

Displaying 9 results from an estimated 9 matches for "syslinux_setadv".

2017 Jan 25
2
Possible to persist data across reboots from Lua?
I'd like to be able to save a boolean value across reboots. I believe that being able to store to the auxiliary data vector would satisfy this need, but I'm using syslinux and that doesn't seem to be implemented. While I'm currently using a Lua script, I'm not tied to it, so if there's a way to read and write any persistent filesystem or disk, I'd be happy to switch.
2015 Oct 13
0
[PATCH 1/2] ldlinux: fix stack overflow when running COM32 modules
...fter the last character of the * command. @@ -302,6 +304,7 @@ __export int main(int argc __unused, char **argv) const void *adv; const char *cmdline; size_t count = 0; + int retval; ldlinux_console_init(); @@ -333,16 +336,25 @@ __export int main(int argc __unused, char **argv) if (!syslinux_setadv(ADV_BOOTONCE, 0, NULL)) syslinux_adv_write(); - load_kernel(cmdline); /* Shouldn't return */ - ldlinux_enter_command(); - } - - if (!forceprompt && !shift_is_held()) - ldlinux_auto_boot(); + /* + * The corresponding longjmp is located in the execute function + * after a CO...
2017 Jan 27
0
Possible to persist data across reboots from Lua?
...Syslinux API, just not exported to Lua. > While I'm currently using a Lua script, I'm not tied to it, so if > there's a way to read and write any persistent filesystem or disk, I'd > be happy to switch. I think the best would be adding Lua bindings for syslinux_getadv(), syslinux_setadv(), syslinux_adv_write(), syslinux_adv_size() and the BOOTONCE and MENUSAVE tags. And define some policy for allocating new tags... which is the hard part. > Reading through the source code, it seems like most filesystem > operations are read-only Yes, the filesystem drivers in Syslinux are...
2010 Jun 07
0
[PATCH] extlinux: Add the --menu-save option to set the MENU SAVE value from the running system using extlinux
...| 3 +++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index 0669bb9..8a0ac63 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -381,6 +381,13 @@ int modify_adv(void) rv = -1; } } + if (opt.menu_save) { + if (syslinux_setadv(ADV_MENUSAVE, strlen(opt.menu_save), opt.menu_save)) { + fprintf(stderr, "%s: not enough space for menu-save label\n", + program); + rv = -1; + } + } return rv; } @@ -877,7 +884,7 @@ int main(int argc, char *argv[]) usage(EX_USAGE, 0); if (opt.updat...
2015 Oct 13
5
[PATCH 0/2] Stack overflows when running commands
From: Sylvain Gault <sylvain.gault at gmail.com> Hello there, I propose 2 patches that fix two possible stack overflows either when running a COM32 module or when loading a new config file. I didn't find a better way to do this than to use the infamous setjmp/longjmp functions to restore the stack to a previous state. This makes the logic a bit more complex, but the behavior is not
2011 May 25
1
[GIT PULL] elflink ldlinux
...dv; + cmdline = dst = malloc(count + 1); + if (!dst) { + printf("Failed to allocate memory for ADV\n"); + goto cmdline; + } + + for (i = 0; i < count; i++) + *dst++ = *src++; + *dst = '\0'; /* Null-terminate */ + + /* Clear the boot-once data from the ADV */ + if (!syslinux_setadv(ADV_BOOTONCE, 0, NULL)) + syslinux_adv_write(); + + load_kernel(cmdline); /* Shouldn't return */ + goto cmdline; + } + /* TODO: Check KbdFlags? */ if (forceprompt) diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 441651e..8ded92a 100644 --- a/...
2012 Jul 16
5
[PATCH 0/5] Deleting __intcall() from Syslinux
From: Matt Fleming <matt.fleming at intel.com> Since we can't use __intcall() for EFI, and since we can now have the ELF module code resolve all our symbols at runtime, we should delete as many references to __intcall() as possible and just access the symbols directly. The most interesting patch is the support for weak symbols. We need to be able to reference derivative-specific
2012 Aug 14
1
[GIT PULL] elflink fixes
...n error, and set errno. - * - * NOTE: Data is not written to disk unless - * syslinux_adv_write() is called. - */ - -#include <syslinux/adv.h> -#include <klibc/compiler.h> -#include <inttypes.h> -#include <string.h> -#include <errno.h> -#include <alloca.h> - -int syslinux_setadv(int tag, size_t size, const void *data) -{ - uint8_t *p, *advtmp; - size_t rleft, left; - - if ((unsigned)tag - 1 > 254) { - errno = EINVAL; - return -1; /* Impossible tag value */ - } - - if (size > 255) { - errno = ENOSPC; /* Max 255 bytes for a data item */ - return -1; -...
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com> This series fixes some bugs and switches the elflink branch to be entirely ELF modules. It applies on top of, http://syslinux.zytor.com/archives/2011-April/016369.html The deletions in the diff stat below are mainly from deleting com32/elflink/modules (finally!). Now there should be no duplicate code because we don't need COM32 and