summaryrefslogtreecommitdiffstats
path: root/sys/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate the last of the LINTEDn and PRINTFLIKEn comments. In oneguenther2015-10-011-3/+0
| | | | | | | case, by deleting some useless '& of an array' we also eliminate the need for the casts which prompted the original lint warnings ok deraadt@
* Remove orphaned files.miod2015-09-183-239/+1
|
* unify free(NULL,size) behaviour by allowing passing NULLsemarie2015-09-141-3/+7
| | | | ok millert@ jasper@
* Initial commit of uefi boot loader of OpenBSD.yasuoka2015-09-022-4/+4
| | | | ok deraadt yuo
* When sendrecv() returns -1, have rpc_call() return -1 as well. Otherwise, duemiod2015-08-151-2/+2
| | | | | to the cast to unsigned, it fails the error test and returns a bogus partial read to the caller, which is painful to debug.
* Use signed variables to store the result of rpc_call().miod2015-08-151-3/+3
|
* Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outmiod2015-07-171-5/+3
| | | | kernels and we no longer have any.
* Adjust type of link_len to match type of di_size in underlying struct, andkspillner2015-07-172-11/+9
| | | | | | | | | | change type of len to size_t to match strlen(3) result. Drop unneeded casts. u_int64_t is overkill because the actual size is still limited to SYMLINK_MAX but it is probably better to match the filesystem types. ok miod@, guenther@
* Expand ancient NTOHL/NTOHS/HTONS/HTONL macros.mpi2015-07-162-7/+7
| | | | ok guenther@, henning@
* Fix 1.26; kdoprnt() should not attempt to invoke va_end() at all, it's themiod2015-06-141-4/+2
| | | | caller's responsibility to do so.
* At some point arm moved to a unified syntax for arm and thumb instructions.jsg2015-06-082-39/+43
| | | | | | | | | While binutils supports both "unified" and "divided" syntax (defaulting to divided) the integrated assembler in clang only supports unified names so switch some files to unified syntax. Similiar changes were made in bitrig and freebsd. No difference in objdump -d output. tested on zaurus by deraadt@, ok miod@
* Extend the libsa loadfile(9) granularity to tell apart randomness from the restmiod2015-05-192-6/+15
| | | | | | | | | of the kernel, and extend the array filled by loadfile to report the location of the randomness area. This doesn't introduce any change for bootblocks (save for a slightly larger stack usage due to the larger array), for the new {LOAD,COUNT}_RANDOM bits are included in the {LOAD,COUNT}_ALL masks everything uses or computes from.
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-1/+0
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Remove unused static local variable; mickey@miod2015-03-101-3/+1
|
* Invoke va_end() before returning, rather than in an unreachable place; mickey@miod2015-03-101-3/+4
|
* Include sys/stdint.h for SIZE_MAX. OK deraadt@ miod@millert2015-02-051-1/+2
|
* Revert some $OpenBSD$ additions about which there are doubts.krw2015-01-201-1/+0
| | | | Suggested by deraadt@
* Missing $OpenBSD$'s.krw2015-01-201-0/+1
| | | | ok deraadt@
* Make some $OpenBSD$ lines prettier/standardier by eliminatingkrw2015-01-191-1/+1
| | | | | | | superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
* Sync with libc version.millert2015-01-152-43/+42
|
* unifdef __APCS_26__ we don't run on anything with a 26 bit program counter.jsg2014-12-305-61/+5
| | | | | This codepath was removed in the NetBSD code this is derived from back in 2003 and was removed in Bitrig earlier this year. No binary change.
* Replacing <machine/endian.h> with <sys/endian.h> does not imply removingmiod2014-12-202-0/+4
| | | | <sys/types.h>. kthxbye
* Use <sys/endian.h> instead of <machine/endian.h>guenther2014-12-192-4/+2
| | | | ok dlg@ mpi@ bcook@ millert@ miod@
* sync with libc, using brnz,pt instead, should be betterderaadt2014-12-191-5/+4
| | | | ok kettenis
* Like libc, also for the kernel: Import new amd64 assembly versions ofreyk2014-12-094-93/+442
| | | | | | | | | | strchr/index, strrchr/rindex, and strlen that provide a significantly faster performance than our previous .c or .S implementations. Based on NetBSD's code. Tested with different amd64 CPUs. ok deraadt@ mikeb@
* it should not be necessary to clear the direction flagtedu2014-11-2916-26/+8
| | | | ok deraadt
* mask off high bits from 'c', before operation, otherwise the packingderaadt2014-11-211-0/+1
| | | | | logic writes balony. Hunting with tedu, mlarkin, and final bit spotted by naddy in freebsd's version.
* Yet more #include de-duplication.krw2014-11-201-2/+1
| | | | ok deraadt@ tedu@
* Sprinkle const whenever possible.miod2014-11-1912-44/+44
|
* Move {recv,send}udp() out of net.c into their own file; to be used shortly.miod2014-11-193-206/+259
| | | | Add the new files to the few md libsa builds which require it.
* Ansify.miod2014-11-191-17/+8
|
* Make the past-ELAST libsa-specific errno values contiguous.miod2014-11-191-6/+6
|
* Remove braindead prototype for a nonexistent function.miod2014-11-191-2/+1
|
* Sprinkle const in static (internal) routines.miod2014-11-192-21/+13
|
* Nuke yet more obvious #include duplications.krw2014-11-181-2/+1
| | | | ok miod@
* typomiod2014-11-091-2/+2
|
* Read the section header string table in the boot blocks' memory, not in themiod2014-10-261-2/+2
| | | | loaded image area.
* ddb: add support for DWARF line number decodingmatthew2014-10-091-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | This allows ddb's "trace" command to include file and line numbers: ddb{0}> trace Debugger() at Debugger+0x9 [../../../../arch/amd64/amd64/db_interface.c:405] ddb_sysctl() at ddb_sysctl+0x1b4 [../../../../ddb/db_usrreq.c:104] sys___sysctl() at sys___sysctl+0x216 [../../../../kern/kern_sysctl.c:229] syscall() at syscall+0x297 [../../../../sys/syscall_mi.h:84] --- syscall (number 202) --- end of kernel end trace frame: 0x7f7ffffcf1d7, count: -4 acpi_pdirpa+0x4117aa: For this to work, it requires using a new version of boot(8), and booting a kernel with the .debug_line section present (e.g., building with ``makeoptions DEBUG="-g"'' and then booting the bsd.gdb kernel instead of the stripped bsd kernel). Still a WIP, but no failure reports yet. Committing so further development and testing can happen in tree. prodding deraadt, guenther, mlarkin ok mpi
* use NULL instead of (foo *)0; Kent R. Spillnerderaadt2014-07-222-9/+9
|
* remove unneccessary casts; Kent R. Spillnerderaadt2014-07-222-3/+3
|
* zap trailing newlines; "go for it" deraadtokan2014-07-161-2/+1
|
* KASSERTMSG(9): New kernel assertion with messageuebayasi2014-07-131-1/+17
| | | | | | | | | | | | | | | | | | | | | | | KASSERT() is annoying as it only prints the expression as a string. If you (developers) want to know a little more information, you have to do: #ifdef DIAGNOSTIC if (bad) panic(...); #endif KASSERTMSG() replaces it into a single line: KASSERTMSG(!bad, ...); Taken from NetBSD. (There is a concern that KASSERT() messages are too long; consume more memory, and not friendly for small monitors. This have to be considered & revisited later.) "Like" from henning@ Man page review & advices from jmc@ and schwarze@
* obvious conversion to mallocarray()deraadt2014-07-131-4/+1
|
* Stop using old n_long and n_short types.mpi2014-07-1315-120/+108
|
* move putchar() into libsajasper2014-07-133-5/+72
| | | | "sure" miod@
* move getchar() into libsa where applicablejasper2014-07-122-1/+55
| | | | ok miod@
* guenther (who also should have been credited in previous free size commits)tedu2014-07-121-1/+1
| | | | noticed that i missed committing one file.
* Make normalizeRoundAndPackFloat{32,64} non-static; they will be used outsidemiod2014-07-011-3/+6
| | | | of softfloat.c shortly.
* Protect explicit_bzero() from link-time optimizationmatthew2014-06-211-7/+12
| | | | | | | | | | | | | | | | | | | | Modern compiler toolchains are capable of optimizing even across translation unit boundaries, so simply moving the memory clearing into a separate function is not guaranteed to clear memory. To avoid this, we take advantage of ELF weak symbol semantics, and insert a call to an empty, weakly named function. The semantics of calling this function aren't determinable until load time, so the compiler and linker need to keep the memset() call. There are still ways a toolchain might defeat this trick (e.g., optimistically expecting the weak symbol to not be overloaded, and only calling memset() if it is; promoting weak symbols to strong symbols at link-time when emitting a static binary because they won't be interposed; implementing load-time optimizations). But at least for the foreseeable future, these seem unlikely. ok deraadt
* Rearrange the inequality.brad2014-06-101-3/+3
| | | | | | | | | | Pointed out by LLVM. tftp.c:331:17: error: comparison of unsigned expression < 0 is always false From NetBSD ok miod@