*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> ufs_disk_fillout (3)              
Title
Content
Arch
Section
 

UFS_DISK_CLOSE(3)

Contents


NAME    [Toc]    [Back]

     ufs_disk_close, ufs_disk_fillout, ufs_disk_fillout_blank, ufs_disk_write
     -- open and close userland UFS disks

LIBRARY    [Toc]    [Back]

     UFS File System Access Library (libufs, -lufs)

SYNOPSIS    [Toc]    [Back]

     #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>

     int
     ufs_disk_close(struct uufsd *disk);

     int
     ufs_disk_fillout(struct uufsd *disk, const char *name);

     int
     ufs_disk_fillout_blank(struct uufsd *disk, const char *name);

     int
     ufs_disk_write(struct uufsd *disk);

DESCRIPTION    [Toc]    [Back]

     The ufs_disk_close() function closes a disk and frees internal memory
     related to it.  It does not free the disk structure.

     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,
     or a device name.	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.

ERRORS    [Toc]    [Back]

     The function ufs_disk_close() has no failure points.

     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(3) and stat(3).  Namely,
     it will fail if the disk in question may not be written to.

SEE ALSO    [Toc]    [Back]

      
      
     getfsfile(3), libufs(3), open(3), sbread(3)

HISTORY    [Toc]    [Back]

     These functions first appeared as part of libufs(3) in FreeBSD 5.0.

AUTHORS    [Toc]    [Back]

     Juli Mallett <[email protected]>


FreeBSD 5.2.1			 June 04, 2003			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
close IRIX Close an open file
mdClosePort IRIX open and close MDports
fcloseall Linux close all open streams
VOP_OPENCLOSE FreeBSD open or close a file
VOP_CLOSE FreeBSD open or close a file
VOP_OPEN FreeBSD open or close a file
catopen IRIX open/close a message catalogue
p2open IRIX open, close pipes to and from a command
vlopenvideo IRIX open or close a connection to the VL server
catopen Linux open/close a message catalog
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service