summaryrefslogtreecommitdiff
path: root/udevadm.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevadm.c')
-rw-r--r--udevadm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/udevadm.c b/udevadm.c
index 24e4d991be..e2b7779a91 100644
--- a/udevadm.c
+++ b/udevadm.c
@@ -65,7 +65,7 @@ static int help(int argc, char *argv[], char *envp[])
{
const struct command *cmd;
- printf("Usage: udev COMMAND [OPTIONS]\n");
+ printf("Usage: udevadm COMMAND [OPTIONS]\n");
for (cmd = cmds; cmd->name != NULL; cmd++)
printf(" %-12s %s\n", cmd->name, cmd->help);
printf("\n");
@@ -145,9 +145,13 @@ int main(int argc, char *argv[], char *envp[])
argc--;
}
- if (command == NULL || command[0] == '\0')
+ if (command == NULL)
goto err_unknown;
+ /* allow command to be specified as an option */
+ if (strncmp(command, "--", 2) == 0)
+ command += 2;
+
/* find and execute command */
for (cmd = cmds; cmd->name != NULL; cmd++) {
if (strcmp(cmd->name, command) == 0) {