summaryrefslogtreecommitdiff
path: root/libbb/single_argv.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-11-28 15:18:53 +0100
committerDenys Vlasenko2009-11-28 15:18:53 +0100
commite992bae6f9adf3718c6263a36c004ead1c7272a8 (patch)
treef0bc9e4fa145f58ab3f9838902e09f9cfba29648 /libbb/single_argv.c
parent86cfb70ca5f2bde11f2d071bc59db75291d8552f (diff)
downloadbusybox-e992bae6f9adf3718c6263a36c004ead1c7272a8.zip
busybox-e992bae6f9adf3718c6263a36c004ead1c7272a8.tar.gz
*: remove a few more cases of argc usage. -89 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/single_argv.c')
-rw-r--r--libbb/single_argv.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libbb/single_argv.c b/libbb/single_argv.c
new file mode 100644
index 0000000..6173c88
--- /dev/null
+++ b/libbb/single_argv.c
@@ -0,0 +1,16 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Utility routines.
+ *
+ * Copyright (C) 2009 Denys Vlasenko
+ *
+ * Licensed under GPLv2, see file LICENSE in this tarball for details.
+ */
+#include "libbb.h"
+
+char* FAST_FUNC single_argv(char **argv)
+{
+ if (!argv[1] || argv[2])
+ bb_show_usage();
+ return argv[1];
+}