aboutsummaryrefslogtreecommitdiff
path: root/lib/libufs
Commit message (Collapse)AuthorAgeFilesLines
...
* Search beyond the first 1/8th of inodes.Ed Maste2010-05-011-1/+1
| | | | | | | Submitted by: jeff Notes: svn path=/head/; revision=207476
* - Merge soft-updates journaling from projects/suj/head into head. ThisJeff Roberson2010-04-246-4/+230
| | | | | | | | | | | brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm Notes: svn path=/head/; revision=207141
* i doesn't need to be signed here, make it unsigned.Warner Losh2010-02-111-1/+1
| | | | Notes: svn path=/head/; revision=203782
* Back to WARNS=3. The breakage wasn't what I thought it was :(Warner Losh2010-02-111-1/+1
| | | | Notes: svn path=/head/; revision=203772
* Keep Tinderbox happy.Kirk McKusick2010-02-111-1/+1
| | | | Notes: svn path=/head/; revision=203768
* Increased warnings weren't tested on ARM. Bump warnings back down toWarner Losh2010-02-111-1/+1
| | | | | | | | 0 until it can be properly tested by those raising the warnings. Remember: make universe is required when changing the WARNS level. Notes: svn path=/head/; revision=203767
* Build lib/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+1
| | | | | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway. Notes: svn path=/head/; revision=201381
* Allow libufs(3) functions to operate on a regular file. This makes it ↵Juli Mallett2009-06-112-2/+5
| | | | | | | | | | | | possible to use almost anything that uses libufs(3) against a file as an unprivileged user, e.g. tunefs(8) and dumpfs(8) against a makefs(8)-created image. Prodded by: kensmith Notes: svn path=/head/; revision=194030
* Bail out when memory allocation is failed, rather than referencingXin LI2009-04-021-2/+6
| | | | | | | | | | a NULL pointer. PR: kern/94480 Submitted by: Michiel Pelt <m.pelt xs4all nl> Notes: svn path=/head/; revision=190646
* Add a berase() function which uses ioctl(DIOCGDELETE) to erase a slabPoul-Henning Kamp2007-12-164-8/+42
| | | | | | | of the disk. Notes: svn path=/head/; revision=174668
* The ufs_disk_fillout(3) can take special device name (with or without /dev/Pawel Jakub Dawidek2007-03-161-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | prefix) as an argument and mount point path. At the end it has to find device name file system is stored on, which means when mount point path is given, it tries to look into /etc/fstab and find special device corresponding to the given mount point. This is not perfect, because it doesn't handle the case when file system is mounted by hand and mount point is given as an argument. I found this problem while trying to use snapinfo(8), which passes mount points to the ufs_disk_fillout(3) function, but I had file system mounted manually, so snapinfo(8) was exiting with the error below: ufs_disk_fillout: No such file or directory I modified libufs(3) to handle those arguments (the order is important): 1. special device with /dev/ prefix 2. special device without /dev/ prefix 3. mount point listed in /etc/fstab, directory exists 4. mount point listed in /etc/fstab, directory doesn't exist 5. mount point of a file system mounted by hand Notes: svn path=/head/; revision=167625
* Implement cgwrite1(3) function which stored a given cylinder group on disk.Pawel Jakub Dawidek2006-10-315-2/+38
| | | | | | | Sponsored by: home.pl Notes: svn path=/head/; revision=163835
* minor style.Makefile(5) fixes:Giorgos Keramidas2005-09-261-2/+7
| | | | | | | | | | - WARNS before CFLAGS - CFLAGS -DXXX before -IXXX Approved by: ru Notes: svn path=/head/; revision=150558
* Remove getino(3) manpage. It doesn't document what is here, what is here shouldJuli Mallett2005-08-311-116/+0
| | | | | | | | | | not get documented, and what it does document isn't going to come to CVS any time in the immediate future. Patience of a saint: trhodes Notes: svn path=/head/; revision=149660
* Disconnect getino.3 and remove MLINK I added.Tom Rhodes2005-08-311-2/+1
| | | | | | | Discussed with: jmallett Notes: svn path=/head/; revision=149658
* Hook getino.3 up to the build and link it to putino.3.Tom Rhodes2005-08-251-1/+2
| | | | | | | PR: 83820 Notes: svn path=/head/; revision=149448
* Fixed xrefs.Ruslan Ermilov2005-01-211-3/+3
| | | | Notes: svn path=/head/; revision=140566
* Markup fixes.Ruslan Ermilov2004-07-055-31/+31
| | | | Notes: svn path=/head/; revision=131609
* Sort SEE ALSO references (in dictionary order, ignoring case).Ruslan Ermilov2004-07-041-1/+1
| | | | Notes: svn path=/head/; revision=131594
* Removed trailing whitespace.Ruslan Ermilov2004-07-021-1/+1
| | | | Notes: svn path=/head/; revision=131472
* Fixed spelling of the document date.Ruslan Ermilov2004-07-026-6/+6
| | | | Notes: svn path=/head/; revision=131468
* Remove unneccessary include of sys/types.h in the SYNOPSISHiten Pandya2003-10-096-6/+0
| | | | | | | | | | | | header. Sys/param.h includes sys/types.h internally unless LOCORE is defined. Approved by: des (mentor) Notes: svn path=/head/; revision=120934
* Add XXX'ed temporary bounce-buffering.Poul-Henning Kamp2003-10-071-6/+37
| | | | Notes: svn path=/head/; revision=120874
* style.Makefile(5)David E. O'Brien2003-08-181-1/+1
| | | | Notes: svn path=/head/; revision=119071
* Stage 3 of dynamic root support. Make all the libraries needed to runGordon Tetlow2003-08-171-0/+1
| | | | | | | | | binaries in /bin and /sbin installed in /lib. Only the versioned files reside in /lib, the .so symlink continues to live /usr/lib so the toolchain doesn't need to be modified. Notes: svn path=/head/; revision=119017
* Correct an apparent typo.Matthew N. Dodd2003-06-191-1/+1
| | | | | | | | | PR: bin/53515 Submitted by: Lukas Ertl <l.ertl@univie.ac.at> Approved by: jmallett Notes: svn path=/head/; revision=116591
* Various cleanups of careless mistakes/omissions.Juli Mallett2003-06-104-11/+11
| | | | | | | | PR: 53149 Submitted by: Lukas Ertl <l.ertl@univie.ac.at> Notes: svn path=/head/; revision=116165
* Left out the critical part of my "public domain" template, a notice sayingJuli Mallett2003-06-106-0/+12
| | | | | | | | | that this file is (these files are) in the public domain. PR: 53149 Notes: svn path=/head/; revision=116163
* Commit rudimentary libufs manual pages, except for that forJuli Mallett2003-06-097-0/+560
| | | | | | | | | | | | | | getino(3)/putino(3), inode.c has been reworked in Perforce to the point where a manual page may not be accurate. Certainly putino(3) has not even been merged back yet. These will need a lot of improvement for most applications, but they document the API enough to get someone on their feet, most likely. The best documentation still exists in the form of libufs(3) consumers in the base system. Notes: svn path=/head/; revision=116087
* Remove ufs_disk_ctor and ufs_disk_dtor, they never came to fruition. I doJuli Mallett2003-06-092-43/+0
| | | | | | | | not know of any software using them, and there is no "published API" for libufs, as it were. Notes: svn path=/head/; revision=116086
* Reduce diffs with code in Perforce:Juli Mallett2003-06-095-34/+34
| | | | | | | Parenthesise return values. Notes: svn path=/head/; revision=116084
* MFp4: Fix copy&paste English error.Juli Mallett2003-03-301-1/+1
| | | | Notes: svn path=/head/; revision=112850
* Close the disk file descriptor that is RO before trying to open theJuli Mallett2003-03-281-4/+1
| | | | | | | | | | | | new one, and do not fall back to the RO fd. There was a bug here in that the RO fd was never closed, if the RDRW open succeeded, but this code is bogus anyway, and it breaks newfs of floppies, at least for me, due to "Device busy." Anything that wants to fall back is doing something significantly odd that it should have some more complex code on its end. Notes: svn path=/head/; revision=112730
* Clean up error reporting in block.c, so that it gives honest error stringsJuli Mallett2003-02-192-13/+22
| | | | | | | | | | | | | | | | | | | | | | | for the sorts of errors we run into[1]. This also gives us room to put in a vaguely appropriate casts to silence warnings since our compiler doesn't like when we compare ssize_t to size_t[2]. Add a cast in sblock.c[3] to silence a warning because of signed vs. size_t hell (again). Clean up nearby excessive parenthemutilation[4]. Reviewed by: bde [2] [3] Suggested by: bde, many [1] Submitted by: bde [4] An aside about [4], bde notes that we do not check for a negative value for the fs bsize. I'm nto going to do that in every situation we use it, one must expect a reasonable program to pass down reasonable values. Some foot shooting protection I will tolerate, some I will not. Also he suggests some possible conditional improvements there, which I may take to heart. PS: For me at least, this is now WARNS=5 clean... Notes: svn path=/head/; revision=111111
* WARNS ?= 2, so idiocy like 1.12 of type.c doesn't have to happen again.Juli Mallett2003-01-301-0/+1
| | | | Notes: svn path=/head/; revision=110068
* Missing "return 0"Juli Mallett2003-01-301-0/+1
| | | | | | | | Big pointy hat to: jmallett Spotted by: peter Notes: svn path=/head/; revision=110067
* API for opening (and tracking) writable file descriptors per disk.Juli Mallett2003-01-293-8/+30
| | | | Notes: svn path=/head/; revision=110066
* If we don't know where the sblock is (e.g. filling out a blank disk), thenJuli Mallett2003-01-271-0/+4
| | | | | | | | | | get it from the fs structure. Really libufs should have interfaces to generate both what we export, and what we import, based on eachother, and this should be full of redundant code to make sure everything is right... But really, we don't even deal with checksums, so plenty of room to improve. Notes: svn path=/head/; revision=109913
* bwrite, not sbwrite, needs to open for writing and write.Juli Mallett2003-01-232-10/+14
| | | | Notes: svn path=/head/; revision=109766
* API to fillout a blank disk. For e.g. newfs.Juli Mallett2003-01-232-5/+13
| | | | Notes: svn path=/head/; revision=109755
* Store not only the current cylinder group in the series (i.e. next that needsJuli Mallett2003-01-193-0/+3
| | | | | | | | to be read in) but also the last cylinder group in the series (i.e. what is stored in the structure). Notes: svn path=/head/; revision=109518
* Don't crash when utilities are dumb and try to read less than the disk blockJuli Mallett2003-01-191-1/+1
| | | | | | | | size (dumpfs may try to read the cylinder size (or is is sector size?) by way of bread). Prevents a bounds error. Notes: svn path=/head/; revision=109511
* Add facility to read one, or a string of, cylinger groups.Juli Mallett2003-01-194-1/+87
| | | | Notes: svn path=/head/; revision=109509
* Hunt for a disk to operate on, if we're passed a partition mountpoint, etc.Juli Mallett2003-01-192-2/+41
| | | | | | | Concept reviewed by: phk Notes: svn path=/head/; revision=109506
* Fix typo.Juli Mallett2003-01-181-1/+1
| | | | Notes: svn path=/head/; revision=109464
* Nuke dumb error reporting code, people can just use disk::d_error. Unify theJuli Mallett2003-01-187-104/+45
| | | | | | | | DEBUG and d_error initialisation into an ERROR macro, which can both trace and set the d_error field. Much a more meaningful thing, I should say. Notes: svn path=/head/; revision=109462
* Create a new 32-bit fs_flags word in the superblock. Add code to moveKirk McKusick2002-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | the old 8-bit fs_old_flags to the new location the first time that the filesystem is mounted by a new kernel. One of the unused flags in fs_old_flags is used to indicate that the flags have been moved. Leave the fs_old_flags word intact so that it will work properly if used on an old kernel. Change the fs_sblockloc superblock location field to be in units of bytes instead of in units of filesystem fragments. The old units did not work properly when the fragment size exceeeded the superblock size (8192). Update old fs_sblockloc values at the same time that the flags are moved. Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk> Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=107294
* Use an error message closer to old dumpfs(8) in the case of truncated/noJuli Mallett2002-10-221-1/+1
| | | | | | | | | | | | superblock. Submitted by: kkenn Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't make much sense in a library, to me. Notes: svn path=/head/; revision=105740
* Add the concept of a per-disk error string, and a function which prints itJuli Mallett2002-10-226-1/+78
| | | | | | | along with the errno, if one is set. Notes: svn path=/head/; revision=105737
* Wrap the header to prevent multiple inclusion, and mark the DECLS section.Juli Mallett2002-08-221-0/+9
| | | | | | | Reminded by: Rachel Hestilow <hestilow@ximian.com> Notes: svn path=/head/; revision=102296