Exemplo n.º 1
0
static void usage(bool full)
{
	const struct cmd *section, *cmd;

	printf("Usage:\t%s [options] command\n", argv0);
	usage_options();
	printf("\t--version\tshow version (%s)\n", iw_version);
	printf("Commands:\n");
	for_each_cmd(section) {
		if (section->parent)
			continue;

		if (section->handler && !section->hidden)
			__usage_cmd(section, "\t", full);

		for_each_cmd(cmd) {
			if (section != cmd->parent)
				continue;
			if (!cmd->handler || cmd->hidden)
				continue;
			__usage_cmd(cmd, "\t", full);
		}
	}
	printf("\nYou can omit the 'phy' or 'dev' if "
			"the identification is unique,\n"
			"e.g. \"iw wlan0 info\" or \"iw phy0 info\". "
			"(Don't when scripting.)\n\n"
			"Do NOT screenscrape this tool, we don't "
			"consider its output stable.\n\n");
}
Exemplo n.º 2
0
static void usage(FILE* out)
{
	usage_lead_reset();
	usage_help(out);
	usage_led(out, NULL);
	putchar('\n');
	printf("om-led provides the same functionality as \"om led\" but as a separate executable\n"
	       "so that it can be made suid-root. No proper security audit has been done so\n"
	       "you should only do this at your own risk.\n\n");
	usage_options(out);
}
Exemplo n.º 3
0
static void usage(int argc, char **argv)
{
	const struct cmd *section, *cmd;
	bool full = argc >= 0;
	const char *sect_filt = NULL;
	const char *cmd_filt = NULL;

	if (argc > 0)
		sect_filt = argv[0];

	if (argc > 1)
		cmd_filt = argv[1];

	printf("Usage:\t%s [options] command\n", argv0);
	usage_options();
#if ofnouse
	printf("\t--version\tshow version (%s)\n", iw_version);
#endif

	printf("Commands:\n");
	for_each_cmd(section) {
		if (section->parent)
			continue;

		if (sect_filt && strcmp(section->name, sect_filt))
			continue;

		if (section->handler && !section->hidden)
			__usage_cmd(section, "\t", full);

		for_each_cmd(cmd) {
			if (section != cmd->parent)
				continue;
			if (!cmd->handler || cmd->hidden)
				continue;
			if (cmd_filt && strcmp(cmd->name, cmd_filt))
				continue;
			__usage_cmd(cmd, "\t", full);
		}
	}
	printf("\nCommands that use the netdev ('dev') can also be given the\n"
	       "'wdev' instead to identify the device.\n");
	printf("\nYou can omit the 'phy' or 'dev' if "
			"the identification is unique,\n"
			"e.g. \"iw wlan0 info\" or \"iw phy0 info\". "
			"(Don't when scripting.)\n\n"
			"Do NOT screenscrape this tool, we don't "
			"consider its output stable.\n\n");
}
Exemplo n.º 4
0
static void usage(bool full)
{
	const struct cmd *section, *cmd;

	printf("Usage:\t%s [options] command\n", argv0);
	usage_options();
	printf("Commands:\n");
	for_each_cmd(section) {
		if (section->parent)
			continue;

		if (section->handler && !section->hidden)
			__usage_cmd(section, "\t", full);

		for_each_cmd(cmd) {
			if (section != cmd->parent)
				continue;
			if (!cmd->handler || cmd->hidden)
				continue;
			__usage_cmd(cmd, "\t", full);
		}
	}
}
Exemplo n.º 5
0
static void usage_cmd(const struct cmd *cmd)
{
	printf("Usage:\t%s [options] ", argv0);
	__usage_cmd(cmd, "", true);
	usage_options();
}
Exemplo n.º 6
0
static void usage()
{
	printf("Usage:\t%s [OPTION]... SDIO ACCESS FILE \n\n", argv0);
	usage_options();
}