| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
__attribute__((packed)) does the wrong thing when in ms-struct
mode; this breaks compiling on mingw-w64. Therefore force gcc struct
mode when we use packed.
This obsoletes checkin
7d9ee65 win: Add -mno-ms-bitfields
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Just some minor cleanup
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
| |
Oops :)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Add a --device option for scripts and expert users to override the
device detection.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use <linux/ext2_fs.h> if we can avoid it.
The ioctl constants have been globalized and moved to <linux/fs.h>.
Use a private copy of ext2_fs.h from e2fsprogs with the ioctl
constants removed for the data structures.
Do at least attempt backward compatibility for old kernel headers, but
no real hope of proper operation there...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|
|
|
|
|
| |
Sanity check for FAT volumes
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|
|
|
|
|
|
|
| |
Add a "make strip" target, to make doing the official build easier.
We want the official build to have stripped binaries for size reasons,
so do it right and make it an actual build target.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
syslinux_already_installed function will be used in both extlinux and
syslinux for checking if the boot sector has either the string
"SYSLINUX" or "EXTLINUX" in the OEMID field.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|/
|
|
|
|
|
| |
1. Make sure extents are strictly less than 64K in size
2. Make sure extents do not cross 64K boundaries
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
Put a magic signature at the end of the boot sector, and a backpointer
to the code that contains the pointer to the main code extent. This
is useful for integrity-checking tools, and could help the installer
in the future.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
In 'libinstaller/syslxopt.c' on line 71 the "s" (undercast) is missing in:
const char short_options[] = "t:fid:UuzS:H:rvho:OM:ma";
Adding the 's' there seems to solve our problem.
|
|
|
|
|
|
|
| |
Remove a lengthy warning message which cause the actual command
reference to overflow a 24-line screen.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix fatal warnings in syslxopt.c partly due to legal but non-idiomatic
use of switch(). Since the only purpose was to conditionalize single
output statements, just do it explicitly.
In addition, since they are conditional messages, there is no need to
explain when they apply.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Gert Hulselmans noticed this.
|
|
|
|
|
|
|
| |
We will produce an error message if a user attempts
to use an option we don't implement.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
|
| |
Use our own version of getopt_long() for both the DOS and Win32
installers. Currently, on MinGW, getopt_long() is a static library,
but that could change in some installations.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Don't make non-executable files +x...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Add memcpy_from_sl() and use it to handle pointers into the payload
section.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Use negative pointer values below DGROUP, i.e. for the .payload
segment. This makes it a lot easier to figure out if we are dealing
with pointers that shouldn't come from where they do, since the DGROUP
and .payload segments no longer overlap, and in fact are congruent.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
We will produce an error message if a user attempts
to use an option we don't implement.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to consolidate the installer option-parsing system,
we add the --mbr (-m), --active (-a), and --force (-f)
options from the DOS, Win32, and mtools installers to
libinstaller.
Since the -m and -a options are not currently valid for the
Linux 'syslinux' and 'extlinux' installers, we add error
messages to both of these. The -f option is allowed but
does nothing for them.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that the glibc version of asprintf() is braindamaged, and
doesn't set the target pointer to NULL in the event of an error (only
returns -1). Therefore we need to check the return value. Just in
case someone else made the *opposite* error, also check the pointer.
Bleh. The glibc documentation states that *BSD sets the pointer to
NULL, but instead of following that, the glibc people put
warn_unused_result on asprintf. Sigh.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
RHEL4 had a 2.6.9 kernel, but 2.4.20 Linux kernel headers, so put in a
workaround for 2.4 kernel headers.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Some versions of glibc have broken versions of <linux/loop.h>, so
include our own canned version.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
If we are on a loop device, set bsHidden based on the loopback device
offset.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Make it possible to distinguish ENOENT from other "non-fatal" errors
in read_adv(), so we can try more than one filename.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|/
|
|
|
|
|
| |
modify_adv() should be used by any installer which uses the common
CLI, so it should go into syslxopt.c.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
This file does not need <sys/types.h>.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Install an empty ADV in the Windows installer to keep it from being
broken. In order to do that, separate the Unix-specific ADV I/O
functions from the generic data structure manipulation.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Merge the SYSLINUX and EXTLINUX patching code and core code, removing
EXTLINUX as a separate derivative. All the disk-based systems now use
the same code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
Reduce sector 1 space pressure by moving objects that aren't needed by
Sector 1 proper into an "extended patch area". While we're mucking
with the installer code, make the syslxint and extlinux installer code
even more similar. It should now be pretty straightforward to
outright merge the code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Fix off-by-one error in the FAT installer, which caused the install to
incorrectly abort without the patched version of the data.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Put all the Linux ioctl header magic into a single shared file, and
try to make it as generally useful as possible.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Correct the implementation of block mapping using FIEMAP (as opposed
to FIBMAP).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
We must make sure we actually use the modified pointer returned from
set_fs(), otherwise bad things happen...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Add missing const
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Synchronize the code for generate_extents() from extlinux to syslinux.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch to consistent use of 64-bit sector pointers; this should enable
booting even for individual *partitions* larger than 2 TB. In order
to not slow down the boot too much, switch the initial load from an
enumeration to an extent map. This means the table gets larger (since
we have to assume the worst case), but it simplifies the Sector 1 code
(since we can push all the hard stuff into the installer), and will
speed up booting in the general case.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the !GPT handover protocol in the Syslinux core, and handle
partition offsets above 2 TB. We do not yet handle filesystem sizes
above 2 TB, but that should be a reasonably straightforward extension
at this time (need to switch to 8-byte block pointers).
This finally meant moving getlinsec out of the boot sector, since it
no longer fits. Instead have a very simple getonesec implementation
in the boot sector. getlinsec still fits in Sector 1, although it
doesn't leave space for very many block pointers. That's still better
than adding yet another boot loader stage, however.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
asprintf() doesn't return an error number, but a count of characters
(which we don't need.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Add missing break; in the command-line parser.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Provide for backwards command-line compatibility, together with
warning messages where appropriate.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
-o has been supported for a very long time; recommend using -t
instead, but for now proceed with an error message.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Clean up warnings in checkin
146c34a2 Make syslinux installer real "pathbased"
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|