Main index | Section 3 | Options |
#include <sys/param.h>
#include <sys/mount.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <libufs.h>
The ufs_disk_fillout() and ufs_disk_fillout_blank() functions open a disk specified by name and populate the structure pointed to by disk. The disk is opened read-only. The specified name may be either a mountpoint, a device name or a filesystem image. The ufs_disk_fillout() function assumes there is a valid superblock and will fail if not, whereas the ufs_disk_fillout_blank() function makes no assumptions of that sort.
The ufs_disk_write() function attempts to re-open a disk as writable if it is not currently.
The function ufs_disk_fillout() may fail for any of the reasons ufs_disk_fillout_blank() might, as well as for any reason sbread(3) might.
The ufs_disk_fillout_blank() may fail and set errno for any of the errors specified for the library functions open(2), strdup(3). Additionally, it may follow the libufs(3) error methodologies in situations where no device could be found to open.
The function ufs_disk_write() may fail and set errno for any of the errors specified for the library functions open(2) and stat(2). Namely, it will fail if the disk in question may not be written to.
UFS_DISK_CLOSE (3) | June 4, 2003 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If you have an emergency I'm great at running around and flailing my arms | ” |
— Artur Bagyants |