[systemd-devel] [PATCH] multiseat issues

Lennart Poettering lennart at poettering.net
Mon Dec 24 04:08:33 PST 2012


On Thu, 20.12.12 22:08, Oleg Samarin (osamarin68 at gmail.com) wrote:

Could you please split these patches up? The "seat-master" bit looks
straightforward to me, and I'd merge that quickly, the ONE_SEAT thing I
don't really get.

A coupld of notes:

boolean udev props usually use "1" instead of "Y" as positive value.

>  SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat"
> +SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat-master"

THis can be merged into one line.

> +                // all devices with shared tag are accessible with all seats
> +                is_shared = udev_device_has_tag(d, "shared");

We do not use C++ style // comments. Only use /* C style comments */
please, even if C99 is fine with // too..

> +                
> +                if (is_shared) {
> +                    sn = "shared";
> +                } else {

Please do not use { }  for single line if blocks. This is not PHP ;-)

> +                    sn = udev_device_get_property_value(d, "ID_SEAT");
> +                    if (isempty(sn))
> +                            sn = "seat0";
> +
> +                    if (!streq(seat, sn)) {
> +                            udev_device_unref(d);
> +                            continue;
> +                    }
>                  }
>  

I don't grok the the ONE_SEAT thing. Could you create a split out patch
for that and explain in more detail what this about?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list