busybox: update to 1.23.2
[tomato.git] / release / src / router / busybox / coreutils / unlink.c
blob3b7d0fb2bada0f5cec17bc595a91882d296447f2
1 /* vi: set sw=4 ts=4: */
2 /* unlink for busybox
4 * Copyright (C) 2014 Isaac Dunham <ibid.ag@gmail.com>
6 * Licensed under GPLv2, see LICENSE in this source tree
7 */
9 //config:config UNLINK
10 //config: bool "unlink"
11 //config: default y
12 //config: help
13 //config: unlink deletes a file by calling unlink()
15 //kbuild:lib-$(CONFIG_UNLINK) += unlink.o
17 //applet:IF_UNLINK(APPLET(unlink, BB_DIR_USR_BIN, BB_SUID_DROP))
19 //usage:#define unlink_trivial_usage
20 //usage: "FILE"
21 //usage:#define unlink_full_usage "\n\n"
22 //usage: "Delete FILE by calling unlink()"
24 #include "libbb.h"
26 int unlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
27 int unlink_main(int argc UNUSED_PARAM, char **argv)
29 opt_complementary = "=1"; /* must have exactly 1 param */
30 getopt32(argv, "");
31 argv += optind;
32 xunlink(argv[0]);
33 return 0;