summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
AgeCommit message (Collapse)Author
2009-05-14Add two hooks allowing MD code get a MD header to be included if needed,Miod Vallat
and to override the way HEAP_START and HEAP_LIMIT are defined.
2009-03-02Send valid ERROR packets to prematurely terminate a transfer.Kenneth R Westerback
According to RFC1350 there should be always be a terminating NUL. Andre Gillibert on bugs@ pointed out that the misformed packets caused Gentoo Linux's tftpd (atftpd) to crash trying to transfer pxeboot to an OpenBSD machine. This is slightly different diff than the one proposed by Andre, but he confirms it also fixes the problem. "looks like a better diff to me" deraadt@.
2009-01-18If open() failed because the file does not exist, a struct sd for this fileMiod Vallat
won't be allocated. Check for this in close() so as not to free() bogus pointers.
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-05-08KNFJoel Sing
2008-05-08Fix alignment - sizeof(long) does not always match the address size of theJoel Sing
ELF image being loaded. ok miod@
2008-04-19Change ELF loader to use the LMA as the load address for theTobias Weingartner
various segments. Hopefully this will help remove various hacks in the boot loader in the future. This should have no effect on most architectures (as we tend to have LMA == VMA). ok drahn@, soft ok's various others.
2008-03-31Correctly load ZMAGIC a.out binaries.Miod Vallat
2008-03-31Fix format strings in a.out loader.Miod Vallat
2008-03-30Let this compile with BOOT_AOUT defined.Miod Vallat
2008-01-23Cleanup cn_pri. Change constants to more meaningful names, rather thanJoel Sing
the hp300 related ones currently in use. CN_NORMAL becomes CN_LOWPRI, CN_INTERNAL becomes CN_MIDPRI and CN_REMOTE becomes CN_HIGHPRI. ok miod@
2008-01-06repair build of boot code where it uses an undefind __ashldi3 on some archsOtto Moerbeek
boot code uses 32-bit blknos anyway
2007-09-10Make function pointer calls look all alike; from Holger Mikolon.Miod Vallat
No change in generated code.
2007-06-26Fix the description of loadfile() semantics in comment (and kill "andTom Cosgrove
and" at the same time).
2007-05-30Pull out the ELF loadfile pieces from the standalone libraries, so thatTom Cosgrove
both 32- and 64-bit versions can be created (previously only one or the other could be built for a given boot loader). Use this to allow the i386 and amd64 boot blocks to boot both ELF32 and ELF64 kernels (i.e. amd64 boot blocks can now load i386 kernels, and vice versa). Obviously the system must support LONG mode in order to successfully run the amd64 kernel once it is loaded. Advice and discussions from/with dale@ (going back three years). Much testing nick@ and todd@; thanks.
2007-05-04remove strcpy and strcat from the kernel; they are dead and unused code.Reyk Floeter
(OpenBSD does not use strcat/strcpy in the kernel, if people do it in external modules they should update their code) ok deraadt@
2007-03-16Re-initialise f_seekp to 0 on a successful read_inode() return.Marc Aurele La France
Fixes a problem that prevented the booting of a kernel that, to be found, needs more than one block per directory iin its path to be read. ok miod@, deraadt@
2007-01-04Revert 1.11 and load .shstrtab, as it is currently needed for /dev/ksymsMiod Vallat
proper operation.
2006-12-30do not load unneeded stringtab sections; avoids backward seeking; from ↵Michael Shalayeff
netbsd; tested by miod@ and martin@; deraadt@ ok
2006-10-11use SEEK_SET; chl@tuxfamily.orgTheo de Raadt
2006-09-18Import a slightly stripped down strtoll(3) from stdlibMarco Pfatschbacher
into libsa as it is needed for boot(8) > 4G support. With help from mickey@ i386 and amd64 tests by me, alpha test by mickey@ OK mickey@, miod@, deraadt@
2006-09-18Add a hand rolled 64bit hex printf that can be used outside ofMarco Pfatschbacher
LIBSA_LONGLONG_PRINTF which requires 64bit math support. With help from mickey@ Tested on i386, amd64 and on alpha by mickey@ OK mickey@, miod@, deraadt@
2006-02-06typos from alexey dobriyan;Jason McIntyre
2006-01-06Adapt things to use __type_t instead of _BSD_TYPE_T_Todd C. Miller
Add new sys/_types.h header Include machine/_types.h or sys/_types.h where applicable
2005-07-13do not leak memory if read()ing section headers fails; from Andrey Matveev ↵Michael Shalayeff
<evol@online.ptt.ru>
2005-05-24-ansi considered harmful, even in commentsTodd C. Miller
2004-09-22Add code to let 32bit code *printf() {u,}int64_t values.Miod Vallat
Only enabled if libsa is compiled with the adequate define, so as not to grow bootblocks which do not need this feature. ok deraadt@
2004-07-09Fix buffer writing in cd9660 code, written by Tom and myself, examined by tobyDale Rahn
and tested in-tree for a while.
2004-06-22Change of variable name from read to nread, to reduce differenceTom Cosgrove
from NetBSD version. ok weingart@
2004-04-02remove terms 3 & 4 for drochner@NetBSD.org; as seen on netbsd listsTheo de Raadt
2004-03-19Enter pxeboot, derived from the NetBSD implementation. InitiallyTom Cosgrove
intended to support network installs using bsd.rd over TFTP. Thanks to the many who tested, including Diana Eichert. ok deraadt@
2004-02-10Allow /boot to load read-only data segments in ELF kernels.Tom Cosgrove
Thanks to miod@ for testing on many archs. ok deraadt@.
2004-01-03put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosMarc Espie
to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
2003-08-25rename struct dinode to ufs1_dinode. clears the namespace and makesTed Unangst
way for some future work. no function changes yet. help testing otto@ and markus@
2003-08-11load file in one pass avoiding seeking the headers back and forth; miod@ ↵Michael Shalayeff
testing & ok (two months ago and then i forgot ;)
2003-08-11ansification and knf and protosTheo de Raadt
2003-08-08first ansiTheo de Raadt
2003-08-04Add missing close() on EFTYPE error in exec(); from Patrick LatifiTodd C. Miller
2003-07-05ansiTheo de Raadt
2003-06-04Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. This got missed in the omnibus commit.
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-06-02three four kill ...Michael Shalayeff
2003-06-02kill exec.new bit i had forgottenMichael Shalayeff
2003-06-01strcpy/strcat/sprintf removal in all bootblocks. various testing byTheo de Raadt
various people. outside of some messy things in src/gnu, only one thing in the main tree now violates this rule: bind
2003-05-20de-register; ok millertJason Wright
2003-05-07plug a memory leakMichael Shalayeff
2003-04-17replaced by loadfile nowMichael Shalayeff
2003-04-17missing indentMichael Shalayeff
2003-04-15do the same ufs does: collapse extra slashes. this allows loading files from ↵Michael Shalayeff
the root of cd9660 in particular; millert@ ok
2002-11-11avoid uninitialized warnings from gcc; art@ okMichael Shalayeff