summaryrefslogtreecommitdiff
path: root/lib/libstand
Commit message (Collapse)AuthorAgeFilesLines
* Stash various networking paramters in the environment for the kernelJake Burkholder2002-07-311-1/+15
| | | | | | | to pick up, ala pxe. Notes: svn path=/head/; revision=101112
* Reimplement malloc/free debugging that includes the offending file:linePeter Wemm2002-07-205-40/+73
| | | | | | | | | | | | | | | info. This turned out to be rather useful on ia64 for tracking down malloc/free problems. Detect duplicate free()'s - otherwise these show up as a guard1 failure and it looks like corruption instead of something simple like a second free() where there shouldn't be. Deal with libz using libc headers and not seeing the malloc/free stuff that we provide in libstand. Do similar nastiness to what is done for bzlib. Tested on: i386, ia64 (compile, run) Notes: svn path=/head/; revision=100394
* Add __printflike() to printf() and sprintf() prototypes. -ffreestandingPeter Wemm2002-07-201-2/+2
| | | | | | | | turns off gcc's builtin attributes for these functions and as a result -Wformat does no checking. (argh) Notes: svn path=/head/; revision=100392
* Add a hack (kludge?) to avoid trying to access files backed by diskJake Burkholder2002-07-072-0/+8
| | | | | | | devices as though they were backed by network devices. Notes: svn path=/head/; revision=99558
* Ficl wants _setjmp and _longjmp. No need for weak symbols either.Jake Burkholder2002-07-071-6/+4
| | | | Notes: svn path=/head/; revision=99536
* To avoid anybody else getting caught out, these two files are reallyPeter Wemm2002-06-292-278/+0
| | | | | | | in /sys/boot/common and are actually used there. Notes: svn path=/head/; revision=99031
* Update from NetBSD 1.3 -> 1.6. Most notable, rev 1.6:Peter Wemm2002-06-291-1/+13
| | | | | | | | | "Make in_cksum work on little endian machines" This would explain a few things. :-) Notes: svn path=/head/; revision=99029
* This commit adds basic support for the UFS2 filesystem. The UFS2Kirk McKusick2002-06-211-95/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org> Notes: svn path=/head/; revision=98542
* Correct bswap64() prototype.Maxim Sobolev2002-06-031-1/+1
| | | | | | | | | Submitted by: glewis MFC after: 1 day (assuming that there is re's approval) Notes: svn path=/head/; revision=97776
* Remove a URL from the middle of the BSD copyright (a clicko? a pasto?).Jens Schweikhardt2002-06-021-4/+4
| | | | | | | | | | | | Fix typos: s/evironment/environment s/cont/const s/_lonjmp/_longjmp MFC after: 3 weeks Notes: svn path=/head/; revision=97733
* Use an explicitly-sized type instead of daddr_t for on-disk blockIan Dowse2002-05-191-2/+2
| | | | | | | numbers. Notes: svn path=/head/; revision=96941
* UFS indirect blocks are size u_int32_t, not daddr_tPoul-Henning Kamp2002-05-181-2/+2
| | | | Notes: svn path=/head/; revision=96842
* Add __divdi3() and __moddi3() to libstand. We will need them for UFS2.Poul-Henning Kamp2002-05-131-0/+48
| | | | | | | Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=96525
* #include <sys/disklabel.h> to get BBSIZE.Poul-Henning Kamp2002-05-121-0/+1
| | | | Notes: svn path=/head/; revision=96477
* Added new bsd.incs.mk which handles installing of header filesRuslan Ermilov2002-05-121-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via INCS. Implemented INCSLINKS (equivalent to SYMLINKS) to handle symlinking include files. Allow for multiple groups of include files to be installed, with the powerful INCSGROUPS knob. Documentation to follow. Added standard `includes' and `incsinstall' targets, use them in Makefile.inc1. Headers from the following makefiles were not installed before (during `includes' in Makefile.inc1): kerberos5/lib/libtelnet/Makefile lib/libbz2/Makefile lib/libdevinfo/Makefile lib/libform/Makefile lib/libisc/Makefile lib/libmenu/Makefile lib/libmilter/Makefile lib/libpanel/Makefile Replaced all `beforeinstall' targets for installing includes with the INCS stuff. Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS, and for compatibility with NetBSD. Similarly for INCOWN, INCGRP, and INCMODE. Consistently use INCLUDEDIR instead of /usr/include. gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes were only lightly tested due to the missing contrib/libstdc++-v3. I fully tested the pre-WIP_GCC31 version of this patch with the contrib/libstdc++.295 stuff. These changes have been tested on i386 with the -DNO_WERROR "make world" and "make release". Notes: svn path=/head/; revision=96462
* libstand needs _setjmp/_longjmp for FICL.David E. O'Brien2002-04-131-0/+100
| | | | | | | Submitted by: jake Notes: svn path=/head/; revision=94614
* Use -ffreestanding. It is REQUIRED by GCC 3.1 on all architectures.David E. O'Brien2002-04-091-2/+2
| | | | | | | | | | I don't like putting this very-GCC centric option here; but no one as given a better idea of handling it. Reviewed by: jhb Notes: svn path=/head/; revision=94310
* Break the sparc64 build. I expect those that complained about this commitDavid E. O'Brien2002-04-091-2/+0
| | | | | | | to fix the sparc64 case to their liking. Notes: svn path=/head/; revision=94264
* sparc64 grew _setjmp/_longjmp.David E. O'Brien2002-04-081-2/+0
| | | | Notes: svn path=/head/; revision=94236
* Use -ffreestanding.David E. O'Brien2002-04-081-3/+1
| | | | Notes: svn path=/head/; revision=94235
* Remove __P() usage.David E. O'Brien2002-03-211-5/+5
| | | | Notes: svn path=/head/; revision=92917
* Remove 'register' keyword.David E. O'Brien2002-03-2121-167/+167
| | | | Notes: svn path=/head/; revision=92913
* Kill debugging printf() slipped into my last commit.Maxim Sobolev2002-03-211-1/+0
| | | | | | | | Noticed by: jhb Hall of shame entry: sobomax Notes: svn path=/head/; revision=92863
* Add -ffreestanding to CFLAGS for ia64. This should probably be globalPeter Wemm2002-03-191-0/+2
| | | | | | | like on the kernel. Notes: svn path=/head/; revision=92693
* Add splitfs vfs layer into libstand, which allows loading big kernels andMaxim Sobolev2002-03-176-3/+292
| | | | | | | | | | | | | | | | | | | | | | | | | modules split across several physical medias. Following is how it works: The splitfs code, when asked to open "foo" looks for a file "foo.split" which is a text file containing a list of filenames and media names, e.g. foo.aa "Kernel floppy 1" foo.ab "Kernel floppy 2" foo.ac "Kernel and modules floppy" For each file segment, the process is: - try to open the file - prompt "Insert the disk labelled <whatever> and press any key..." - try to open the file - return error if file could not be located RE team is free to use this feature in the upcoming 5.0-DP1. Reviewed by: msmith, dcs Notes: svn path=/head/; revision=92494
* o Don't require long long support in bswap64() functions.Mike Barcroft2002-03-091-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness. Submitted by: bde o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code. Reviewed by: bde Notes: svn path=/head/; revision=91959
* Add the following functions/macros to support byte order conversions andThomas Moestl2002-02-271-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike Notes: svn path=/head/; revision=91394
* o Move NTOHL() and associated macros into <sys/param.h>. These areMike Barcroft2002-02-182-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm Notes: svn path=/head/; revision=90868
* Fixed world breakage in previous commit. The generated headers are inBruce Evans2002-02-021-1/+1
| | | | | | | the current directory which is rarely ${.CURDIR}. Notes: svn path=/head/; revision=90097
* Complete bzip2-1.0.2 import.Maxim Sobolev2002-02-015-15/+58
| | | | | | | MFC in: 14 days Notes: svn path=/head/; revision=90070
* We support writing to at least one filesystem now.John Baldwin2001-12-111-1/+1
| | | | | | | | | PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc. Notes: svn path=/head/; revision=87632
* Add support for overwriting the existing contents of a file to the UFSJohn Baldwin2001-12-111-4/+119
| | | | | | | | | | | | driver in libstand. This specifically does not expand or truncate files since the filesystem may be dirty or inconsistent. PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc. Notes: svn path=/head/; revision=87631
* Back out my 'fix', resid is different for strategy than for writeAlfred Perlstein2001-11-301-2/+2
| | | | Notes: svn path=/head/; revision=87114
* Make the same fix for writes to RAW objects.Alfred Perlstein2001-11-301-2/+2
| | | | Notes: svn path=/head/; revision=87112
* write should return the number of bytes written, not 0 on success.Alfred Perlstein2001-11-301-1/+1
| | | | | | | | Submitted by: Jonathan Mini <mini@haikugeek.com> PR: kern/32350 Notes: svn path=/head/; revision=87111
* - Change the f_isdir field of struct file to be a flags field and twoJohn Baldwin2001-11-061-13/+54
| | | | | | | | | | | | new flags: F_ROOTDIR and F_RR (Rock Ridge present). - Cache the SUSP LEN_SKP parameter in struct file as well. - If we open() '/', then force a read of the directory's contents so we can examine the directory record of '.' to see if Rock Ridge is present. - If Rock Ridge extensions are present, lookup Rock Ridge names in readdir(). Notes: svn path=/head/; revision=86158
* - Add a simple SUSP parser.John Baldwin2001-11-061-8/+154
| | | | | | | | - Use the SUSP parser to detect Rock Ridge (RRIP) extensions and to look up alternate names when opening files. Notes: svn path=/head/; revision=86142
* Switch to using ANSI function declarations and add missing functionJohn Baldwin2001-11-061-31/+15
| | | | | | | | prototypes. I'm tired of getting stupid bugs from changing function parameters and not getting warnings from the compiler when I goof it up. Notes: svn path=/head/; revision=86137
* Make the output from assert() look more like the example in the C99Mike Barcroft2001-10-291-4/+4
| | | | | | | | | standard. Requested by: bde Notes: svn path=/head/; revision=85671
* Only provide function information in compile environments that supportMike Barcroft2001-10-271-4/+7
| | | | | | | | | | the C99 variable __func__ and never for C++. Provide a more meaningful example in the assert(3) manual. Reviewed by: asmodai, bde Notes: svn path=/head/; revision=85607
* Remove the -I../libc/${MACHINE_ARCH} that was there solely forPeter Wemm2001-10-261-3/+0
| | | | | | | the #include "DEFS.h" that was only used on i386 (which has been fixed). Notes: svn path=/head/; revision=85568
* Change #include "DEFS.h" to <machine/asm.h>.Peter Wemm2001-10-251-1/+1
| | | | Notes: svn path=/head/; revision=85451
* Add __FBSDID.Jeroen Ruigrok van der Werven2001-10-241-3/+5
| | | | | | | | Change __assert() function to print failing function name. This makes us C99 conforming. Notes: svn path=/head/; revision=85423
* Make this Makefile suitable for sparc64.Robert Drehmel2001-10-151-2/+5
| | | | Notes: svn path=/head/; revision=84995
* Define the types iaddr_t and saddr_t for sparc64.Robert Drehmel2001-10-151-0/+4
| | | | Notes: svn path=/head/; revision=84993
* Compensate for "Compensate for header dethreading" by backing it out.Bruce Evans2001-10-101-2/+0
| | | | Notes: svn path=/head/; revision=84768
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-3/+3
| | | | Notes: svn path=/head/; revision=84306
* mdoc(7) police: markup nits.Ruslan Ermilov2001-10-011-9/+13
| | | | Notes: svn path=/head/; revision=84282
* Add __FBSDID()s to libstandMatthew Dillon2001-09-3053-49/+161
| | | | Notes: svn path=/head/; revision=84221
* Add support for loading bzip2-compressed filesystems. Among other thingsMaxim Sobolev2001-09-187-5/+371
| | | | | | | | | | this would allow to load bzip2-compressed kernels/modules from the loader(8) (support for that will be committer separately). MFC after: 1 month Notes: svn path=/head/; revision=83610