[systemd-devel] [RFC][PATCH] udev: add network link configuration tool

Tom Gundersen teg at jklm.no
Mon Oct 28 19:06:55 CET 2013


On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering
<lennart at poettering.net> wrote:
>> +        ctx->link_dirs_ts_usec = calloc(strv_length(ctx->link_dirs),
>> sizeof(usec_t));

[...]

> Isn't it sufficient to merge these timestamps into a single one that is
> the newest of all timestamps you find? After all you need to reload
> *all* dirs anyway if one of them changes, to get the overriding logic
> right? Or am I missing something?
>
> (I mean, I am not particularly fond of having multiple arrays that have
> the same keys and life-times that simply contain different fields of the
> same object. To me, it usually appears nicer to have a single array of
> structs instead. That said, if you just collapse all timestamps into one
> you neatly avoid the complexity for that... ;-)

Using only one timestamp makes sense, I'll fix that up. I wanted to
share code with the udev rules handling, but I see no reason to not
just change that too. Or am I missing something Kay?

> Otherwise looks fine!

Thanks for the comments, will fix them all.

Cheers,

Tom


More information about the systemd-devel mailing list