xref: /original-bsd/lib/libc/sys/undelete.2 (revision b6592f3d)
1.\" Copyright (c) 1994
2.\"	Jan-Simon Pendry
3.\"	The Regents of the University of California.  All rights reserved.
4.\"
5.\" %sccs.include.redist.man%
6.\"
7.\"     @(#)undelete.2	8.3 (Berkeley) 08/23/94
8.\"
9.Dd
10.Dt UNWHITEOUT 2
11.Os BSD 4
12.Sh NAME
13.Nm unwhiteout
14.Nd remove whiteout entry
15.Sh SYNOPSIS
16.Fd #include <unistd.h>
17.Ft int
18.Fn unwhiteout "const char *path"
19.Sh DESCRIPTION
20The
21.Fn unwhiteout
22function
23removes the whiteout named by
24.Fa path
25from its directory.
26Any objects in a lower layer of the
27union stack will become visible once more.
28.Sh RETURN VALUES
29Upon successful completion, a value of 0 is returned.
30Otherwise, a value of -1 is returned and
31.Va errno
32is set to indicate the error.
33.Sh ERRORS
34The
35.Fn unwhiteout
36succeeds unless:
37.Bl -tag -width ENAMETOOLONGAA
38.It Bq Er ENOTDIR
39A component of the path prefix is not a directory.
40.It Bq Er EINVAL
41The pathname contains a character with the high-order bit set.
42.It Bq Er ENAMETOOLONG
43A component of a pathname exceeded 255 characters,
44or an entire path name exceeded 1023 characters.
45.It Bq Er EEXIST
46The path does not reference a whiteout.
47.It Bq Er ENOENT
48The whiteout does not exist.
49.It Bq Er EACCES
50Search permission is denied for a component of the path prefix.
51.It Bq Er EACCES
52Write permission is denied on the directory containing the link
53to be removed.
54.It Bq Er ELOOP
55Too many symbolic links were encountered in translating the pathname.
56.It Bq Er EPERM
57The directory containing the file is marked sticky,
58and the containing directory is not owned by the effective user ID.
59.It Bq Er EIO
60An I/O error occurred while deleting the directory entry.
61.It Bq Er EROFS
62The whiteout resides on a read-only file system.
63.It Bq Er EFAULT
64.Fa Path
65points outside the process's allocated address space.
66.El
67.Sh SEE ALSO
68.Xr unlink 2 ,
69.Xr mount_union 8
70.Sh HISTORY
71An
72.Nm
73function call first appeared in 4.4BSD-Lite.
74