summaryrefslogtreecommitdiff
path: root/util/sbase/unlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/sbase/unlink.c')
-rw-r--r--util/sbase/unlink.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/util/sbase/unlink.c b/util/sbase/unlink.c
new file mode 100644
index 00000000..c695fa80
--- /dev/null
+++ b/util/sbase/unlink.c
@@ -0,0 +1,27 @@
+/* See LICENSE file for copyright and license details. */
+#include <unistd.h>
+
+#include "util.h"
+
+static void
+usage(void)
+{
+ eprintf("usage: %s file\n", argv0);
+}
+
+int
+main(int argc, char *argv[])
+{
+ ARGBEGIN {
+ default:
+ usage();
+ } ARGEND
+
+ if (argc != 1)
+ usage();
+
+ if (unlink(argv[0]) < 0)
+ eprintf("unlink: '%s':", argv[0]);
+
+ return 0;
+}