hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit e4eb4d1bea49eb3b450477aed72ab474b882ae0a
parent 97e431ac01afd42dfa052a05c4687f8c553aaf1c
Author: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
Date:   Wed, 26 Jun 2024 12:20:10 +0200

syscalls: add removexattr

Diffstat:
Mrt/+linux/syscalls.ha | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -1076,3 +1076,12 @@ export fn getxattr(path: path, name: str, value: []u8) (u64 | errno) = { len(value): u64, )); }; + +// Removes an extended file attribute. +export fn removexattr(path: path, name: str) (void | errno) = { + let path = kpath(path)?; + static let namebuf: [PATH_MAX]u8 = [0...]; + let name = copy_kpath(name, namebuf)?; + + wrap_return(syscall2(SYS_removexattr, path: uintptr, name: uintptr))?; +};