mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
parent
132906c925
commit
5d62429164
@ -721,6 +721,9 @@ extern "C" int stat(const char *path, struct stat *buf)
|
|||||||
|
|
||||||
extern "C" int symlink(const char *oldpath, const char *newpath)
|
extern "C" int symlink(const char *oldpath, const char *newpath)
|
||||||
{
|
{
|
||||||
|
if (!oldpath || !newpath)
|
||||||
|
return Errno(EFAULT);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Absolute_path resolved_path;
|
Absolute_path resolved_path;
|
||||||
resolve_symlinks_except_last_element(newpath, resolved_path);
|
resolve_symlinks_except_last_element(newpath, resolved_path);
|
||||||
@ -733,6 +736,9 @@ extern "C" int symlink(const char *oldpath, const char *newpath)
|
|||||||
|
|
||||||
extern "C" int unlink(const char *path)
|
extern "C" int unlink(const char *path)
|
||||||
{
|
{
|
||||||
|
if (!path)
|
||||||
|
return Errno(EFAULT);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Absolute_path resolved_path;
|
Absolute_path resolved_path;
|
||||||
resolve_symlinks_except_last_element(path, resolved_path);
|
resolve_symlinks_except_last_element(path, resolved_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user