| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
commit 14531c47bc95 ("core: Delete code that is duplicated in
ldlinux") erroneously deleted the BOOTIFStr and SYSUUIDStr entries
from the PXELINUX-version of IPAppends, meaning that IPAPPEND 3 and
IPAPPEND 4 didn't append the corresponding strings to the command
line.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to increment the Logical Block Address in eax by the number of
sectors we passed to getlinsec after every invocation, otherwise we'll
start with the same sector everytime.
This bug was discovered when booting an isohybrid image, which failed
to boot after printing the following error,
"Image checksum error, sorry..."
because the isolinux.bin was bigger than 32K, and thus invoked the
getlinsec loop that reads the file in chunks.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically, .c32 files had to explicitly link against ldlinux.c32 in
order to use its exported symbols. This lead to the undesirable
situation during module dependency resolution where loading,
e.g. menu.c32, would cause ldlinux.c32 to be reloaded, thus
re-executing its main() function and dropping the user at a prompt
instead of executing menu.c32.
commit 1357b7e62706 ("elflink: Don't reload the current EXEC_MODULE
module") was the solution to this problem, since you don't need to
reload a module to link against it's symbols. Unfortunately, while
this commit was intended to stop ldlinux.c32 being reloaded, it also
broke the use case where a .c32 wants to load itself, e.g. when
vesamenu.c32 wants to execute vesamenu.c32 with a different config.
Luckily, modules no longer need to include ldlinux.c32 in their
dependency list, since ldlinux.c32 is *always* loaded and any symbols
can be automatically resolved. Which means that the check in
spawn_load() can be deleted.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit a126f17f663c ("EXTLINUX: Initial XFS filesystem support") broke
the code that inserts the installation subdirectory into the Extended
Patch Area (EPA). The EPA entry is used to set the initial working
directory on boot.
This caused boot failures for users that chose an install directory
other than /boot/syslinux (technically, it failed for any path not in
'search_directories' in load_env32()) due to ldlinux.c32 failing to
load because the initial working directory was not set correctly.
Cc: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Due to delayed allocation feature on XFS filesystems, a write is not
guaranteed to flushed out to the underlying file system after crash or
something else - so we need to make sure that ldlinux.sys is installed
correctly in the mounted filesystem.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
We need to add __bad_SEG() to the symbol export whitelist, otherwise
ldlinux.c32 will fail to load if compiled with -DDEBUG=1 due to not
being able to resolve __bad_SEG().
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
| |
Welcome to the 5.01 development cycle and 2013.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Absolutely no bounds checking is performed when copying filenames to
'cmdline_buf' and 'initrd_name' which means that sufficiently long
strings will scribble over the stack. At best, the files will simply
fail to load because the name is garbled.
Allocate space for the cmdline at runtime to avoid these overflow
problems.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documented command sequence for distributions wishing to package a
Syslinux release is,
make clean
make installer
Unfortunately, becaues ldlinux.c32 is deleted by 'make clean' the
installer target fails like so,
make[1]: *** No rule to make target `../com32/elflink/ldlinux/ldlinux.c32', needed by `ldlinuxc32_bin.c'. Stop.
make: *** [installer] Error 2
Follow the example set by core/Makefile for ldlinux.sys, etc and add
any build files that are required by the installers to
$(BTARGET). $(BTARGET) only gets deleted when running 'make spotless'.
Reported-by: László Házy <hazy_l@yahoo.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
| |
Set the sonames of shared libraries to the filename, so we don't end
up with full pathnames embedded in the files.
|
|
|
|
|
|
|
|
|
|
|
| |
16-bit COMBOOT files are no longer supported by Syslinux in 5.00 so
delete all references and change any 32-bit COMBOOT image references
to mention ELF instead.
Some of the COMBOOT stuff is still used internally so we can't nuke
core/comboot.inc yet, but that will disappear in a future release.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before modules were dynamically loaded the boundary between GPL and
non-GPL code was implicit because of the separate link domains for
each module. With dynamic modules we need an explicit whitelist of
core symbols that non-GPL code can link against at runtime without
needing to be re-licensed under the GPL.
Mark such symbols with __export, so that it is explicitly clear which
symbols in the core can be linked against by non-GPL code.
Reduce the visibility of symbols in both the core and ldlinux.c32 with
-fvisibility=hidden. __export changes the visibility to 'default'.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
| |
Use the same variable in idle.c and ldlinux.c32.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
The memory alloc files haven't been referenced since commit
880f67714ec0 ("elflink: remove the malloc.c/free.c/realloc.c/zalloc.c
from com32"). They live in the core now.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
In preparation for strictly limiting the list of variables that are
exported (global) in the core, delete any unused variables, rewrite
variable declarations in C that are not referenced by asm and delete
files that are no longer included in other asm files.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
Starting with Syslinux 5.00 the COMBOOT API is obsolete and should not
be used by any modules. It is still used internally for some things,
such as the ADV code in ldlinux.c32, but that will change in the
future.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
The PATH directive can be quite confusing when coupled with the fact
that the current working directory is always searched first when
opening files.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6387f043f7f870e4f0b402dae0b921d99eb82c39.
We got reports of this change causing regressions. The reverted commit
only goes half way to providing proper parent menu title inheritance,
and breaks other configs where the menu label or submenu tagname are
used for the title.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
The file that we display with the F-keys may contain background or
foreground color codes and so needs to be interpreted by
get_msg_file() instead of just printing the color codes as ascii to
the screen with cat_file().
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
| |
commit 82cbb1bd4133 ("ldlinux: Move DISPLAY file handling out of the
core") introduced a typo where the foreground color was always bold
when displaying a DISPLAY file.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If we print files with no newline then it looks better if the CLI
prompt is printed immediately after the file content, rather than
erasing the line and printing prompt at column 0.
This mainly affects files with one line of text and no newline
character.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code that handles the DISPLAY directive was writing directly to
the BIOS VGA page with __intcall(0x10). This caused corruption
problems on the screen because the ansi library code was also writing
to the screen.
The correct way to fix this is to always use the ansi library code
(via printf()) instead of going behind its back and using separate
code paths to write to the screen.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
There was a typographical error in commit 9f51b69d7c050 ("core:
Reimplement lots asm code in C") which re-wrote the asm implementation
of unhexchar() in C. We should be adding 10, not subtracting to get
the equivalent decimal integer. Also be explicit about the sign of
'data' and 'num'.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
into elflink-searchdir-leak
Pull a change that fixes a resource leak from Shao Miller,
* 'searchdir_leak-5' of git://git.zytor.com/users/sha0/syslinux:
fs: Fix searchdir resource leak
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a significant rewrite of the generic lookup logic inside
core/fs/fs.c's searchdir function. Previously, there was a
memory leak if a path involved multiple directories. After a
sufficiently large number of invocations, this could be observed.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Files in the installation directory should be able to be executed
(along with their dependencies) from any directory in the file
hierarchy. Using the installation directory as the default value for
'PATH' is the most sensible way to do this.
The PATH config directive still allows other directories to be
appended to the 'PATH' variable, which is useful when there are other
directories containing modules.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
If we can't access ldlinux.c32 with findpath(), reloading it isn't
going to work so don't unload it or any of the other modules. Instead
return control to the caller.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|/
|
|
|
|
|
|
| |
Correct the bogus use of list_entry() that was introduced in commit
8f1c64acf9c6 ("module: Stop silently failing to load dependency
modules").
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to preserve the contents of 'cmdline' across calls to
edit_cmdline(). In fact, doing so causes things like the TAB key to
not function properly because the previous command is used as a prefix
to print_labels(), as though the user had typed it explicitly before
hitting TAB.
Delete 'temp_cmdline' because it no longer serves a purpose.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should be checking the return value of spawn_load() when loading a
module's dependencies and printing some kind of an error message if
they fail to load (for instance if the file is missing) and returning
an error to the caller.
Track the most recently loaded module in 'head' before we begin
loading dependencies. That way we can unload any dependencies in the
error path that were successfully loaded.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we fail to chdir or to execute a COM32 file we should inform the
user so that they can debug the problem. We don't currently print
anything if the user tries to execute a regular file, such as a config
file, as an COM32 image.
We also shouldn't be returning the exit value of the module from
spawn_load(), because we have no way of doing anything useful with it,
and just because a main() function returns -1 doesn't mean it failed
to run. Modules need to take care of printing any error messages
themselves.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
| |
We shouldn't be appending a filename to any path string that isn't
terminated by a '/', otherwise we end up searching for files like
'/isolinuxpwd.c32'
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't append an extension like ".c32" if the command already has one!
This bug lead to "config.c32" being executed as "config.c32.c32" with
the below config snippet,
LABEL config
COM32 config.c32 /configs/isolinux.cfg
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
We need to remember to allocate space for the terminating NULL in
create_args_and_load() otherwise we will write a NUL-byte past the
bounds of 'argv[]' to some random part of the stack.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We need to make sure that 'path' still has enough space to write the
trailing NUL-byte. Without this patch it's possible to write a
NUL-byte past the end of the on-stack buffer.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
If for some reason we fail to load a module then we need to free the
memory allocated to that module.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Dereference 'rows' and 'cols' to check whether the data they point to
is zero, which would indicate the screen size is bogus, instead of
checking if they point to NULL.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We need to be allocating sizeof(char *) (4) not sizeof(char) (1) for
'new_argv'.
Cc: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
We don't need to call free(buf) if we're jumping to the 'bail' label
because 'buf' is always free'd there.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
We always call fclose() on 'fp' if fopen() was successful, so delete
the extraneous fclose() call in read_jpeg_file().
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There's currently the potential for us to exit early from asprintf()
without calling va_end(ap). Rearrange things so that we always make
the call.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
According to the stdarg(3) man page each invocation of va_copy()
should be paired with an invocation of va_end().
Cc: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
merge/elflink/xfs
Pull XFS filesystem driver from Paulo Alcantara,
* 'xfs-for-hpa' of git://zytor.com/users/pcacjr/syslinux: (60 commits)
xfs: Fix the way we check di_mode of an inode
xfs: Cleanup previous commit
xfs: Add xfs_readlink()
xfs: Cleanup and remove some trailing whitespaces
xfs: Add XFS_DINODE_FMT_BTREE support in xfs_next_extent()
xfs: Cleanup and remove some trailing whitespaces
xfs: Rework xfs_dir2_get_right_blk()
xfs: cleanup unused structure
xfs: Remove some trailing whitespaces
xfs: Add full B+tree search support in xfs_dir2_node_find_entry()
xfs: Add xfs_fmt_btree_find_entry()
xfs: Fix memory leak in xfs_dir2_node_find_entry() function
xfs: Cleanup xfs_readdir_dir2_leaf() function
xfs: Implement xfs_readdir_dir2_node() function
EXTLINUX: Add sanity check for XFS filesystems
xfs: Add xfs_fmt_local_readdir() function
xfs: Add xfs_fmt_local_find_entry() function
xfs: Move readdir functions to another source file
xfs: Remove trailing whitespace in xfs_dir2_isleaf() function
xfs: Move dir2 functions to another source file
...
Conflicts:
extlinux/main.c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous way to judge the di_mode of an inode could not distinguish
S_IFREG and S_IFLNK. Fix it to a better judgement.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Please Baozi, fix your editor! You keep putting f*cking trailing
whitespaces in almost all patches yours.
This patch cleanups, fixes some typo, fixes indentation and removes some
trailing whitespaces from previous commit.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
XFS's symbolic links to a file can be stored in one of two formats:
"local" and "extents". The length of the symlink contents is always
specified by the inode's di_size value. A symlink cannot be longer
than 1024 characters.
Signed-off-by: Chen Baozi <baozich@gmail.com>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch cleanups and removes some trailing whitespaces introduced in
the previous commit.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|