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