298107 |
16-Apr-2016 |
gjb |
Merge the projects/release-pkg branch to head.
This allows packaging the base system with pkg(8), including but not limited to providing the ability to provide upstream binary update possibilities for non-tier-1 architectures.
This merge is a requirement of the 11.0-RELEASE, and as such, thank you to everyone that has tested the project branch.
Documentation in build(7) etc. is still somewhat sparse, but updates to those parts will follow.
Sponsored by: The FreeBSD Foundation
|
218601 |
12-Feb-2011 |
kib |
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
|
167625 |
16-Mar-2007 |
pjd |
The ufs_disk_fillout(3) can take special device name (with or without /dev/ 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
|
116087 |
09-Jun-2003 |
jmallett |
Commit rudimentary libufs manual pages, except for that for 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.
|
112730 |
28-Mar-2003 |
jmallett |
Close the disk file descriptor that is RO before trying to open the 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.
|
111111 |
19-Feb-2003 |
jmallett |
Clean up error reporting in block.c, so that it gives honest error strings 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...
|
109913 |
27-Jan-2003 |
jmallett |
If we don't know where the sblock is (e.g. filling out a blank disk), then 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.
|
109462 |
18-Jan-2003 |
jmallett |
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.
|
105740 |
22-Oct-2002 |
jmallett |
Use an error message closer to old dumpfs(8) in the case of truncated/no 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.
|
99193 |
01-Jul-2002 |
jmallett |
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.
|