| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
There is no longer any need to do special name-mangling for iso9660,
and doing so, in fact, breaks the handling of paths starting with ../.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
We need to handle directory names starting with .. correctly.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
It seems to break as many machines as it fixes, so disable it for now.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
| |
Reported-by: Marcus Grando <Marcus.Grando@corp.terra.com.br>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
EDD 4 has 16-byte device path information. Make the EDD buffer big
enough to capture that. Note that the location of the device path
checksum actually depends on the device path length information field!
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Currently, disk_init() can only be called once, and edd_params get
statically initialized to zero. This will change once this function
can be called more than once, and we depend on the pre-initialization
to zero to avoid known BIOS bugs.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Actually append the domain name to the end of an unqualified DNS name
like we should have done all along.
Reported-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
For web downloads, sometimes a mirror site will not be fully synced.
Add an option to retry the open a specific number of times before
giving up.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
| |
The disk number is set twice in diskio.c/edd_rdwr_sectors() this patch
removes the redundant setting.
|
|
|
|
|
|
|
| |
Rather than opencoding the arithmetic flag mask, define an inline to
make that happen properly.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If we can't find a configuration file, we need to do something
slightly more friendly than hanging.
Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
parse_dotquad() incorrectly returned output in host byte order.
Reported-by: Alexander Wuerstlein <arw@arw.name>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Make sure we don't overflow the shift, even though that should never
be possible.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the name for the incorrectly named "t" (track) field; it is in
fact the sectors/cylinder (secpercyl) field. Furthermore, remove the
completely unused "type" field... right now the pointer to the
rdwr_sectors field acts as a proxy, and if we need more complex stuff
in the future it is probably better handled by pointing to an ops
structure.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Use the centrally coded ilog2() function.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Expand most fields in struct disk to 32 bits -- it makes the code
smaller in general, and struct disk is not a common data element.
Add a field for the number of tracks (number of heads*sectors).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
It really makes more sense in chs_rdwr_sectors()...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Make sure we don't end up trying to do a CHS request for a truly
absurd value, that could possibly be misconverted.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
When we decide to go from EDD to CHS, make sure we convert from
absolute back to a partition offset. The cylinder check should still
be on the absolute value, however.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
The sector count cap on CHS is automatically given as a result of the
no-track-crossing rule.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
At least one system has been found which require fallback from EDD to
CHS, so actually make it doable.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If we find compressed or encrypted data, print an error message
instead of returning garbage. This is suboptimal, but at least
handles the common subcase of an encrypted configuration file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Split loadconfig.c into two files. In particular, isolinux needs
search_config() but not generic_load_config().
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge the config file searching code between syslinux and isolinux,
and make isolinux also recognize the generic names "syslinux" and
"syslinux.cfg". Thus, isolinux now searches for configuration files
in the following order:
/boot/isolinux/isolinux.cfg
/boot/isolinux/syslinux.cfg
/isolinux/isolinux.cfg
/isolinux/syslinux.cfg
/boot/syslinux/isolinux.cfg
/boot/syslinux/syslinux.cfg
/syslinux/isolinux.cfg
/syslinux/syslinux.cfg
/isolinux.cfg
/syslinux.cfg
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
The FAT installers may not produce a canonical pathname in the
CurrentDirName field on entry. Make sure that the core doesn't croak
when that happens, and still produces an absolute pathname for the
configuration file.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Add a new IPAPPEND option to generate a SYSUUID= option with the
in-system UUID.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
As documented in the old assembly code, reset the disk controller
between retries when using EDD. We don't want to do that for CHS,
since a reset shuts down the floppy motor, and we might be suffering a
timeout.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Skip EDD and CHS detection if we know it is a CD-ROM, because some
CD-ROMs possibly report bad information, and/or screw up the stack,
possibly permanently.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Move the dprintfs to the location that they were intended to use.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
When we print an error message to the screen, include the error
number. Furthermore, dprintf it on retries.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Add a handful of dprintf's to make it easier to debug disk I/O
failures.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
At least the ThinkPad T22 and T23 will incorrectly report a sector
size of 512 bytes for El Torito CD-ROMs. Ignore the reported sector
size for El Torito boots.
Reported-by: Helmut Hullen <hullen@t-online.de>
Tested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Collapse multiple slashes into one (this still doesn't resolve . and
.. in the path, since that requires awareness of symlinks.)
This code also avoids a copy-over-self bug by introducing a temporary
buffer.
Reported-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
Implement getcwd() in the core; Fix COM32 getcwd() to use the new function.
This resolves the previous comment about COM32 getcwd() not working by
not using INT 22h AX=001Fh.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
We don't actually need recursion in put_inode(), so replace recursion
with a loop.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Some filesystems, including btrfs, don't have .. directory entries.
We already handle . in the filesystem core, handle .. as well.
This means keeping chains of parent inodes for all open inodes, at
least for the duration of a path search; we might as well hang onto
them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Initialize the block cache at the very start. The block size for
btrfs is fixed, and so we can start by initializing the cache. That
eliminates a whole bunch of unnecessary I/O as well as extra code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
When looking for the current superblock, don't read past the end of
the disk. This more or less assumes that the superblocks are
reasonably consistent with regards to the total filesystem size.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Be a bit more explicit about the particular errors we see.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
Due to double use of the variable "buf", we would end up corrupting
the length, but not the contents, of an RRQ packet if we ended up
having to re-send. Some TFTP servers ignored the extra garbage
(including tftp-hpa), others would refuse to accept the RRQ, causing
failures.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
For somewhat unclear reasons, the PXE unload sequence took the old PXE
path (pre-2.00 API). Take the new sequence if available. Also
improve the error message.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Make it easier to read, but fix the address for the loopback network
(127, not 255).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Enforce that the file type in open_file is a plain file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Don't allow opendir() on a non-directory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
All "files" on PXE are regular files (there is no official directory
mechanism) and so, at least for now, it's all DT_REG.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Fix the timeout logic for RRQ, to avoid a spew of identical RRQ
packets which at best will annoy the server.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|