xref: /csrg-svn/lib/libc/sys/undelete.2 (revision 67740)
167536Spendry.\" Copyright (c) 1994
267536Spendry.\"	Jan-Simon Pendry
367536Spendry.\"	The Regents of the University of California.  All rights reserved.
467536Spendry.\"
567536Spendry.\" %sccs.include.redist.man%
667536Spendry.\"
7*67740Spendry.\"     @(#)undelete.2	8.3 (Berkeley) 08/23/94
867536Spendry.\"
967536Spendry.Dd
1067536Spendry.Dt UNWHITEOUT 2
1167536Spendry.Os BSD 4
1267536Spendry.Sh NAME
1367536Spendry.Nm unwhiteout
1467536Spendry.Nd remove whiteout entry
1567536Spendry.Sh SYNOPSIS
1667536Spendry.Fd #include <unistd.h>
1767536Spendry.Ft int
1867536Spendry.Fn unwhiteout "const char *path"
1967536Spendry.Sh DESCRIPTION
2067536SpendryThe
2167536Spendry.Fn unwhiteout
2267536Spendryfunction
2367536Spendryremoves the whiteout named by
2467536Spendry.Fa path
2567536Spendryfrom its directory.
2667536SpendryAny objects in a lower layer of the
2767536Spendryunion stack will become visible once more.
2867536Spendry.Sh RETURN VALUES
2967536SpendryUpon successful completion, a value of 0 is returned.
3067536SpendryOtherwise, a value of -1 is returned and
3167536Spendry.Va errno
3267536Spendryis set to indicate the error.
3367536Spendry.Sh ERRORS
3467536SpendryThe
3567536Spendry.Fn unwhiteout
3667536Spendrysucceeds unless:
3767536Spendry.Bl -tag -width ENAMETOOLONGAA
3867536Spendry.It Bq Er ENOTDIR
3967536SpendryA component of the path prefix is not a directory.
4067536Spendry.It Bq Er EINVAL
4167536SpendryThe pathname contains a character with the high-order bit set.
4267536Spendry.It Bq Er ENAMETOOLONG
4367536SpendryA component of a pathname exceeded 255 characters,
4467536Spendryor an entire path name exceeded 1023 characters.
45*67740Spendry.It Bq Er EEXIST
4667536SpendryThe path does not reference a whiteout.
4767536Spendry.It Bq Er ENOENT
4867536SpendryThe whiteout does not exist.
4967536Spendry.It Bq Er EACCES
5067536SpendrySearch permission is denied for a component of the path prefix.
5167536Spendry.It Bq Er EACCES
5267536SpendryWrite permission is denied on the directory containing the link
5367536Spendryto be removed.
5467536Spendry.It Bq Er ELOOP
5567536SpendryToo many symbolic links were encountered in translating the pathname.
5667536Spendry.It Bq Er EPERM
5767536SpendryThe directory containing the file is marked sticky,
5867536Spendryand the containing directory is not owned by the effective user ID.
5967536Spendry.It Bq Er EIO
6067536SpendryAn I/O error occurred while deleting the directory entry.
6167536Spendry.It Bq Er EROFS
6267536SpendryThe whiteout resides on a read-only file system.
6367536Spendry.It Bq Er EFAULT
6467536Spendry.Fa Path
6567536Spendrypoints outside the process's allocated address space.
6667536Spendry.El
6767536Spendry.Sh SEE ALSO
6867536Spendry.Xr unlink 2 ,
6967536Spendry.Xr mount_union 8
7067536Spendry.Sh HISTORY
7167536SpendryAn
7267536Spendry.Nm
7367536Spendryfunction call first appeared in 4.4BSD-Lite.
74