@need 3200

@node An Errorless Front-end to the VU File-system Interface
@chapter An Errorless Front-end to the VU File-system Interface

These functions perform I/O but never return errors.  If an error
occurs, they print a message and abort the program.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_access}@fuindex safe_access
@*
@example
@group
int safe_access (char * path, int mode);
@end group
@group
@end group
@end example

See @strong{vu_access} in @ref{The VU File-system Interface}.


If mode is F_OK and the file does not exist, return @code{-1}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_chdir}@fuindex safe_chdir
@*
@example
@group
int safe_chdir (char * path);
@end group
@group
@end group
@end example

See @strong{vu_chdir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_chmod}@fuindex safe_chmod
@*
@example
@group
int safe_chmod (char * path, int mode);
@end group
@group
@end group
@end example

See @strong{vu_chmod} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_chown}@fuindex safe_chown
@*
@example
@group
int safe_chown (char * path, int owner, int group);
@end group
@group
@end group
@end example

See @strong{vu_chown} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_chroot}@fuindex safe_chroot
@*
@example
@group
int safe_chroot (char * path);
@end group
@group
@end group
@end example

See @strong{vu_chroot} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_close}@fuindex safe_close
@*
@example
@group
int safe_close (int fd);
@end group
@group
@end group
@end example

See @strong{vu_close} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_closedir}@fuindex safe_closedir
@*
@example
@group
int safe_closedir (DIR * dir);
@end group
@group
@end group
@end example

See @strong{vu_closedir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_fchdir}@fuindex safe_fchdir
@*
@example
@group
int safe_fchdir (int fd);
@end group
@group
@end group
@end example

See @strong{vu_fchdir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_fchmod}@fuindex safe_fchmod
@*
@example
@group
int safe_fchmod (int fd, int mode);
@end group
@group
@end group
@end example

See @strong{vu_fchmod} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_fchown}@fuindex safe_fchown
@*
@example
@group
int safe_fchown (int fd, int owner, int group);
@end group
@group
@end group
@end example

See @strong{vu_fchown} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_fstat}@fuindex safe_fstat
@*
@example
@group
int safe_fstat (int fd, struct stat * buf);
@end group
@group
@end group
@end example

See @strong{vu_fstat} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_fsync}@fuindex safe_fsync
@*
@example
@group
int safe_fsync (int fd);
@end group
@group
@end group
@end example

See @strong{vu_fsync} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_ftruncate}@fuindex safe_ftruncate
@*
@example
@group
int safe_ftruncate (int fd, long where);
@end group
@group
@end group
@end example

See @strong{vu_ftruncate} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_link}@fuindex safe_link
@*
@example
@group
int safe_link (char * from, char * to);
@end group
@group
@end group
@end example

See @strong{vu_link} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_lseek}@fuindex safe_lseek
@*
@example
@group
long safe_lseek (int fd, long offset, int whence);
@end group
@group
@end group
@end example

See @strong{vu_lseek} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_lstat}@fuindex safe_lstat
@*
@example
@group
int safe_lstat (char * path, struct stat * buf);
@end group
@group
@end group
@end example

See @strong{vu_lstat} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_mkdir}@fuindex safe_mkdir
@*
@example
@group
int safe_mkdir (char * path, int mode);
@end group
@group
@end group
@end example

See @strong{vu_mkdir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_open}@fuindex safe_open
@*
@example
@group
int safe_open (char * path, int flags, int mode);
@end group
@group
@end group
@end example

See @strong{vu_open} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_opendir}@fuindex safe_opendir
@*
@example
@group
int safe_opendir (DIR ** retv, char * path);
@end group
@group
@end group
@end example

See @strong{vu_opendir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_read}@fuindex safe_read
@*
@example
@group
long safe_read (int fd, char * buf, long count);
@end group
@group
@end group
@end example

See @strong{vu_read} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_read_retry}@fuindex safe_read_retry
@*
@example
@group
long safe_read_retry (int fd, char * buf, long count);
@end group
@group
@end group
@end example

See @strong{vu_read_retry} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_readdir}@fuindex safe_readdir
@*
@example
@group
int safe_readdir (char ** file_ret, DIR * dir);
@end group
@group
@end group
@end example

See @strong{vu_readdir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_readlink}@fuindex safe_readlink
@*
@example
@group
int safe_readlink (char * path, char * buf, int bufsize);
@end group
@group
@end group
@end example

See @strong{vu_readlink} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_rename}@fuindex safe_rename
@*
@example
@group
int safe_rename (char * from, char * to);
@end group
@group
@end group
@end example

See @strong{vu_rename} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_rmdir}@fuindex safe_rmdir
@*
@example
@group
int safe_rmdir (char * path);
@end group
@group
@end group
@end example

See @strong{vu_rmdir} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_stat}@fuindex safe_stat
@*
@example
@group
int safe_stat (char * path, struct stat * buf);
@end group
@group
@end group
@end example

See @strong{vu_stat} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_symlink}@fuindex safe_symlink
@*
@example
@group
int safe_symlink (char * from, char * to);
@end group
@group
@end group
@end example

See @strong{vu_symlink} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_truncate}@fuindex safe_truncate
@*
@example
@group
int safe_truncate (char * path, long where);
@end group
@group
@end group
@end example

See @strong{vu_truncate} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_unlink}@fuindex safe_unlink
@*
@example
@group
int safe_unlink (char * path);
@end group
@group
@end group
@end example

See @strong{vu_unlink} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_utime}@fuindex safe_utime
@*
@example
@group
int safe_utime (char * path, struct utimbuf * times);
@end group
@group
@end group
@end example

See @strong{vu_utime} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_write}@fuindex safe_write
@*
@example
@group
long safe_write (int fd, char * buf, long count);
@end group
@group
@end group
@end example

See @strong{vu_write} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_write_retry}@fuindex safe_write_retry
@*
@example
@group
long safe_write_retry (int fd, t_uchar * buf, int amt);
@end group
@group
@end group
@end example

See @strong{vu_write_retry} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_fcntl}@fuindex safe_fcntl
@*
@example
@group
int safe_fcntl (int fd, int cmd, long arg);
@end group
@group
@end group
@end example

See @strong{vu_fcntl} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_dup}@fuindex safe_dup
@*
@example
@group
int safe_dup (int fd);
@end group
@group
@end group
@end example

See @strong{vu_dup} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_dup2}@fuindex safe_dup2
@*
@example
@group
int safe_dup2 (int fd, int newfd);
@end group
@group
@end group
@end example

See @strong{vu_dup2} in @ref{The VU File-system Interface}.

@sp 1
@need 1750
@noindent
@b{* Function} @code{safe_move_state}@fuindex safe_move_state
@*
@example
@group
int safe_move_state (int fd, int newfd);
@end group
@group
@end group
@end example

See @strong{vu_move_state} in @ref{Establishing VU Handlers}.




