diff options
Diffstat (limited to 'src/udev/udev-builtin.c')
-rw-r--r-- | src/udev/udev-builtin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index 18fc3df274..26ee16c669 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -127,7 +127,8 @@ int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const c int argc; char *argv[128]; - optind = 1; + /* we need '0' here to reset the internal state */ + optind = 0; util_strscpy(arg, sizeof(arg), command); udev_build_argv(udev_device_get_udev(dev), arg, &argc, argv); return builtins[cmd]->cmd(dev, argc, argv, test); |