summaryrefslogtreecommitdiff
path: root/core/include/fs.h
Commit message (Collapse)AuthorAgeFilesLines
* core: Avoid initializing the cache more than onceRaphael S. Carvalho2014-04-031-0/+1
| | | | | | | | | | Most of file system drivers initialize the cache themselves. The problem is that the same cache could be again initialized later, then invalidating the previous one. This patch fixes this. Problem found while auditing the code. Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
* Add filesystem UUID to SYSAPPEND for FATSerj Kalichev2014-03-131-0/+4
| | | | | | | | | | Filesystem UUID shows the partition we boot kernel from. The kernel parameter has format like FSUUID=DA1A-0B2E. The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID. The patch is based on 67aaaeeb228. Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge tag 'syslinux-5.11-pre2' into firmwareMatt Fleming2013-06-171-1/+9
|\ | | | | | | | | | | | | | | syslinux-5.11-pre2 Conflicts: core/elflink/load_env32.c version
| * PATH: use a linked list internallysyslinux-5.11-pre1Matt Fleming2013-06-131-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In retrospect, choosing the colon character as the entry separator for the PATH directive was not a smart move, as that character is also used in TFTP-style paths. This conflict manifests as PXELINUX being unable to find and load files. An example dnsmasq log looks like, dnsmasq-tftp: sent /arch/boot/syslinux/lpxelinux.0 to 192.168.0.90 dnsmasq-tftp: file /arch/ldlinux.c32 not found dnsmasq-tftp: file /arch//ldlinux.c32 not found dnsmasq-tftp: file /arch//boot/isolinux/ldlinux.c32 not found dnsmasq-tftp: file /arch//isolinux/ldlinux.c32 not found dnsmasq-tftp: file /arch//boot/syslinuxldlinux.c32 not found dnsmasq-tftp: sent /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90 dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90 dnsmasq-tftp: failed sending /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90 dnsmasq-tftp: sent /arch/boot/syslinux/archiso.cfg to 192.168.0.90 dnsmasq-tftp: sent /arch/boot/syslinux/whichsys.c32 to 192.168.0.90 dnsmasq-tftp: file /arch/libcom32.c32 not found dnsmasq-tftp: file /arch//libcom32.c32 not found dnsmasq-tftp: file /arch/libcom32.c32 not found dnsmasq-tftp: file /arch//arch//boot/syslinux/libcom32.c32 not found The last line of the log is the indication that there's a problem. Internally, Syslinux adds the location of ldlinux.c32 to PATH by querying the current working directory once ldlinux.c32 is successfully loaded. Under PXELINUX that means the initial PATH string will be, "::/arch/boot/syslinux/" The PATH parsing code doesn't know how to correctly parse the "::" string and hence, the file is searched for relative to the 210 dhcp option directory - /arch/. Implement PATH with a linked list which *greatly* simplifies the path code, and means we no longer have to parse strings backwards and forwards. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-221-8/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version
| * Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-8/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
| | * core: pass the file flags down through the stackH. Peter Anvin2011-05-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Pass the file flags down through the stack. This allows us to distinguish between open for read, open for write, or opendir in the low-level filesystem functions; this will matter for the PXE methods. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * PXE Cleanups, allow for 128 open filesH. Peter Anvin2011-04-251-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up dead code in the PXE stack. The buffer assignment no longer limits the number of open files either, so raise it to something more than reasonable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-291-0/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | core/fs: remove some stale functions, inode refcount debugH. Peter Anvin2013-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Remove some stale (16-bit compatibility) functions in fs.c. Add some debugging for inode refcounts. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | | Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-4/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/Makefile com32/lib/sys/module/elf_module.c core/cleanup.c core/comboot.inc core/conio.c core/fs/fs.c core/init.c core/mem/free.c core/mem/malloc.c core/timer.inc diag/geodsp/Makefile extlinux/main.c mk/embedded.mk modules/Makefile Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | PATH: Use installation directory for 'PATH'Matt Fleming2012-11-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'xfs-for-hpa' of git://zytor.com/users/pcacjr/syslinux into ↵Matt Fleming2012-11-271-3/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | Add support for 64-bit filesystem compatible struct inode.Chen Baozi2012-07-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct inode of syslinux is designed for 32-bit filesystem. However, mordern filesystem has already evolved into 64-bit, such as XFS. So we modified it according the current linux kernel's struct inode, which would support 64-bit file size, block number and inode number. Signed-off-by: Chen Baozi <baozich@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | | | firmware: Make disk->private an opaque typeMatt Fleming2012-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've currently got both the BIOS and EFI versions of struct disk_private in core/include/disk.h, which isn't ideal because this file shouldn't need to know about the inner-workings of the firmware's private disk info. Move the implementation of 'struct disk_private' into more suitable locations and use a void * for the 'private' member of struct disk. This change allows us to once and for all delete the gnu-efi header files from core/include/core.h and the gnu-efi include paths from mk/lib.mk. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | | Create derivative-specific filesMatt Fleming2012-09-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having derivative-specific code within the assembly files and guarded by %if SYSLINUX, etc move all the code to C files so that the correct get_derivative_info() function can be wired up at runtime. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | | Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmwareMatt Fleming2012-07-301-2/+8
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/adv.c com32/elflink/ldlinux/kernel.c com32/elflink/ldlinux/ldlinux.c com32/include/bitsize/stddef.h com32/include/bitsize/stdint.h com32/include/stdint.h com32/include/sys/module.h com32/include/sys/x86_64/bitops.h com32/include/syslinux/linux.h com32/lib/Makefile com32/lib/sys/ansicon_write.c com32/lib/sys/module/elfutils.h com32/lib/sys/vesa/efi/fill.h com32/lib/syslinux/load_linux.c com32/lib/syslinux/serial.c com32/lib/syslinux/shuffle.c core/conio.c core/elflink/config.c core/elflink/load_env32.c core/graphics.c core/include/graphics.h core/init.c core/pxelinux.asm mk/elf.mk mk/lib.mk
| * | | Merge remote-tracking branch 'origin/master' into elflinkH. Peter Anvin2012-06-281-0/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | Conflicts: core/fs/lib/searchconfig.c Get the reverse pathname lookup fixes from the master branch.
| | * | Actually keep track of the pathnames for all elementssyslinux-4.06-pre9H. Peter Anvin2012-06-281-0/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | Actually keep track of the pathnames for all elements for on-disk filesystems. This makes sure we can always reconstruct the correct path. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | fs: Add .copy_super to struct fs_opsMatt Fleming2012-06-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c0d18deeee2 ("elflink: Fix boot sector booting") makes reference to vfat_copy_superblock() which is only implemented for SYSLINUX, resulting in an undefined symbol when booting ISOLINUX or PXELINUX. Move the superblock copy operation to struct fs_ops so that we don't need to add a stub implementation of vfat_copy_superblock() to ISOLINUX and PXELINUX. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | ldlinux: fixes bug that happens when using fullpath for a COM32 moduleAndre Ericson2012-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using full path for a com32 module, for example, /boot/syslinux/ls.c32 it fails without any error message. This patch fixes it by looking first if the argv[0] is the path to a module before looking for it at PATH. Since we're using fopen to open module files (which works for both absolute paths and paths relative to the current working directory) we no longer need to include "." in PATH and neither the code to handle it. Signed-off-by: Andre Ericson <de.ericson@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | elflink: Fix boot sector bootingMatt Fleming2012-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds missing support for booting from a boot sector file such as .bs, .bss or .0, by re-implementing the old asm bootsec code from core/bootsect.inc in C. This has resulted in some external changes. We've had to make StackBuf a global symbol because we access it directly from execute.c. Also, we need to move dsinfo.c into MINLIBOBJS because ldlinux now needs to reference __syslinux_derivative_info. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | fs.h: A slighly more useful default PATHH. Peter Anvin2012-05-181-1/+1
| | | | | | | | | | | | | | | | | | /bin is clearly insane... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | core: Add open_config() prototypeMatt Fleming2012-04-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... to fix the following warning, readconfig.c: In function ‘parse_one_config’: readconfig.c:1339:3: warning: implicit declaration of function ‘open_config’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | core: Abstract search_config() into search_dirs()Matt Fleming2012-03-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The core currently abuses search_config() in order to locate ldlinux.c32. The problem with this is that search_config() updates ConfigName with the realpath of the file on every invocation. If we've previously set ConfigName search_config() will overwrite this value. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | ldlinux: Avoid initialised data memory corruptionMatt Fleming2012-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't realloc() 'PATH' because realloc() may just extend the malloc'd region if the adjacent region is free, as opposed to allocating a new region and then copying the data. This behaviour is fine in most circumstances but not with initialised string data, such as 'PATH'. The reason is that other string data pointers may point to characters in 'PATH' and if we modify it after realloc()'ing, we'll appear to corrupt unrelated string data. For example, the string "/" is used in chdir() and the address of that string is the last "/" in 'PATH'. If we realloc() and then append "foo" to 'PATH' the string pointer in chdir() will now point to "/foo". Initialise 'PATH' at runtime using malloc() and free() to avoid corrupting string data. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware: Fix assorted compiler warningsMatt Fleming2012-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes the build a little quieter by fixing the following warnings, firmware.h:39:43: warning: ‘struct initramfs’ declared inside parameter list main.c:714:2: warning: implicit declaration of function ‘fs_init’ core/mem/free.c:79:5: warning: implicit declaration of function ‘FreePool’ core/mem/malloc.c:73:5: warning: implicit declaration of function ‘AllocatePool’ Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware, diskio: Create struct disk_privateMatt Fleming2012-03-281-1/+0
|/ / | | | | | | | | | | | | | | | | We need a way of passing firmware-specific information to the disk I/O subsystem. Split the BIOS code into diskio_bios.c so that we don't include any disk BIOS symbols in the EFI executable. This way, the code in core/fs/diskio.c is firmware independent. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | core: Fix ldlinux.c32 failing to load when not installed in "/"Matt Fleming2011-07-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if syslinux is installed in a directory other than "/" we will fail to load ldlinux.c32. Because we know where we were installed the simplest fix is to chdir() to the installation directory before attempting to load ldlinux.c32. This requires us to add "." to PATH so that we look in the current working directory when loading ELF modules. Changing to the install directory needs to handled differently for different file systems, which is the reason behind the new file system operation, .chdir_start(). Disk-based Syslinux variants should use generic_chdir_start() to chdir() to CurrentDirName, which is the installation path. By using this new fs operation, we can load ldlinux.c32 when we expand the "." in PATH, without having to search the entire filesystem for it. However, iso9660 file systems still require us to search some directories because it has no notion of an installation directory. Previously, changing into the install directory was handled when opening the config file, but because the config file parser is now part of the ldlinux.c32 ELF module, it needs to be done much earlier. Reported-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | ldlinux: PATH-based module lookupMatt Fleming2011-06-061-0/+2
| | | | | | | | | | | | | | | | | | Add support for specifying directories to search when loading modules. A new config directive, "PATH", instructs the module loading code to search the directories listed in a colon-separated list when loading a module. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | core: change load_config() to open_config()H. Peter Anvin2011-05-271-3/+4
| | | | | | | | | | | | | | | | Change load_config() to open_config(), which is a method that works just like open_file(). This we can use to get the original configuration file. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'master' into elflink-mergeH. Peter Anvin2010-08-121-2/+0
|\ \ | |/ | | | | | | | | | | | | Resolved Conflicts: core/diskfs.inc core/mem/free.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * diskio: fix name for secpercyl field, remove unused type fieldH. Peter Anvin2010-07-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
| * core: merge the configfile-searching code, isolinux generic namesH. Peter Anvin2010-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * PM getcwd(); Fix COM32 getcwdGene Cumm2010-06-261-0/+3
| | | | | | | | | | | | | | | | | | 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>
| * core, fs: handle .. resolution in the filesystem coreH. Peter Anvin2010-06-251-5/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* | elflink: core: rename getcwd() to avoid conflictFeng Tang2010-07-201-1/+1
| |
* | elflink: merge 4.01 fs partFeng Tang2010-07-201-5/+7
|/ | | | | | | | | | | | | | | | | | | | | | | changes including: modified: core/cmdline.inc modified: core/comboot.inc modified: core/fs/btrfs/btrfs.c modified: core/fs/chdir.c modified: core/fs/diskio.c modified: core/fs/fat/fat.c modified: core/fs/fs.c modified: core/fs/getfssec.c modified: core/fs/iso9660/iso9660.c modified: core/fs/lib/loadconfig.c modified: core/fs/pxe/dhcp_option.c modified: core/fs/pxe/dnsresolv.c modified: core/fs/pxe/idle.c modified: core/fs/pxe/pxe.c modified: core/fs/pxe/pxe.h modified: core/fs/readdir.c modified: core/include/fs.h modified: core/pxelinux.asm
* fs: get rid of enum inode_modeH. Peter Anvin2010-03-091-13/+0
| | | | Replace enum inode_mode with the equivalent enum dirent_type.
* pxe: use an inode structure for pxesyslinux-4.00-pre36H. Peter Anvin2010-03-061-16/+2
| | | | | | | | Use an inode structure for PXE as well. Even though this is really rather superfluous in the case of PXE, it eliminates an ugly special case in the generic code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/fs: clean up, fix and improve the internal readdir() interfacesH. Peter Anvin2010-03-061-2/+13
| | | | | | | | | - Avoid a completely unnecessary malloc/free pair by passing a pointer to the filesystem driver; - Make sure d_reclen is always set correctly; - Make sure the d_type field is set correctly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add 32-bit versions of open file/close fileH. Peter Anvin2010-03-061-0/+4
| | | | | | Add 32-bit API calls for open file and close file. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* readdir: replace opendir/readdir/closedir API with a 32-bit APIH. Peter Anvin2010-03-041-0/+6
| | | | | | | | The 16-bit API to opendir/readdir/closedir was confused, had a memory leak, and was incompatible with Syslinux 3.x anyway. Replace it with a pure 32-bit API. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs: add no_next_extent() dummy functionH. Peter Anvin2010-02-281-0/+3
| | | | | | | | Add a no_next_extent() dummy function for filesystems (like iso9660) which should never end up calling next_extent (because there is only one extent...) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: fs: get rid of the prev_extent memberH. Peter Anvin2010-02-281-2/+2
| | | | | | | | The prev_extent member was only ever used transiently; instead pass the new lstart in as an argument and leave the previous value of next_extent unmolested and thus can be used in-place. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: get rid of unmangle_name completelysyslinux-4.00-pre31H. Peter Anvin2010-02-281-2/+0
| | | | | | | | | | | | The notion of "mangle name" is now restricted to producing a canonical representation, e.g. changing \ -> / for FAT filesystems. However, the resulting mangled name is now always human-readable, so there never is any reason to unmangle a name. Get rid of not just the mangling, but of the resulting unmangled-name buffers and so on. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: remove unmangle_nameH. Peter Anvin2010-02-281-2/+0
| | | | | | Remove the now-obsolete unmangle_name method. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fat: use generic_getfssec(), fix generic_getfssec(), add dprintfH. Peter Anvin2010-02-261-1/+1
| | | | | | | | | | | | | 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>
* fs: add generic getfssecH. Peter Anvin2010-02-261-2/+25
| | | | | | | | 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: fix double free of pathbuf, constify iget filename, fix iso9660H. Peter Anvin2010-02-241-1/+1
| | | | | | | | | | 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>