blob: 64844ddf8f6dae780b6330404a58134b9232c0ba [file] [log] [blame]
Denys Vlasenkoe992bae2009-11-28 15:18:53 +01001/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 2009 Denys Vlasenko
6 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02007 * Licensed under GPLv2, see file LICENSE in this source tree.
Denys Vlasenkoe992bae2009-11-28 15:18:53 +01008 */
9#include "libbb.h"
10
11char* FAST_FUNC single_argv(char **argv)
12{
Denys Vlasenkoc13ee8c2011-04-11 03:58:30 +020013 if (argv[1] && strcmp(argv[1], "--") == 0)
14 argv++;
Denys Vlasenkoe992bae2009-11-28 15:18:53 +010015 if (!argv[1] || argv[2])
16 bb_show_usage();
17 return argv[1];
18}