summaryrefslogtreecommitdiffstats
path: root/lib/libufs
Commit message (Collapse)AuthorAgeFilesLines
* Replace ERROR() macro with inline function. In-tree gcc cannot toleratekib2011-02-121-28/+24
| | | | | | | | | | the construct like printf("%\s", NULL) resulting from macroexpand of ERROR(u, NULL), making it impossible to use LIBUFS_DEBUGGING. With inline function, compiler cannot detect the NULL argument to known function and does not try to convert it into puts(). In collaboration with: pho
* Search beyond the first 1/8th of inodes.emaste2010-05-011-1/+1
| | | | Submitted by: jeff
* - Merge soft-updates journaling from projects/suj/head into head. Thisjeff2010-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
* i doesn't need to be signed here, make it unsigned.imp2010-02-111-1/+1
|
* Back to WARNS=3. The breakage wasn't what I thought it was :(imp2010-02-111-1/+1
|
* Keep Tinderbox happy.mckusick2010-02-111-1/+1
|
* Increased warnings weren't tested on ARM. Bump warnings back down toimp2010-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.
* Build lib/ with WARNS=6 by default.ed2010-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.
* Allow libufs(3) functions to operate on a regular file. This makes it ↵jmallett2009-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
* Bail out when memory allocation is failed, rather than referencingdelphij2009-04-021-2/+6
| | | | | | | a NULL pointer. PR: kern/94480 Submitted by: Michiel Pelt <m.pelt xs4all nl>
* Add a berase() function which uses ioctl(DIOCGDELETE) to erase a slabphk2007-12-164-8/+42
| | | | of the disk.
* The ufs_disk_fillout(3) can take special device name (with or without /dev/pjd2007-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
* Implement cgwrite1(3) function which stored a given cylinder group on disk.pjd2006-10-315-2/+38
| | | | Sponsored by: home.pl
* minor style.Makefile(5) fixes:keramida2005-09-261-2/+7
| | | | | | | - WARNS before CFLAGS - CFLAGS -DXXX before -IXXX Approved by: ru
* Remove getino(3) manpage. It doesn't document what is here, what is here shouldjmallett2005-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
* Disconnect getino.3 and remove MLINK I added.trhodes2005-08-311-2/+1
| | | | Discussed with: jmallett
* Hook getino.3 up to the build and link it to putino.3.trhodes2005-08-251-1/+2
| | | | PR: 83820
* Fixed xrefs.ru2005-01-211-3/+3
|
* Markup fixes.ru2004-07-055-31/+31
|
* Sort SEE ALSO references (in dictionary order, ignoring case).ru2004-07-041-1/+1
|
* Removed trailing whitespace.ru2004-07-021-1/+1
|
* Fixed spelling of the document date.ru2004-07-026-6/+6
|
* Remove unneccessary include of sys/types.h in the SYNOPSIShmp2003-10-096-6/+0
| | | | | | | | | header. Sys/param.h includes sys/types.h internally unless LOCORE is defined. Approved by: des (mentor)
* Add XXX'ed temporary bounce-buffering.phk2003-10-071-6/+37
|
* style.Makefile(5)obrien2003-08-181-1/+1
|
* Stage 3 of dynamic root support. Make all the libraries needed to rungordon2003-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.
* Correct an apparent typo.mdodd2003-06-191-1/+1
| | | | | | PR: bin/53515 Submitted by: Lukas Ertl <l.ertl@univie.ac.at> Approved by: jmallett
* Various cleanups of careless mistakes/omissions.jmallett2003-06-104-11/+11
| | | | | PR: 53149 Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
* Left out the critical part of my "public domain" template, a notice sayingjmallett2003-06-106-0/+12
| | | | | | that this file is (these files are) in the public domain. PR: 53149
* Commit rudimentary libufs manual pages, except for that forjmallett2003-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.
* Remove ufs_disk_ctor and ufs_disk_dtor, they never came to fruition. I dojmallett2003-06-092-43/+0
| | | | | not know of any software using them, and there is no "published API" for libufs, as it were.
* Reduce diffs with code in Perforce:jmallett2003-06-095-34/+34
| | | | Parenthesise return values.
* MFp4: Fix copy&paste English error.jmallett2003-03-301-1/+1
|
* Close the disk file descriptor that is RO before trying to open thejmallett2003-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.
* Clean up error reporting in block.c, so that it gives honest error stringsjmallett2003-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...
* WARNS ?= 2, so idiocy like 1.12 of type.c doesn't have to happen again.jmallett2003-01-301-0/+1
|
* Missing "return 0"jmallett2003-01-301-0/+1
| | | | | Big pointy hat to: jmallett Spotted by: peter
* API for opening (and tracking) writable file descriptors per disk.jmallett2003-01-293-8/+30
|
* If we don't know where the sblock is (e.g. filling out a blank disk), thenjmallett2003-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.
* bwrite, not sbwrite, needs to open for writing and write.jmallett2003-01-232-10/+14
|
* API to fillout a blank disk. For e.g. newfs.jmallett2003-01-232-5/+13
|
* Store not only the current cylinder group in the series (i.e. next that needsjmallett2003-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).
* Don't crash when utilities are dumb and try to read less than the disk blockjmallett2003-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.
* Add facility to read one, or a string of, cylinger groups.jmallett2003-01-194-1/+87
|
* Hunt for a disk to operate on, if we're passed a partition mountpoint, etc.jmallett2003-01-192-2/+41
| | | | Concept reviewed by: phk
* Fix typo.jmallett2003-01-181-1/+1
|
* Nuke dumb error reporting code, people can just use disk::d_error. Unify thejmallett2003-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.
* Create a new 32-bit fs_flags word in the superblock. Add code to movemckusick2002-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.
* Use an error message closer to old dumpfs(8) in the case of truncated/nojmallett2002-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.
* Add the concept of a per-disk error string, and a function which prints itjmallett2002-10-226-1/+78
| | | | along with the errno, if one is set.
OpenPOWER on IntegriCloud