mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
vol: use OS_UNLINK() instead of unlink()
OS_UNLINK provides the platform specific mechanism for unlinking objects. Change-Id: Id0a1f50e57fe3c21c46e137e86507bf28bafa046 Reviewed-on: http://gerrit.openafs.org/3670 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
a65ea91e2a
commit
038264b4d6
@ -1153,7 +1153,7 @@ namei_replace_file_by_hardlink(IHandle_t *hLink, IHandle_t *hTarget)
|
||||
namei_HandleToName(&nameLink, hLink);
|
||||
namei_HandleToName(&nameTarget, hTarget);
|
||||
|
||||
unlink(nameLink.n_path);
|
||||
OS_UNLINK(nameLink.n_path);
|
||||
code = link(nameTarget.n_path, nameLink.n_path);
|
||||
return code;
|
||||
}
|
||||
@ -1188,7 +1188,7 @@ namei_copy_on_write(IHandle_t *h)
|
||||
buf = malloc(8192);
|
||||
if (!buf) {
|
||||
close(fd);
|
||||
unlink(path);
|
||||
OS_UNLINK(path);
|
||||
FDH_CLOSE(fdP);
|
||||
return ENOMEM;
|
||||
}
|
||||
@ -1209,7 +1209,7 @@ namei_copy_on_write(IHandle_t *h)
|
||||
if (size)
|
||||
code = EIO;
|
||||
else {
|
||||
unlink(name.n_path);
|
||||
OS_UNLINK(name.n_path);
|
||||
code = rename(path, name.n_path);
|
||||
}
|
||||
}
|
||||
@ -2954,7 +2954,7 @@ namei_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
|
||||
MoveFileEx(n.n_path, newpath, MOVEFILE_WRITE_THROUGH);
|
||||
#else
|
||||
link(newpath, n.n_path);
|
||||
unlink(newpath);
|
||||
OS_UNLINK(newpath);
|
||||
#endif
|
||||
|
||||
t_ih.ih_ino = namei_MakeSpecIno(ih->ih_vid, VI_LARGEINDEX);
|
||||
@ -2973,7 +2973,7 @@ namei_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
|
||||
MoveFileEx(n.n_path, newpath, MOVEFILE_WRITE_THROUGH);
|
||||
#else
|
||||
link(newpath, n.n_path);
|
||||
unlink(newpath);
|
||||
OS_UNLINK(newpath);
|
||||
#endif
|
||||
|
||||
OS_UNLINK(oldpath);
|
||||
|
Loading…
Reference in New Issue
Block a user