aboutsummaryrefslogtreecommitdiffstats
path: root/com32
Commit message (Collapse)AuthorAgeFilesLines
...
* hdt: fix sizeof(char *) misuseJonathan Boeing2015-05-031-89/+89
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to memset. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* gpllib: fix sizeof(char *) misuseJonathan Boeing2015-05-031-10/+14
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to strlcpy and snprintf. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* Use z width specifier when printing size_t variableJonathan Boeing2015-05-031-1/+1
| | | | | | | Fixes the warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* add missing '\n' to dprintfJonathan Boeing2015-05-031-2/+2
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* fix a few typosJonathan Boeing2015-05-031-1/+1
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* com32/lib/syslinux/load_linux.c: update prot_mode_baseScot Doyle2015-04-181-0/+1
| | | | | | | | | | | | | | | | | If the kernel is relocatable and the protected mode code will not fit in the initially determined location, that code will be moved to the next available location. However, beginning with commit 8f470e7b, the code is moved to the initially determined location instead of the next available location because prot_mode_base is no longer updated to the correct location. Since whdr->code32_start is updated, it is pointing to the wrong execution start location, random code is executed and the machine is rebooted. Restore the old behavior by assigning prot_mode_base the value of base. Tested on a machine that exposed this behavior. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chain: year update in commments (trivial)Gene Cumm2015-03-1511-11/+11
| | | | | Signed-off-by: Michal Soltys <soltys@ziu.info> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chain/partiter: add options to ignore GPT crc checksMichal Soltys2015-03-153-22/+45
| | | | | | | | This can be useful to force boot even if checksums of GPT header and/or partition list are invalid. This works independently from 'strict' option. Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain/partiter: call notsane_gpt_hdr() per headerMichal Soltys2015-03-151-48/+48
| | | | | | | | | | | | Instead of calling it just once after the examination of both headers (the 2nd one only if necessary) - call it per each header during examination. Thus in unlikely situation of passing crc check on primary gpt header and at the same time failing sanity checks, it will also try backup header. Signed-off-by: Michal Soltys <soltys@ziu.info>
* load_linux: correct a typeScot Doyle2015-02-141-2/+2
| | | | | | | | Correct base's type to match its initialization from prot_mode_base and passage to syslinux_memmap_find(). Tested with extlinux. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Merge remote-tracking branch 'u-gh-wferi/pub'Gene Cumm2015-02-145-341/+329
|\ | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * lua: simplify the function/value handling in the automenu testFerenc Wágner2014-10-131-10/+7
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: move the automenu test from the boot_linux to the boot_it bindingFerenc Wágner2014-10-131-5/+18
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: return the modified object from the initramfs methodsFerenc Wágner2014-10-132-4/+8
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: refresh and extend the documentationFerenc Wágner2014-10-131-128/+93
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: initramfs: enable adding nonempty filesFerenc Wágner2014-10-131-4/+11
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: don't do a local boot when asked to final_cleanupFerenc Wágner2014-10-131-2/+1
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: do not leak initramfs data chunks on garbage collectionFerenc Wágner2014-10-131-0/+16
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: make initramfs structures full userdata objects with methodsFerenc Wágner2014-10-131-25/+43
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: unused optional arguments can goFerenc Wágner2014-10-121-10/+0
| | | | | | | | | | | | Not expecting them does not cause any problems, they are ignored by Lua anyway. Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: make the file operations methodsFerenc Wágner2014-10-121-2/+7
| | | | | | | | | | | | This also enables manual unloading of files by callig f:__gc(). Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: garbage collect file objectsFerenc Wágner2014-10-121-0/+15
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: represent syslinux files as full userdataFerenc Wágner2014-10-121-21/+13
| | | | | | | | | | | | | | | | | | Light userdata don't have individual metatables, thus they aren't suitable for type checking. Also, a200ad6d replaced relying on reused memory (from luaL_checkstring) with writing to uninitialized pointers; copy the filename instead into freshly allocated memory. Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: Remove even more cruft from syslinux.cFerenc Wágner2014-10-121-44/+2
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: condense the PCI exampleFerenc Wágner2014-10-111-29/+6
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: remove printf from loadfile exampleFerenc Wágner2014-10-111-10/+3
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: loadfile() is not TFTP-specificFerenc Wágner2014-10-111-1/+1
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * libansi.h: depends on stdbool.h and stdio.hFerenc Wágner2014-10-111-0/+3
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: remove overall indentation and some verbose cruft from the examplesFerenc Wágner2014-10-111-104/+99
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: bring documentation up to dateFerenc Wágner2014-10-111-31/+42
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: vesa: delete stray would-be-debug outputFerenc Wágner2014-10-111-2/+0
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: add new bindings to syslinux.ascFerenc Wágner2014-10-111-1/+21
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: docs: do not reference removed exampleFerenc Wágner2014-10-111-1/+0
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: share the export macro (CPP only change)Ferenc Wágner2014-10-111-39/+39
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: add the IMAGE_TYPE table to the syslinux moduleFerenc Wágner2014-10-111-0/+13
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
| * lua: make kernel and initrd progress output match in sl_boot_linuxFerenc Wágner2014-10-111-4/+4
| | | | | | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* | com32: Use z size specifier for printf-ing size_t variableMartin Str|mberg2015-01-056-8/+8
| | | | | | | | | | | | | | | | | | Use the z size specifier to printf-ing size_t variables to get rid of gcc warning format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | SYSAPPEND: Fix space strippingDany St-Amant2015-01-052-2/+2
| | | | | | | | | | | | | | | | The description of SYSAPPEND for the DMI information states that the spaces are replaced by underscores, but this replacement does not occur in 6.03. Signed-off-by: Dany St-Amant <dany.ephemeral.2014@icloud.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | build: sort sources to build in a more deterministic wayPhilippe Coval2015-01-056-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been observed that binaries contents are depending on the order of linked objects. This order is caused by GNU make's wildcard function and the position of sources on filesystem. This change tries to prevent this kind of randomness. Also consider building using -j1 flag to make it even more reproductible. Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57#related Signed-off-by: Philippe Coval <philippe.coval at open.eurogiciel.org>
* | com32: change '%llx' to use PRIx64Martin Str|mberg2015-01-056-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Use <inttypes.h> PRIx64 instead of llx to get rid of gcc warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | com32: parallel depsGene Cumm2015-01-051-4/+2
| | | | | | | | | | | | Resort and collapse the list; add libutil to dep lib Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | gpllib: fix parallel building issueChong Lu2015-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Chong Lu <Chong.Lu at windriver.com> There might be an error when parallel build: [snip] cp: cannot create directory `tmp/sysroots/x86_64-linux/usr/share/ syslinux/com32/include/gplinclude': No such file or directory make[4]: *** [install] Error 1 make[3]: *** [gpllib] Error 2 [snip] This is a potential issue. In ${S}/com32/gpllib/Makefile file, install target wants to copy $(SRC)/../gplinclude to $(INSTALLROOT)$(COM32DIR)/include/ directory, but in ${S}/com32/lib/Makefile file, the install target will remove $(INSTALLROOT)$(COM32DIR)/include directory. We need to do com32/lib first. The patch make com32/gpllib depends on com32/lib to fix this issue. Upstream-Status: Pending Signed-off-by: Chong Lu <Chong.Lu at windriver.com> Signed-off-by: Robert Yang <liezhi.yang at windriver.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | libupload: fix parallel build issueRobert Yang2015-01-051-0/+1
|/ | | | | | | | | | | | | | | Fixed: cp -r syslinux-6.01/com32/libupload/*.h image/usr/share/syslinux/com32/include/ [snip] rm -rf image/usr/share/syslinux/com32/include [snip] cp: cannot create regular file `image/usr/share/syslinux/com32/include/serial.h': No such file or directory The cp is happened in the "libupload" dir, while "rm -fr" is happend in "lib" dir, let "libupload" depend "lib" will fix the problem. Signed-off-by: Robert Yang <liezhi.yang at windriver.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* chain/partiter: correct gpt header checkssyslinux-6.03-pre20Michal Soltys2014-08-261-4/+8
| | | | | | | In gpt header, lba_cur and lba_alt alternate depending on whether we read primary or backup copy. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain: implement strict=<0|1|2>Michal Soltys2014-08-264-14/+34
| | | | | | | | | | | | | | | This provides more fine grained control than single relax flag. to cover case with wrong disk sizes. relax and nostrict are equivalent to strict=0 norelax and strict are equivalent to strict=2 strict=1 does the same as strict=2, but ignores checks against disk size The current default is strict=1. Options: 'fixchs', '[un]hide[all]' and 'save' will forcibly enable strict=2 (can be overridden by the user). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain: add missing pi_del() in find*() functionsMichal Soltys2014-08-261-35/+25
| | | | | | | As partiter doesn't deallocate itself after finish (anymore), it should be deleted after each loop iteration. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain/partiter: adjust error reportingMichal Soltys2014-08-263-10/+5
| | | | | | | | | | Use <0 for errors, 0 for normal state, and >0 for clean completion. In future this would be necessary if it's decided to make partiter a generic lib (similar to disklib) - though it has to be quieted first and provide strerr()-like functionality in place of its verbosity. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain/partiter: fix possible non-NULL value returned by pi_begin() on errorMichal Soltys2014-08-261-8/+10
| | | | | | | | This patch fixes non-NULL value returned from pi_begin() in case of an error (which resulted in further hang instead of proper exit). Probably a leftover from pi_dealloc() times. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain/partiter: fix and improve gpt handling in buggy casesMichal Soltys2014-08-261-76/+128
| | | | | | | | | | | | | | | | | | | | | | Previous version had some issues in case of error situations, among those: - backup gpt header was not read if reading of primary failed - alternating nature of lba_cur and lba_alt was ignored This patch fixes this and extends the gpt handling. The current behavior is: - try primary header; if unreadable or checksum fails (or sanity checks fail unless relax flag is set) - try secondary header - try main partition table referenced in the header that was read; if it's unreadable or if its crc check fails - try alternative (so if we managed to read primary header, table at the end would be considered as alternative - if we managed to read secondary header, table at the beginning would be treated as such) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Revert "ldlinux: Allow a held shift key to override UI as well as DEFAULT"H. Peter Anvin2014-06-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7e7139788c8ac6ffbf474976ad4d1727e0677b9f. Requested by Ady <ady-sf@hotmail.com> who also requested the original patch: After some tests with MENU SHIFTKEY with different versions of Syslinux, I came to the conclusion that, at least for now, it would be better to undo commit 7e7139788c8ac6ffbf474976ad4d1727e0677b9f: "ldlinux: Allow a held shift key to override UI as well as DEFAULT" committed on Thu, 22 May 2014. Although the aforementioned commit makes the current 6.03 branch behave as version 4.xx, my tests show that the behavior is effectively inadequate and inconsistent. Although I had been previously nagging you in irc about maintaining backward compatibility of the "force-prompt" keys, I have to ask you to undo the aforementioned commit before the final release of 6.03 stable. The behavior of Syslinux 6.03 without this particular commit will slightly "break" with the prior "force-prompt" behavior as seen in 4.xx when using [vesa]menu.c32, but it will be more consistent and clean. Without this commit, the user can still avoid the automatic launch of the default label by the same means (the "escape" "shift" keys), which is the most important characteristic of MENU SHIFTKEY. Please consider this request before the release of 6.03 stable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>