xref: /haiku/src/system/libroot/posix/stdio/remove.c (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
1 /*
2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the Haiku License.
4 */
5 
6 
7 #include <stdio.h>
8 #include <syscalls.h>
9 #include <errno.h>
10 
11 
12 int
13 remove(const char *path)
14 {
15 	int status = _kern_unlink(-1, path);
16 	if (status < B_OK) {
17 		errno = status;
18 		return -1;
19 	}
20 
21 	return status;
22 }
23 
24