summaryrefslogtreecommitdiffstats
path: root/lib/libstand
Commit message (Collapse)AuthorAgeFilesLines
* 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().
* - Add a simple SUSP parser.jhb2001-11-061-8/+154
| | | | | - Use the SUSP parser to detect Rock Ridge (RRIP) extensions and to look up alternate names when opening files.
* Switch to using ANSI function declarations and add missing functionjhb2001-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.
* Make the output from assert() look more like the example in the C99mike2001-10-291-4/+4
| | | | | | standard. Requested by: bde
* Only provide function information in compile environments that supportmike2001-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
* Remove the -I../libc/${MACHINE_ARCH} that was there solely forpeter2001-10-261-3/+0
| | | | the #include "DEFS.h" that was only used on i386 (which has been fixed).
* Change #include "DEFS.h" to <machine/asm.h>.peter2001-10-251-1/+1
|
* Add __FBSDID.asmodai2001-10-241-3/+5
| | | | | Change __assert() function to print failing function name. This makes us C99 conforming.
* Make this Makefile suitable for sparc64.robert2001-10-151-2/+5
|
* Define the types iaddr_t and saddr_t for sparc64.robert2001-10-151-0/+4
|
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-101-2/+0
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-3/+3
|
* mdoc(7) police: markup nits.ru2001-10-011-9/+13
|
* Add __FBSDID()s to libstanddillon2001-09-3053-49/+161
|
* Add support for loading bzip2-compressed filesystems. Among other thingssobomax2001-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
* Remove bogus implementation of _setjmp/_longjmpdfr2001-09-031-140/+0
|
* Check for malloc failure in a couple of caseskris2001-09-032-0/+8
| | | | MFC after: 2 weeks
* Fix a bug in lseek which caused the loader to fail on some gzippedjdp2001-08-291-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | kernels. The error message was "elf_loadexec: cannot seek". Libstand maintains a read-ahead buffer for each open file, so that it can read in chunks of 512 bytes for greater efficiency. When the loader tries to lseek forward in a file by a small amount, it sometimes happens that the target file offset is already in the read-ahead buffer. But the lseek code simply discarded the contents of that buffer and performed a seek directly on the underlying file. This resulted in an attempt to seek backwards in the file, since some of the data has already been read into the read-ahead buffer. Gzipped data streams cannot seek backwards, so an error was returned. This commit adds code which checks to see if the desired file offset is already in the read-ahead buffer. If it is, the code simply adjusts the buffer pointer and length, thereby avoiding a reverse seek on the gzipped data stream. I incorporated a suggestion from Matt Dillon which saved a little bit of code in this fix. Reviewed by: dillon, gallatin, jhb
* Bail if we go beyond the directory size, not just if we hit it.gallatin2001-08-231-1/+1
| | | | | | Certain ISO fs's (like the one for 4.4-RC1 disc1 on alpha) trigger this, and we end up opening a null file name. This causes us to get a false match for "kernel.ko" when it does not exist.
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-141-2/+6
|
OpenPOWER on IntegriCloud