int
fhandler_disk_file::rmdir ()
{
- extern NTSTATUS unlink_nt (path_conv &pc);
+ extern NTSTATUS unlink_nt (path_conv &pc, bool sharable);
if (!pc.isdir ())
{
return -1;
}
- NTSTATUS status = unlink_nt (pc);
+ NTSTATUS status = unlink_nt (pc, false);
if (!NT_SUCCESS (status))
{
/* Allow concurrent processes to use the same dll or exe
* via their hardlink while we delete our hardlink. */
-extern NTSTATUS unlink_nt_shareable (path_conv &pc);
+extern NTSTATUS unlink_nt (path_conv &pc, bool sharable);
#define MUTEXSEP L"@"
#define PATHSEP L"\\"
RtlInitUnicodeString (&fn, ntmaxpathbuf);
path_conv pc (&fn);
- unlink_nt_shareable (pc); /* move to bin */
+ unlink_nt (pc, true); /* move to bin */
}
if (!pfdi->NextEntryOffset)
return status;
}
-static NTSTATUS
-_unlink_nt (path_conv &pc, bool shareable)
+NTSTATUS
+unlink_nt (path_conv &pc, bool shareable)
{
NTSTATUS status;
HANDLE fh, fh_ro = NULL;
return status;
}
-NTSTATUS
-unlink_nt (path_conv &pc)
-{
- return _unlink_nt (pc, false);
-}
-
-NTSTATUS
-unlink_nt_shareable (path_conv &pc)
-{
- return _unlink_nt (pc, true);
-}
-
extern "C" int
unlink (const char *ourname)
{
goto done;
}
- status = unlink_nt (win32_name);
+ status = unlink_nt (win32_name, false);
if (NT_SUCCESS (status))
res = 0;
else
unlink_nt returns with STATUS_DIRECTORY_NOT_EMPTY. */
if (dstpc->isdir ())
{
- status = unlink_nt (*dstpc);
+ status = unlink_nt (*dstpc, false);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
? FILE_OPEN_REPARSE_POINT : 0));
if (NT_SUCCESS (status))
{
- status = unlink_nt (*dstpc);
+ status = unlink_nt (*dstpc, false);
if (NT_SUCCESS (status))
break;
}
if (NT_SUCCESS (status))
{
if (removepc)
- unlink_nt (*removepc);
+ unlink_nt (*removepc, false);
res = 0;
}
else