summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ext2: use generic_getfssecsyslinux-4.00-pre28H. Peter Anvin2010-02-263-150/+109
| | | | | | | | | | Use generic_getfssec for ext2. NOTE: Something seems wrong with the generic_getfssec() loop; running this on an ext2 filesystem ends up with the code looking up the same extent twice in a row, which should not happen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fat: use generic_getfssec(), fix generic_getfssec(), add dprintfH. Peter Anvin2010-02-267-105/+141
| | | | | | | | | | | | | Use generic_getfssec() for the FAT filesystem. Do a bunch of calculations based on clusters rather than on sectors, so we don't have to do the same thing N times for N sectors per cluster. Fix boundary conditions in generic_getfssec(). Adjust iso9660 to match the resulting interface change. Add dprintf's to generic_getfssec() and a few other routines. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* iso9660: use boot_info_table and fix hybrid modeH. Peter Anvin2010-02-263-12/+32
| | | | | | | | In hybrid disk mode, one block will generally *not* equal one sector. Use the boot_info_table to find the primary volume descriptor. Remove the now-unused cdrom_read_blocks(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* iso9660: use generic_getfssec()H. Peter Anvin2010-02-261-30/+7
| | | | | | | Use generic_getfssec() for iso9660. This is a particularly simple case, since all iso9660 files (that we support) are contiguous. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs: add generic getfssecH. Peter Anvin2010-02-262-2/+181
| | | | | | | | Add a generic getfssec method which operate on cached extents. This should avoid the need to each filesystem to implement its own getfssec loop. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/readdir.c: remove unused variableH. Peter Anvin2010-02-261-1/+0
| | | | | | Remove an unused variable in opendir(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs/iso9660: remove unused variablesH. Peter Anvin2010-02-261-2/+0
| | | | | | Remove variables which are no longer used. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* dos: make sure we don't look like a Windows imageH. Peter Anvin2010-02-261-0/+8
| | | | | | | Some tools might assume that the reloc offset being 64 automatically means it's really a Windows file. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: document 32-bit-only API callsH. Peter Anvin2010-02-241-0/+14
| | | | | | | As long as we have a pretence of an ABI we should at least keep it updated. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* opendir: remove unnecessary buffer pointerH. Peter Anvin2010-02-241-1/+0
| | | | | | We don't need to abuse the InitRD buffer anymore. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* iso9660: make readdir() worksyslinux-4.00-pre27H. Peter Anvin2010-02-241-37/+25
| | | | | | Make readdir work on iso9660. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* opendir: use internal protected-mode interfacesH. Peter Anvin2010-02-241-5/+12
| | | | | | No need to do yet another bounce through lowmem for no good reason. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs: searchdir: handle opening a directoryH. Peter Anvin2010-02-241-0/+2
| | | | | | Handle the case of opening a directory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs: cleanups: use PVT() macro for all filesystems; iso9660 cleanupsH. Peter Anvin2010-02-247-42/+72
| | | | | | | | | | Use a PVT() macro and a structure to access the private inode data for all filesystems, instead of open-coding the type. Use a packed structure for iso9660, instead of open-coding pointer casts. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isolinux: 7C00h -> TEXT_STARTH. Peter Anvin2010-02-241-3/+3
| | | | | | Use the TEXT_START macro instead of hard-coding 7C00h. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* isolinux: drop dependency on core_xfer_buf in self-loadersyslinux-4.00-pre26H. Peter Anvin2010-02-241-38/+45
| | | | | | | | | Drop the dependency on core_xfer_buf in the self-loader, and instead load the data aligned to an offset, and then bulk-move it into place. diskstart.inc will need to do something similar if/when support is added for > 1K sectors on BIOS. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/mem: better dprintf()H. Peter Anvin2010-02-242-3/+4
| | | | | | | Add a few dprintf() statements to the core malloc/free which makes it easier to track down bugs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: fix double free of pathbuf, constify iget filename, fix iso9660H. Peter Anvin2010-02-247-135/+87
| | | | | | | | | | Fix double free of pathbuf in searchdir(). Constify the pathname passed to ->iget(). Major cleanups of the iso9660 filesystem; it would use insufficiently dimensioned stack variables and do compares in a rather inefficient manner. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: replace hard-coded bounce buffer use in com32/libsyslinux-4.00-pre25H. Peter Anvin2010-02-2411-74/+149
| | | | | | Replace hard-coded bounce buffer uses in com32/lib with lmalloc/lfree. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: fix lowmem mallocH. Peter Anvin2010-02-244-3/+6
| | | | | | | | | | | | a) initialize *all* the head nodes b) the lowmem heap needs to be paragraph (16 byte) aligned c) use a dedicated tag value for headnodes. The type code should be removed and replaced with special tag values for head node and free. d) for libcom32 code called from the core, do NOT present a usable bounce buffer; we should only ever use lmalloc/lfree. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: add lzalloc()H. Peter Anvin2010-02-242-0/+12
| | | | | | Add lzalloc(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lmalloc: set errno on failureH. Peter Anvin2010-02-241-1/+6
| | | | | | | The core function can't set the com32 errno, so we need to do it in the wrapper. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: wrapper functions for lowmem allocationsH. Peter Anvin2010-02-244-0/+67
| | | | | | lmalloc(), lfree(), lstrdup() Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move aligned segments earlierH. Peter Anvin2010-02-241-17/+18
| | | | | | | | | Move the aligned segments downward, to provide for the largest possible contiguous lowmem heap. This minimizes the necessary lowmem footprint. (Note: the heap doesn't actually need to be contiguous, but having it not be makes it harder to size.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: use better malloc; add low memory malloc; fix com32 exitH. Peter Anvin2010-02-2317-258/+451
| | | | | | | | | | | | | Use a better malloc for the core. In particular, use the same core that we should eventually be able to use for the entire system in Syslinux 5 -- with module awareness, etc. This code can also accommodate multiple heaps. Set up a separate heap for lowmem; the intent is to use explicit lowmem allocations instead of the static bounce buffer. The lowmem allocation is also exported via the pmapi mechanism, so modules can safely allocate lowmem. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: clean up/fix generation of ipappend stringsH. Peter Anvin2010-02-234-40/+22
| | | | | | | | Clean up and fix the generation of the ipappend strings. In particular, BOOTIF= was generated into a buffer which was too small. Put the buffer definitions in C while we're at it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs/pxe: drop the use of PKTBUF_SEGH. Peter Anvin2010-02-233-34/+28
| | | | | | | | Drop the use of a magic PKTBUF_SEG, and instead just have a high memory buffer for each file, and a single lowmem buffer that we reuse at will. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'pxefix' into pathbasedH. Peter Anvin2010-02-231-0/+4
|\
| * pxe: set the block size in the fs structureH. Peter Anvin2010-02-231-0/+4
| | | | | | | | | | | | | | | | | | | | For better or worse, we use block counts for communicating with the filesystem. It would therefore be rather polite to tell them what block size we expect. This fixes a boot failure with the new loadhigh routine. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add a direct 32-bit APIH. Peter Anvin2010-02-2311-40/+170
| | | | | | | | | | | | Add a direct 32-bit API to some functions; initially read file only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pathbased:btrfs use iget interface and leverage general search routingAlek Du2010-02-232-175/+81
| | | | | | | | | | | | | | | | Now btrfs won't export its own searchdir, it uses the iget and iget_root interface. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core/com32.inc: warn about possible double use of core_xfer_bufH. Peter Anvin2010-02-211-0/+3
|/ | | | | | | core_xfer_buf is still used as bounce buffer by libcom32 code linked into the core. This is likely unsafe -- needs to be fixed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: rewrite loadhigh in CH. Peter Anvin2010-02-212-62/+121
| | | | | | | Rewrite the loadhight function in C, and eliminate double usage of xfer_buf_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: go back to using real_mode_seg as bounce bufferH. Peter Anvin2010-02-211-1/+1
| | | | | | | Go back to using real_mode_seg as bounce buffer; this reserves xfer_buf_seg strictly for the in-core filesystem code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: let xfer_buf_seg, real_mode_seg be assigned by the linkerH. Peter Anvin2010-02-219-22/+50
| | | | | | Use the linker to assign xfer_bug_seg and real_mode_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge remote branch 'origin/master' into pathbasedH. Peter Anvin2010-02-2015-32/+833
|\
| * libpci: merge BIOS read and BIOS writeH. Peter Anvin2010-02-206-25/+13
| | | | | | | | | | | | | | Save a few bytes by merging the very similar BIOS read and BIOS write functions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * i915resolution: use libpci to access PCI config spacesyslinux-3.85-pre13syslinux-3.85H. Peter Anvin2010-02-161-19/+11
| | | | | | | | | | | | | | | | Use libpci to access PCI config space. This *hopefully* will make it less likely that some old machine hangs when failing to set the requested video mode. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * NEWS: document i915resolution merge.syslinux-3.85-pre12H. Peter Anvin2010-02-161-0/+4
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'i915res'H. Peter Anvin2010-02-164-2/+813
| |\
| | * Merge branch 'master' into i915ressyslinux-3.85-pre63H. Peter Anvin2010-02-0848-57/+4003
| | |\
| | * \ Merge branch 'master' into i915ressyslinux-3.85-pre62H. Peter Anvin2010-02-03695-9856/+64396
| | |\ \
| | * \ \ Merge branch 'master' into i915ressyslinux-3.85-pre61H. Peter Anvin2010-01-222-4/+10
| | |\ \ \
| | * | | | vesa: allow arbitrary resolutions on some Intel chipsetsH. Peter Anvin2010-01-224-2/+813
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some code from the tool "915resolution" to allow arbitrary resolutions to be set on some Intel chipsets. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | Makefile: dos/copybs.com now in dosutilH. Peter Anvin2010-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | dosutil: move copybs here, update MakefileH. Peter Anvin2010-02-154-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move copybs to dosutil, change the Makefile to deal with UPX being able to compress (e.g. very small files.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: use vk_append for function 0016h temp storagesyslinux-4.00-pre24H. Peter Anvin2010-02-161-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a) we have to copy the command line tail earlier - the pm_* calls may use xfer_buf_seg in particular. b) use vk_append rather than trackbuf; vk_append should definitely be unused. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | core: remove stray -DDEBUGH. Peter Anvin2010-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove stray -DDEBUG that should not have been committed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: handle symlinks larger than a single blockH. Peter Anvin2010-02-161-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no law that symlinks has to be a single block only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | ext2: a zero block number is actually legitH. Peter Anvin2010-02-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It may not happen in normal operation, but a zero block value is legit and means an all-zero block. For anything which uses the cache, we have dealt with that by always keeping a zero block in the cache. Signed-off-by: H. Peter Anvin <hpa@zytor.com>