[systemd-devel] [PATCH] udev: Fix parsing of udev.event-timeout kernel parameter.

Ronny Chevalier chevalier.ronny at gmail.com
Tue Nov 4 15:36:33 PST 2014


2014-11-05 0:31 GMT+01:00 Richard W.M. Jones <rjones at redhat.com>:
Hi,

> ---
>  src/udev/udevd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/udev/udevd.c b/src/udev/udevd.c
> index 2e6c713..206a4d3 100644
> --- a/src/udev/udevd.c
> +++ b/src/udev/udevd.c
> @@ -994,7 +994,7 @@ static void kernel_cmdline_options(struct udev *udev) {
>                          if (r < 0)
>                                  log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
>                  } else if (startswith(opt, "udev.event-timeout=")) {
> -                        r = safe_atou64(opt + 16, &arg_event_timeout_usec);
> +                        r = safe_atou64(opt + 19, &arg_event_timeout_usec);
>                          if (r < 0) {
>                                  log_warning("Invalid udev.event-timeout ignored: %s", opt + 16);
You need to fix this one too.

Maybe use opt + strlen("udev.event-timeout=") since it is optimized by gcc ?

>                                  break;
> --
> 2.1.0
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list