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

2013-10-28 Thread Lennart Poettering
On Mon, 28.10.13 20:30, Tom Gundersen (t...@jklm.no) wrote: > > On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering > wrote: > >> +struct link_config_ctx { > >> +LIST_HEAD(link_config, links); > >> + > >> +char **link_dirs; > >> +usec_t *link_dirs_ts_usec; > >> +}; > > >

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

2013-10-28 Thread Tom Gundersen
On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering wrote: >> +struct link_config_ctx { >> +LIST_HEAD(link_config, links); >> + >> +char **link_dirs; >> +usec_t *link_dirs_ts_usec; >> +}; > > Maybe define a local _cleanup_ macro here? > > _cleanup_(link_configs_freep)? Hm,

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

2013-10-28 Thread Tom Gundersen
On Mon, Oct 28, 2013 at 9:10 PM, Lennart Poettering wrote: > On Mon, 28.10.13 21:07, Tom Gundersen (t...@jklm.no) wrote: > >> >> On Mon, Oct 28, 2013 at 8:33 PM, Lennart Poettering >> wrote: >> > On Mon, 28.10.13 20:30, Tom Gundersen (t...@jklm.no) wrote: >> > >> >> >> >> On Mon, Oct 28, 2013 at

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

2013-10-28 Thread Lennart Poettering
On Mon, 28.10.13 21:07, Tom Gundersen (t...@jklm.no) wrote: > > On Mon, Oct 28, 2013 at 8:33 PM, Lennart Poettering > wrote: > > On Mon, 28.10.13 20:30, Tom Gundersen (t...@jklm.no) wrote: > > > >> > >> On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering > >> wrote: > >> >> +struct link_config_

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

2013-10-28 Thread Tom Gundersen
On Mon, Oct 28, 2013 at 8:33 PM, Lennart Poettering wrote: > On Mon, 28.10.13 20:30, Tom Gundersen (t...@jklm.no) wrote: > >> >> On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering >> wrote: >> >> +struct link_config_ctx { >> >> +LIST_HEAD(link_config, links); >> >> + >> >> +char

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

2013-10-28 Thread Tom Gundersen
On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering 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 r

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

2013-10-28 Thread Lennart Poettering
On Sat, 26.10.13 16:16, Tom Gundersen (t...@jklm.no) wrote: > This tool applies hardware specific settings to network devices before they > are announced via libudev. > > Settings that will probably eventually be supported are MTU, Speed, > DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g

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

2013-10-27 Thread Tollef Fog Heen
]] Tom Gundersen > The tool is configured by .link files in /etc/net/links/ (with the usual > overriding logic in /run and /lib). The first (in lexicographical order) > matching .link file is applied to a given device, and all others are ignored. Breaking tab completion for /etc/network (on Debi

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

2013-10-26 Thread Tom Gundersen
On Sat, Oct 26, 2013 at 8:40 PM, Tom Gundersen wrote: > On Sat, Oct 26, 2013 at 8:39 PM, Jan Engelhardt wrote: >> On Saturday 2013-10-26 20:32, Kay Sievers wrote: >>>On Sat, Oct 26, 2013 at 8:16 PM, Jan Engelhardt wrote: On Saturday 2013-10-26 16:16, Tom Gundersen wrote: > >The tool

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

2013-10-26 Thread Tom Gundersen
On Sat, Oct 26, 2013 at 8:39 PM, Jan Engelhardt wrote: > On Saturday 2013-10-26 20:32, Kay Sievers wrote: >>On Sat, Oct 26, 2013 at 8:16 PM, Jan Engelhardt wrote: >>> On Saturday 2013-10-26 16:16, Tom Gundersen wrote: The tool is configured by .link files in /etc/net/links/ (with the usu

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

2013-10-26 Thread Jan Engelhardt
On Saturday 2013-10-26 20:32, Kay Sievers wrote: >On Sat, Oct 26, 2013 at 8:16 PM, Jan Engelhardt wrote: >> On Saturday 2013-10-26 16:16, Tom Gundersen wrote: >>> >>>The tool is configured by .link files in /etc/net/links/ (with the usual >>>overriding logic in /run and /lib). The first (in lexico

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

2013-10-26 Thread Kay Sievers
On Sat, Oct 26, 2013 at 8:16 PM, Jan Engelhardt wrote: > > On Saturday 2013-10-26 16:16, Tom Gundersen wrote: >> >>The tool is configured by .link files in /etc/net/links/ (with the usual >>overriding logic in /run and /lib). The first (in lexicographical order) >>matching .link file is applied to

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

2013-10-26 Thread Jan Engelhardt
On Saturday 2013-10-26 16:16, Tom Gundersen wrote: > >The tool is configured by .link files in /etc/net/links/ (with the usual >overriding logic in /run and /lib). The first (in lexicographical order) >matching .link file is applied to a given device, and all others are ignored. Is there anything

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

2013-10-26 Thread Tom Gundersen
This tool applies hardware specific settings to network devices before they are announced via libudev. Settings that will probably eventually be supported are MTU, Speed, DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g., 'hardware', 'synthetic' or 'random'), Name and NamePolicy (replacing