aboutsummaryrefslogtreecommitdiffstats
path: root/com32/chain/utility.c
Commit message (Collapse)AuthorAgeFilesLines
* chain: year update in commments (trivial)Gene Cumm2015-03-151-1/+1
| | | | | Signed-off-by: Michal Soltys <soltys@ziu.info> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | com32/chain: recognize exFATMichal Soltys2013-02-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | The usual stuff - hidden sectors (now 64bit at different offset), drive offest, "BPB" type. Formally (?) region from 0x0B to 0x3F should be 0, but ... it's tempting to fill "old" values there. Might be worth adding a switch to handle such behavior. Signed-off-by: Michal Soltys <soltys@ziu.info>
* | com32/chain: mangle and related updatesMichal Soltys2013-02-141-5/+4
| | | | | | | | | | | | Comments, output and minor adjustments. Signed-off-by: Michal Soltys <soltys@ziu.info>
* | com32/chain: comments, minor adjustmentMichal Soltys2013-02-141-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | - add some comments to clarify c{nul,add,max} modes - use enums instead of defines - remove unnecessary integer casts - avoid casts and uninline guid_is0() - minor handover comment/flow changes - clean up some old comment-outs - add -fno-strict-aliasing as it's not picked anymore by default for elf.mk Signed-off-by: Michal Soltys <soltys@ziu.info>
* | com32/chain: update licenses and #ifndef stanzasMichal Soltys2013-02-141-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Licenses: chain.[ch] Makefile: GPLv2+ the rest: MIT Defines: Avoid prefixing with _ Signed-off-by: Michal Soltys <soltys@ziu.info> Acked-by: H. Peter Anvin <hpa@linux.intel.com> Acked-by: Shao Miller <sha0.miller@gmail.com>
* | elflink: Replace __intcall() with direct function callsMatt Fleming2012-07-201-24/+6
| | | | | | | | | | | | | | | | There's no reason to use the COMBOOT API at all now that we can have any undefined symbols resolved at runtime - we can just access functions directly. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Delete all references to __com32.cs_bounceMatt Fleming2012-06-081-8/+16
|/ | | | | | | | | The COM32 cs_bounce buffer is not usable with ELF modules, as we're trying to move to an environment where memory is dynamically allocated. All users of __com32.cs_bounce have been converted to using lmalloc() to allocate low memory. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* com32/chain: modify lba2chs() towards using disk_chs typeMichal Soltys2011-03-091-2/+4
| | | | Signed-off-by: Michal Soltys <soltys@ziu.info>
* com32/chain: always report detected BPBMichal Soltys2011-03-081-15/+10
| | | | Signed-off-by: Michal Soltys <soltys@ziu.info>
* com32/chain: utility's lba2chs updateMichal Soltys2010-10-081-4/+8
| | | | | | | | | | | | | | | | | This patch adds 3 modes of operation to lba2chs: l2c_cnul - strict cylinder mode, using at most the value returned by 13h/48h or 13h/08h l2c_cadd - allow using 1 cylinder more. Only if cylinders are less than 1024 and total drive's lba size is not on a cylinder boundary. l2c_max - allow using any cylinder number. Modes have effect only if CHS geometry (cbios) is valid. chain.c uses l2c_cadd. Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain/utility.c: Adjust lba2chsMichal Soltys2010-09-281-26/+29
| | | | | | | | This tiny patch adjusts how lba2chs() deals with unknown geometries. Instead of returning max values of "typical" geometries, it returns chs values calculated from them. Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain module: bugfixing and cosmeticsMichal Soltys2010-09-281-5/+32
| | | | | | | | | | | | | Bugs: - one introduced ages ago - find_by_* functions should be tested vs. <0 for failure - one introduced by 579f15c7c456c - it accidentally blocked too much when testing for ',' in drive/partition option parsing - one introduced by d4d713c9ccfe0 - sone machines / VMs seem to set @40:75 just 1, regardless of amount of fixed disks available Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain module: setbpb changes, bss & bs options, bugfixesMichal Soltys2010-09-281-0/+68
| | | | | | | | | | | | | | | Generic function detecting BPB type (7 versions) have been added. set{hid,geo,drv} have been replaced by single setbpb option, using mentioned function to make more precise decisions what to update where. Full BSS and BS emulation has been added, also employing BPB detection. Some logic/flow changes in chain's main(). There was also a bug, in which backup sector was populated with wrong data. Appropriate documentation updates. Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain, options: fixes, additionsMichal Soltys2010-09-281-0/+1
| | | | | | | | | - add 'bss=' option - update usage() - ommited offsets in 'file=' and 'sect=' default to 0x7c00 now - cosmetics Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain.c: Split chain into smaller filesMichal Soltys2010-09-281-0/+114
new file: chain.h new file: common.h new file: mangle.c new file: mangle.h new file: options.c new file: options.h new file: utility.c new file: utility.h Signed-off-by: Michal Soltys <soltys@ziu.info>