diff options
-rw-r--r-- | udev/udevadm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/udev/udevadm.c b/udev/udevadm.c index 2de9fbcf22..0927981ab2 100644 --- a/udev/udevadm.c +++ b/udev/udevadm.c @@ -200,7 +200,9 @@ int main(int argc, char *argv[]) if (command != NULL) for (i = 0; cmds[i].cmd != NULL; i++) { if (strcmp(cmds[i].name, command) == 0) { - optind++; + argc -= optind; + argv += optind; + optind = 0; rc = run_command(udev, &cmds[i], argc, argv); goto out; } |