Commit Graph

15 Commits

Author SHA1 Message Date
kib
abc49a2c3b Replace ERROR() macro with inline function. In-tree gcc cannot tolerate
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
2011-02-12 12:46:00 +00:00
jeff
a574495410 - Merge soft-updates journaling from projects/suj/head into head. This
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
2010-04-24 07:05:35 +00:00
phk
f9bd6ffc2d Add a berase() function which uses ioctl(DIOCGDELETE) to erase a slab
of the disk.
2007-12-16 18:02:37 +00:00
pjd
51fb042070 Implement cgwrite1(3) function which stored a given cylinder group on disk.
Sponsored by:	home.pl
2006-10-31 21:21:48 +00:00
jmallett
088f7e9d08 Remove ufs_disk_ctor and ufs_disk_dtor, they never came to fruition. I do
not know of any software using them, and there is no "published API" for
libufs, as it were.
2003-06-09 09:47:38 +00:00
jmallett
994054cea6 API for opening (and tracking) writable file descriptors per disk. 2003-01-29 23:19:46 +00:00
jmallett
070819018f API to fillout a blank disk. For e.g. newfs. 2003-01-23 21:32:56 +00:00
jmallett
ade073ea23 Store not only the current cylinder group in the series (i.e. next that needs
to be read in) but also the last cylinder group in the series (i.e. what is
stored in the structure).
2003-01-19 05:46:23 +00:00
jmallett
445adec218 Add facility to read one, or a string of, cylinger groups. 2003-01-19 01:31:26 +00:00
jmallett
0a0a65bb42 Hunt for a disk to operate on, if we're passed a partition mountpoint, etc.
Concept reviewed by:	phk
2003-01-19 00:43:17 +00:00
jmallett
291746d562 Fix typo. 2003-01-18 05:06:07 +00:00
jmallett
7284e7e47f Nuke dumb error reporting code, people can just use disk::d_error. Unify the
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.
2003-01-18 04:22:14 +00:00
jmallett
df1f55a8e7 Add the concept of a per-disk error string, and a function which prints it
along with the errno, if one is set.
2002-10-22 19:25:58 +00:00
jmallett
47cda62462 Wrap the header to prevent multiple inclusion, and mark the DECLS section.
Reminded by:	Rachel Hestilow <hestilow@ximian.com>
2002-08-22 23:35:35 +00:00
jmallett
e7f13daa73 Add libufs, a library for dealing with UFS filesystems from userland to
the build.  It is here to compartmentalise functionality currently duplicated
in many notable programs in the base system.  It currently handles block
reads and writes, as well as reading and writing of the filesystem superblock,
and the reading/lookup of inode data.  It supports both UFS and UFS2.  I
will be maintaining it, and porting programs to use it, however for now, it
is simply being built as part of world.
2002-07-01 01:45:03 +00:00