From 952d5d30d6af8220334f508bf67852e1fc1c7ab5 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 16 Jun 2022 08:07:52 -0600 Subject: bsd-user: Implement undelete Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bsd-user/bsd-file.h') diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index 065f576dfe..108a506185 100644 --- a/bsd-user/bsd-file.h +++ b/bsd-user/bsd-file.h @@ -926,4 +926,17 @@ static abi_long do_bsd_fpathconf(abi_long arg1, abi_long arg2) return get_errno(fpathconf(arg1, arg2)); } +/* undelete(2) */ +static abi_long do_bsd_undelete(abi_long arg1) +{ + abi_long ret; + void *p; + + LOCK_PATH(p, arg1); + ret = get_errno(undelete(p)); /* XXX path(p)? */ + UNLOCK_PATH(p, arg1); + + return ret; +} + #endif /* BSD_FILE_H */ -- cgit 1.4.1