summaryrefslogtreecommitdiffstats
path: root/lib/libstand
Commit message (Collapse)AuthorAgeFilesLines
* Restore bzip2(1) support in loader(8) after Peter's renames ofru2003-04-251-2/+11
| | | | malloc() to Malloc(), and free() to Free(), in zalloc_malloc.c.
* Trust the code more than the comment(s) and correct some falserobert2003-04-121-4/+4
| | | | | statements about pointer data type sizes, which spread probably by copy-and-paste.
* Sync up with kern/subr_prf.c. This adds %ll, %j, %q, %z, etc.peter2003-04-061-47/+115
|
* The .Fn functioncharnier2003-03-241-5/+10
| | | | The .Nm library
* Fix a machine check abort caused by the EFI loader trying to open amarcel2003-03-032-2/+4
| | | | | | | | | | | | | | | | | | file in the NFS file system when the underlying device is not a network device. A Sparc64 specific hack for this exact problem was already present (nfs.c:1.9, tftp.c:1.10), but the problem is not specific to Sparc64. The hack has been promoted to a non-i386 test because on non-i386 architectures it's either impossible to have non-network devices coexist in the same loader with the NFS FS, or network and non-network device coexist and NFS filesystems can only be used on top of network devices. I believe i386 pxeboot is where this does not hold. The root cause of this problem is in open.c where each file system is tried until no more file systems exist or a file system returns success. There's no notion of a list of valid file systems given the underlying device and the non-existence of a file can cause the invalid combination to be tried.
* The zalloc pool's size calculation breaks if sbrk() does not returndillon2002-12-191-3/+3
| | | | | | contiguous chunks of memory. It happens to do so in the bootstrap code, but not necessarily in other places. MFC after: 7 days
* Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.jake2002-12-195-330/+6
|
* Uniformly refer to a file system as "file system".ru2002-12-121-14/+14
| | | | Approved by: re
* Capitalize ASCII code names.ru2002-12-051-2/+5
| | | | Approved by: re
* Update the second copy of libstand to deal with the new ufs2 superblockjake2002-12-031-1/+1
| | | | | | format. The one in sys/boot/libstand is not connected to the build. Approved by: re
* Add the libz derived files, added in the previous commit, tomarcel2002-10-191-0/+2
| | | | CLEANFILES. We were not cleaning up after ourselves.
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-251-1/+2
|
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* Fix a typo in #if 0 codescottl2002-08-211-1/+1
|
* Stash various networking paramters in the environment for the kerneljake2002-07-311-1/+15
| | | | to pick up, ala pxe.
* Reimplement malloc/free debugging that includes the offending file:linepeter2002-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)
* Add __printflike() to printf() and sprintf() prototypes. -ffreestandingpeter2002-07-201-2/+2
| | | | | turns off gcc's builtin attributes for these functions and as a result -Wformat does no checking. (argh)
* Add a hack (kludge?) to avoid trying to access files backed by diskjake2002-07-072-0/+8
| | | | devices as though they were backed by network devices.
* Ficl wants _setjmp and _longjmp. No need for weak symbols either.jake2002-07-071-6/+4
|
* To avoid anybody else getting caught out, these two files are reallypeter2002-06-292-278/+0
| | | | in /sys/boot/common and are actually used there.
* Update from NetBSD 1.3 -> 1.6. Most notable, rev 1.6:peter2002-06-291-1/+13
| | | | | | "Make in_cksum work on little endian machines" This would explain a few things. :-)
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-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>
* Correct bswap64() prototype.sobomax2002-06-031-1/+1
| | | | | | Submitted by: glewis MFC after: 1 day (assuming that there is re's approval)
* Remove a URL from the middle of the BSD copyright (a clicko? a pasto?).schweikh2002-06-021-4/+4
| | | | | | | | | Fix typos: s/evironment/environment s/cont/const s/_lonjmp/_longjmp MFC after: 3 weeks
* Use an explicitly-sized type instead of daddr_t for on-disk blockiedowse2002-05-191-2/+2
| | | | numbers.
* UFS indirect blocks are size u_int32_t, not daddr_tphk2002-05-181-2/+2
|
* Add __divdi3() and __moddi3() to libstand. We will need them for UFS2.phk2002-05-131-0/+48
| | | | Sponsored by: DARPA & NAI Labs.
* #include <sys/disklabel.h> to get BBSIZE.phk2002-05-121-0/+1
|
* Added new bsd.incs.mk which handles installing of header filesru2002-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".
* libstand needs _setjmp/_longjmp for FICL.obrien2002-04-131-0/+100
| | | | Submitted by: jake
* Use -ffreestanding. It is REQUIRED by GCC 3.1 on all architectures.obrien2002-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
* Break the sparc64 build. I expect those that complained about this commitobrien2002-04-091-2/+0
| | | | to fix the sparc64 case to their liking.
* sparc64 grew _setjmp/_longjmp.obrien2002-04-081-2/+0
|
* Use -ffreestanding.obrien2002-04-081-3/+1
|
* Remove __P() usage.obrien2002-03-211-5/+5
|
* Remove 'register' keyword.obrien2002-03-2121-167/+167
|
* Kill debugging printf() slipped into my last commit.sobomax2002-03-211-1/+0
| | | | | Noticed by: jhb Hall of shame entry: sobomax
* Add -ffreestanding to CFLAGS for ia64. This should probably be globalpeter2002-03-191-0/+2
| | | | like on the kernel.
* Add splitfs vfs layer into libstand, which allows loading big kernels andsobomax2002-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
* o Don't require long long support in bswap64() functions.mike2002-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
* Add the following functions/macros to support byte order conversions andtmm2002-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
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-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
* Fixed world breakage in previous commit. The generated headers are inbde2002-02-021-1/+1
| | | | the current directory which is rarely ${.CURDIR}.
* Complete bzip2-1.0.2 import.sobomax2002-02-015-15/+58
| | | | MFC in: 14 days
* We support writing to at least one filesystem now.jhb2001-12-111-1/+1
| | | | | | PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
* Add support for overwriting the existing contents of a file to the UFSjhb2001-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.
* Back out my 'fix', resid is different for strategy than for writealfred2001-11-301-2/+2
|
* Make the same fix for writes to RAW objects.alfred2001-11-301-2/+2
|
* write should return the number of bytes written, not 0 on success.alfred2001-11-301-1/+1
| | | | | Submitted by: Jonathan Mini <mini@haikugeek.com> PR: kern/32350
* - Change the f_isdir field of struct file to be a flags field and twojhb2001-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().
OpenPOWER on IntegriCloud