Re: [systemd-devel] [PATCH 1/2] logind: Capability of making seats without framebuffer devices

2013-01-07 Thread Lennart Poettering
On Sat, 05.01.13 21:01, Oleg Samarin (osamari...@gmail.com) wrote:

 В Пт., 04/01/2013 в 00:40 +0100, Lennart Poettering пишет:
  On Thu, 27.12.12 22:54, Oleg Samarin (osamari...@gmail.com) wrote:
  
   В Пн., 24/12/2012 в 13:08 +0100, Lennart Poettering пишет:
On Thu, 20.12.12 22:08, Oleg Samarin (osamari...@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.

   The first part of my patch is here:
  
  Hmm, I can't apply this patch. Could you generate it with git
  format-patch please?
  
  Thanks!
  
  Lennart
  
 Reformatted patch is here


Applied this one. THanks!

 

 From f0df8afac271845f377e7b859141b3e3c03d61cb Mon Sep 17 00:00:00 2001
 From: Oleg Samarin osamari...@gmail.com
 Date: Sat, 5 Jan 2013 20:33:37 +0400
 Subject: [PATCH 1/2] logind: Capability of making seats without framebuffer
  devices
 
 file logind.c: The seat is now activated by any device with udev tag 
 seat-master
 file 71-seat.rules.in: All framebuffer devices have this tag
 ---
  src/login/71-seat.rules.in |  2 +-
  src/login/logind.c | 12 ++--
  2 files changed, 3 insertions(+), 11 deletions(-)
 
 diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in
 index f554d7f..4f1a9a5 100644
 --- a/src/login/71-seat.rules.in
 +++ b/src/login/71-seat.rules.in
 @@ -10,7 +10,7 @@ ACTION==remove, GOTO=seat_end
  TAG==uaccess, SUBSYSTEM!=sound, TAG+=seat
  SUBSYSTEM==sound, KERNEL==card*, TAG+=seat
  SUBSYSTEM==input, KERNEL==input*, TAG+=seat
 -SUBSYSTEM==graphics, KERNEL==fb[0-9]*, TAG+=seat
 +SUBSYSTEM==graphics, KERNEL==fb[0-9]*, TAG+=seat, TAG+=seat-master
  SUBSYSTEM==usb, ATTR{bDeviceClass}==09, TAG+=seat
  
  # 'Plugable' USB hub, sound, network, graphics adapter
 diff --git a/src/login/logind.c b/src/login/logind.c
 index 6438631..6776229 100644
 --- a/src/login/logind.c
 +++ b/src/login/logind.c
 @@ -459,11 +459,7 @@ int manager_enumerate_devices(Manager *m) {
  goto finish;
  }
  
 -r = udev_enumerate_add_match_subsystem(e, graphics);
 -if (r  0)
 -goto finish;
 -
 -r = udev_enumerate_add_match_tag(e, seat);
 +r = udev_enumerate_add_match_tag(e, seat-master);
  if (r  0)
  goto finish;
  
 @@ -1295,11 +1291,7 @@ static int manager_connect_udev(Manager *m) {
  if (!m-udev_seat_monitor)
  return -ENOMEM;
  
 -r = udev_monitor_filter_add_match_tag(m-udev_seat_monitor, seat);
 -if (r  0)
 -return r;
 -
 -r = 
 udev_monitor_filter_add_match_subsystem_devtype(m-udev_seat_monitor, 
 graphics, NULL);
 +r = udev_monitor_filter_add_match_tag(m-udev_seat_monitor, 
 seat-master);
  if (r  0)
  return r;
  



Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] logind: Capability of making seats without framebuffer devices

2013-01-05 Thread Oleg Samarin
В Пт., 04/01/2013 в 00:40 +0100, Lennart Poettering пишет:
 On Thu, 27.12.12 22:54, Oleg Samarin (osamari...@gmail.com) wrote:
 
  В Пн., 24/12/2012 в 13:08 +0100, Lennart Poettering пишет:
   On Thu, 20.12.12 22:08, Oleg Samarin (osamari...@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.
   
  The first part of my patch is here:
 
 Hmm, I can't apply this patch. Could you generate it with git
 format-patch please?
 
 Thanks!
 
 Lennart
 
Reformatted patch is here

From f0df8afac271845f377e7b859141b3e3c03d61cb Mon Sep 17 00:00:00 2001
From: Oleg Samarin osamari...@gmail.com
Date: Sat, 5 Jan 2013 20:33:37 +0400
Subject: [PATCH 1/2] logind: Capability of making seats without framebuffer
 devices

file logind.c: The seat is now activated by any device with udev tag seat-master
file 71-seat.rules.in: All framebuffer devices have this tag
---
 src/login/71-seat.rules.in |  2 +-
 src/login/logind.c | 12 ++--
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in
index f554d7f..4f1a9a5 100644
--- a/src/login/71-seat.rules.in
+++ b/src/login/71-seat.rules.in
@@ -10,7 +10,7 @@ ACTION==remove, GOTO=seat_end
 TAG==uaccess, SUBSYSTEM!=sound, TAG+=seat
 SUBSYSTEM==sound, KERNEL==card*, TAG+=seat
 SUBSYSTEM==input, KERNEL==input*, TAG+=seat
-SUBSYSTEM==graphics, KERNEL==fb[0-9]*, TAG+=seat
+SUBSYSTEM==graphics, KERNEL==fb[0-9]*, TAG+=seat, TAG+=seat-master
 SUBSYSTEM==usb, ATTR{bDeviceClass}==09, TAG+=seat
 
 # 'Plugable' USB hub, sound, network, graphics adapter
diff --git a/src/login/logind.c b/src/login/logind.c
index 6438631..6776229 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -459,11 +459,7 @@ int manager_enumerate_devices(Manager *m) {
 goto finish;
 }
 
-r = udev_enumerate_add_match_subsystem(e, graphics);
-if (r  0)
-goto finish;
-
-r = udev_enumerate_add_match_tag(e, seat);
+r = udev_enumerate_add_match_tag(e, seat-master);
 if (r  0)
 goto finish;
 
@@ -1295,11 +1291,7 @@ static int manager_connect_udev(Manager *m) {
 if (!m-udev_seat_monitor)
 return -ENOMEM;
 
-r = udev_monitor_filter_add_match_tag(m-udev_seat_monitor, seat);
-if (r  0)
-return r;
-
-r = udev_monitor_filter_add_match_subsystem_devtype(m-udev_seat_monitor, graphics, NULL);
+r = udev_monitor_filter_add_match_tag(m-udev_seat_monitor, seat-master);
 if (r  0)
 return r;
 
-- 
1.7.11.7

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] logind: Capability of making seats without framebuffer devices

2013-01-03 Thread Lennart Poettering
On Thu, 27.12.12 22:54, Oleg Samarin (osamari...@gmail.com) wrote:

 В Пн., 24/12/2012 в 13:08 +0100, Lennart Poettering пишет:
  On Thu, 20.12.12 22:08, Oleg Samarin (osamari...@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.
  
 The first part of my patch is here:

Hmm, I can't apply this patch. Could you generate it with git
format-patch please?

Thanks!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 1/2] logind: Capability of making seats without framebuffer devices

2012-12-27 Thread Oleg Samarin
В Пн., 24/12/2012 в 13:08 +0100, Lennart Poettering пишет:
 On Thu, 20.12.12 22:08, Oleg Samarin (osamari...@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.
 
The first part of my patch is here:


From: Oleg Samarin osamari...@gmail.com
Subject: [PATCH] logind: Capability of making seats without framebuffer devices

file logind.c: The seat is now activated by any device with udev tag seat-master
file 71-seat.rules.in: All framebuffer devices have this tag
file multi-seat-x.c: if the seat does not have a framebuffer device, runs X as a proxy, adding -sharevts only
if the seat has a framebuffer device, makes a special config for X (like it did before)

diff -Naur /home/oleg/tmp/systemd.old/src/login/71-seat.rules.in /home/oleg/tmp/systemd.fb/src/login/71-seat.rules.in
--- /home/oleg/tmp/systemd.old/src/login/71-seat.rules.in	2012-11-21 05:19:20.0 +0400
+++ /home/oleg/tmp/systemd.fb/src/login/71-seat.rules.in	2012-12-27 22:44:56.129552678 +0400
@@ -10,7 +10,7 @@
 TAG==uaccess, SUBSYSTEM!=sound, TAG+=seat
 SUBSYSTEM==sound, KERNEL==card*, TAG+=seat
 SUBSYSTEM==input, KERNEL==input*, TAG+=seat
-SUBSYSTEM==graphics, KERNEL==fb[0-9]*, TAG+=seat
+SUBSYSTEM==graphics, KERNEL==fb[0-9]*, TAG+=seat, TAG+=seat-master
 SUBSYSTEM==usb, ATTR{bDeviceClass}==09, TAG+=seat
 
 # 'Plugable' USB hub, sound, network, graphics adapter
diff -Naur /home/oleg/tmp/systemd.old/src/login/logind.c /home/oleg/tmp/systemd.fb/src/login/logind.c
--- /home/oleg/tmp/systemd.old/src/login/logind.c	2012-11-21 05:19:20.0 +0400
+++ /home/oleg/tmp/systemd.fb/src/login/logind.c	2012-12-27 22:39:17.192654294 +0400
@@ -450,11 +450,7 @@
 goto finish;
 }
 
-r = udev_enumerate_add_match_subsystem(e, graphics);
-if (r  0)
-goto finish;
-
-r = udev_enumerate_add_match_tag(e, seat);
+r = udev_enumerate_add_match_tag(e, seat-master);
 if (r  0)
 goto finish;
 
@@ -1286,11 +1282,7 @@
 if (!m-udev_seat_monitor)
 return -ENOMEM;
 
-r = udev_monitor_filter_add_match_tag(m-udev_seat_monitor, seat);
-if (r  0)
-return r;
-
-r = udev_monitor_filter_add_match_subsystem_devtype(m-udev_seat_monitor, graphics, NULL);
+r = udev_monitor_filter_add_match_tag(m-udev_seat_monitor, seat-master);
 if (r  0)
 return r;
 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel