search for: refstr_put

Displaying 17 results from an estimated 17 matches for "refstr_put".

2019 May 24
3
[PATCH] (vesa)menu.c32: Add support for BLS
...; + const char *linux_; + const char *initrd; + const char *efi; + char *options; + const char *devicetree; + const char *architecture; + char *sort_field; /* used internally for sorting */ + const char *filename; +}; + +static void clear_bls_data(struct blsdata *bd) +{ + refstr_put(bd->title); + refstr_put(bd->version); + free(bd->version0); + refstr_put(bd->machine_id); + refstr_put(bd->linux_); + refstr_put(bd->initrd); + refstr_put(bd->efi); + free(bd->options); + refstr_put(bd->devicetree); + refstr_put(bd->architec...
2019 Jul 09
0
[PATCH] core: Add support for BLS Type 1 entries
...;) == 0) + return bd->architecture; + if (strcmp(fieldname, "other") == 0) + return bd->other; + + return NULL; +} + +/* + * inspired by syslinux/com32/elflink/ldlinux/readconfig.c:clear_label_data + */ +void clear_bls_data(struct blsdata *bd) +{ + if (!bd) + return; + + refstr_put(bd->filename); + refstr_put(bd->title); + refstr_put(bd->version); + refstr_put(bd->version0); + refstr_put(bd->machine_id); + refstr_put(bd->freax); + free(bd->initrd); + refstr_put(bd->efi); + free(bd->options); + refstr_put(bd->devicetree)...
2019 May 25
2
[PATCH] (vesa)menu.c32: Add support for BLS
...; + dprintf("Opening bls entry: %s ", filename); > > + > > + f = fopen(filename, "r"); > > + dprintf("%s\n", f ? "ok" : "failed"); > > + > > + if (!f) > > + return -1; > > + > > + refstr_put(bd->filename); > > + bd->filename = refstrdup(filename); > > + > > + while (fgets(line, sizeof line, f)) { > > + p = strchr(line, '\r'); > > + if (p) > > + *p = '\0'; > > + p = strchr(line, '\n...
2019 May 25
0
[PATCH] (vesa)menu.c32: Add support for BLS
...; > + char *sort_field; > + > + dprintf("Opening bls entry: %s ", filename); > + > + f = fopen(filename, "r"); > + dprintf("%s\n", f ? "ok" : "failed"); > + > + if (!f) > + return -1; > + > + refstr_put(bd->filename); > + bd->filename = refstrdup(filename); > + > + while (fgets(line, sizeof line, f)) { > + p = strchr(line, '\r'); > + if (p) > + *p = '\0'; > + p = strchr(line, '\n'); > + if (p) > +...
2019 May 27
0
[PATCH] (vesa)menu.c32: Add support for BLS
...%s ", filename); > > > + > > > + f = fopen(filename, "r"); > > > + dprintf("%s\n", f ? "ok" : "failed"); > > > + > > > + if (!f) > > > + return -1; > > > + > > > + refstr_put(bd->filename); > > > + bd->filename = refstrdup(filename); > > > + > > > + while (fgets(line, sizeof line, f)) { > > > + p = strchr(line, '\r'); > > > + if (p) > > > + *p = '\0'; > > &gt...
2016 Jun 29
0
Fwd: [PATCH] {vesa}menu.c32 feature => hide menu entry for specific sources
...} + if (ld->label) { char ipoptions[4096], *ipp; const char *a; @@ -744,9 +774,14 @@ static void parse_config_file(FILE * f) } else if ((ep = looking_at(p, "include"))) { goto do_include; } else if ((ep = looking_at(p, "background"))) { - p = skipspace(ep); - refstr_put(m->menu_background); - m->menu_background = refdup_word(&p); + p = skipspace(ep); + refstr_put(m->menu_background); + m->menu_background = refdup_word(&p); + } else if ((ep = looking_at(p, "hideifnot"))){ + if (ld.label) { + refstr_put(ld.visiblesource); +...
2019 Apr 26
1
Fix: menu indent for menu entry
.../* Handle indentation of item with sub-menu while there's no item yet */ + if (m->parent_entry && m->nentries == 0 && ld->menuindent) { + const char *dn; + + rsprintf(&dn, "%*s%s", ld->menuindent, "", m->parent_entry->displayname); + refstr_put(m->parent_entry->displayname); + m->parent_entry->displayname = dn; + } + if (!ld->label) return; /* Nothing defined */ # end of patch
2010 May 30
1
[RFC PATCH] menu: support single key booting
...r *dn; @@ -653,6 +655,8 @@ static void parse_config_file(FILE * f) } } else if (looking_at(p, "hide")) { ld.menuhide = 1; + } else if (looking_at(p, "commit")) { + ld.menucommit = 1; } else if (looking_at(p, "passwd")) { if (ld.label) { refstr_put(ld.passwd); @@ -931,7 +935,7 @@ do_include: ld.helptext = NULL; ld.ipappend = ipappend; ld.menudefault = ld.menuhide = ld.menuseparator = - ld.menudisabled = ld.menuindent = 0; + ld.menudisabled = ld.menuindent = ld.menucommit = 0; } else if ((ep = is_kernel_type(p, &type)...
2011 Mar 09
14
[PATCH 00/12] elflink shrinkage
From: Matt Fleming <matt.fleming at linux.intel.com> This is a series of patches that, * shrink the core by moving things into an ldlinux ELF module * begin wiring up some of the C versions of various functions The core now only contains essential code and loads the ldlinux module to do everything else, like providing a command line interface and loading kernels. The config file parsing
2013 Jun 12
3
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Wed, 12 Jun, at 11:17:44AM, Gerardo Exequiel Pozzi wrote: > Cool thanks!. Now looks better, but still not work. > > For some reason, "ldlinux.c32" is apparently sent but "Failed to load" > by PXELINUX and few seconds later, dnsmasq shows an error message > "failed sending": Argh! The patch was broken. I missed the new core/path.c file. My bad.
2013 Jun 12
5
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...arated by a space, e.g. + * + * PATH /bar /bin/foo /baz/bar/bin + */ +static int parse_path(char *p) +{ + struct path_entry *entry; + const char *str; + + while (*p) { + /* Find the next directory */ + str = refdup_word(&p); + if (!str) + goto bail; + + entry = path_add(str); + refstr_put(str); + + if (!entry) + goto bail; + + p = skipspace(p); + } + + return 0; + +bail: + return -1; +} + static void parse_config_file(FILE * f) { char line[MAX_LINE], *p, *ep, ch; @@ -1337,24 +1370,8 @@ do_include: } else if (looking_at(p, "say")) { printf("%s\...
2011 May 25
1
[GIT PULL] elflink ldlinux
Hi, These patches contain support for some features that are already in Syslinux 4 but weren't working properly on the elflink branch. It's another step closer to feature parity with Syslinux 4. Having to jump through the comboot API for localboot support is less than ideal and I'll eventually fix that, probably when we move a big chunk of code from asm to C. Also, there's a
2013 Jun 12
0
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...arated by a space, e.g. + * + * PATH /bar /bin/foo /baz/bar/bin + */ +static int parse_path(char *p) +{ + struct path_entry *entry; + const char *str; + + while (*p) { + /* Find the next directory */ + str = refdup_word(&p); + if (!str) + goto bail; + + entry = path_add(str); + refstr_put(str); + + if (!entry) + goto bail; + + p = skipspace(p); + } + + return 0; + +bail: + return -1; +} + static void parse_config_file(FILE * f) { char line[MAX_LINE], *p, *ep, ch; @@ -1337,24 +1370,8 @@ do_include: } else if (looking_at(p, "say")) { printf("%s\...
2013 Jun 11
2
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Mon, 10 Jun, at 07:57:50AM, H. Peter Anvin wrote: > Either that or make the path a list rather than a string, using the > normal word separators when entered on the command line, a bit like the > (t)csh does. That is a bigger change but is probably a better solution. How would this solution handle filenames containing spaces? Would we need to escape (presumably with a backslash)
2013 Jun 12
0
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...t; + */ > +static int parse_path(char *p) > +{ > + struct path_entry *entry; > + const char *str; > + > + while (*p) { > + /* Find the next directory */ > + str = refdup_word(&p); > + if (!str) > + goto bail; > + > + entry = path_add(str); > + refstr_put(str); > + > + if (!entry) > + goto bail; > + > + p = skipspace(p); > + } > + > + return 0; > + > +bail: > + return -1; > +} > + > static void parse_config_file(FILE * f) > { > char line[MAX_LINE], *p, *ep, ch; > @@ -1337,24 +137...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...en do sth */ else if (looking_at(p, "display")) { - char *filename, *dst = KernelName; + const char *filename; + char *dst = KernelName; size_t len = FILENAME_MAX - 1; filename = refstrdup(skipspace(p + 7)); @@ -1133,7 +1134,8 @@ do_include: get_msg_file(KernelName); refstr_put(filename); } else if (looking_at(p, "font")) { - char *filename, *dst = KernelName; + const char *filename; + char *dst = KernelName; size_t len = FILENAME_MAX - 1; filename = refstrdup(skipspace(p + 4)); @@ -1145,8 +1147,8 @@ do_include: loadfont(KernelName); refstr_pu...
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