linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] udev_dbus changes
@ 2004-04-11  1:51 Kay Sievers
  2004-04-11  2:17 ` Nick Yin
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Kay Sievers @ 2004-04-11  1:51 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

Here we change extras/dbus/* to
  o install the binary in /etc/dev.d
  o append .dev to the binary
  o add David's copyright
  o add the listener script to watch the sent dbus messages
  o removed the undefined udev_log variable
  o switch printf() to dbg()

thanks,
Kay


[-- Attachment #2: 02-dbus.patch --]
[-- Type: text/plain, Size: 4608 bytes --]

diff -Nru a/extras/dbus/Makefile b/extras/dbus/Makefile
--- a/extras/dbus/Makefile	Sun Apr 11 03:38:42 2004
+++ b/extras/dbus/Makefile	Sun Apr 11 03:38:42 2004
@@ -23,7 +23,7 @@
 sbindir =	${exec_prefix}/sbin
 usrbindir =	${exec_prefix}/usr/bin
 mandir =	${prefix}/usr/share/man
-hotplugdir =	${etcdir}/hotplug.d/default
+devddir =	${etcdir}/dev.d/default
 dbusdir =	${etcdir}/dbus-1/system.d
 configdir =	${etcdir}/udev/
 initdir = 	${etcdir}/init.d/
@@ -53,9 +53,11 @@
 install-dbus-policy:
 	$(INSTALL) -d $(DESTDIR)$(dbusdir)
 	$(INSTALL_DATA) etc/dbus-1/system.d/udev_sysbus_policy.conf $(DESTDIR)$(dbusdir)
+	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(devddir)/$(PROG).dev
 
 uninstall-dbus-policy:
 	- rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
+	- rm $(DESTDIR)$(devddir)/$(PROG).dev
 
 install: install-dbus-policy all
 
diff -Nru a/extras/dbus/dbus-listener.py b/extras/dbus/dbus-listener.py
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/extras/dbus/dbus-listener.py	Sun Apr 11 03:38:42 2004
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+import dbus
+import gtk
+
+def udev_signal_received(dbus_iface, member, service, object_path,
+message):
+	[filename, sysfs_path] = message.get_args_list()
+	if member=='NodeCreated':
+		print 'Node %s created for %s'%(filename, sysfs_path)
+	elif member=='NodeDeleted':
+		print 'Node %s deleted for %s'%(filename, sysfs_path)
+
+def main():
+	bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
+	bus.add_signal_receiver(udev_signal_received,
+		'org.kernel.udev.NodeMonitor',		# interface
+		'org.kernel.udev',			# service
+		'/org/kernel/udev/NodeMonitor')		# object
+
+	gtk.mainloop()
+
+if __name__ == '__main__':
+	main()
+
diff -Nru a/extras/dbus/udev_dbus.c b/extras/dbus/udev_dbus.c
--- a/extras/dbus/udev_dbus.c	Sun Apr 11 03:38:42 2004
+++ b/extras/dbus/udev_dbus.c	Sun Apr 11 03:38:42 2004
@@ -1,3 +1,23 @@
+/*
+ * udev_dbus.c
+ *
+ * Copyright (C) 2003 David Zeuthen <david@fubar.dk>
+ *
+ *	This program is free software; you can redistribute it and/or modify it
+ *	under the terms of the GNU General Public License as published by the
+ *	Free Software Foundation version 2 of the License.
+ * 
+ *	This program is distributed in the hope that it will be useful, but
+ *	WITHOUT ANY WARRANTY; without even the implied warranty of
+ *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *	General Public License for more details.
+ * 
+ *	You should have received a copy of the GNU General Public License along
+ *	with this program; if not, write to the Free Software Foundation, Inc.,
+ *	675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -18,21 +38,18 @@
 {
 	va_list args;
 
-	if (!udev_log)
-		return;
-
 	va_start(args, format);
 	vsyslog(level, format, args);
 	va_end(args);
 }
 #endif
 
-/** variable for the connection the to system message bus or #NULL
+/*  variable for the connection the to system message bus or NULL
  *  if we cannot connect or acquire the org.kernel.udev service
  */
 static DBusConnection* sysbus_connection;
 
-/** Disconnect from the system message bus */
+/* disconnect from the system message bus */
 static void sysbus_disconnect(void)
 {
 	if (sysbus_connection == NULL)
@@ -42,12 +59,12 @@
 	sysbus_connection = NULL;
 }
 
-/** Connect to the system message bus */
+/* connect to the system message bus */
 static void sysbus_connect(void)
 {
 	DBusError error;
 
-	/* Connect to a well-known bus instance, the system bus */
+	/* connect to a well-known bus instance, the system bus */
 	dbus_error_init(&error);
 	sysbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
 	if (sysbus_connection == NULL) {
@@ -70,15 +87,15 @@
 	dbus_bus_acquire_service(sysbus_connection, "org.kernel.udev", 0, 
 				 &error);
 	if (dbus_error_is_set(&error)) {
-		printf("cannot acquire org.kernel.udev service, error %s: %s'",
-		       error.name, error.message);
+		dbg("cannot acquire org.kernel.udev service, error %s: %s'",
+		    error.name, error.message);
 		sysbus_disconnect();
 		return;
 	}
 }
 
 
-/** Send out a signal that a device node is created
+/*  send out a signal that a device node is created
  *
  *  @param  devname             name of the device node, e.g. /dev/sda1
  *  @param  path                Sysfs path of device
@@ -105,7 +122,7 @@
 	dbus_connection_flush(sysbus_connection);
 }
 
-/** Send out a signal that a device node is deleted
+/*  send out a signal that a device node is deleted
  *
  *  @param  devname             Name of the device node, e.g. /udev/sda1
  *  @param  path                Sysfs path of device

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
@ 2004-04-11  2:17 ` Nick Yin
  2004-04-11  8:52 ` Marco d'Itri
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Nick Yin @ 2004-04-11  2:17 UTC (permalink / raw)
  To: linux-hotplug

Kay,

Greate! I also need the listener script to watch the sent dbus messages.

Nick

>From: Kay Sievers <kay.sievers@vrfy.org>
>To: Greg KH <greg@kroah.com>
>CC: hotplug <linux-hotplug-devel@lists.sourceforge.net>
>Subject: [PATCH] udev_dbus changes
>Date: Sun, 11 Apr 2004 03:51:07 +0200
>
>Here we change extras/dbus/* to
>   o install the binary in /etc/dev.d
>   o append .dev to the binary
>   o add David's copyright
>   o add the listener script to watch the sent dbus messages
>   o removed the undefined udev_log variable
>   o switch printf() to dbg()
>
>thanks,
>Kay
>
>diff -Nru a/extras/dbus/Makefile b/extras/dbus/Makefile
>--- a/extras/dbus/Makefile	Sun Apr 11 03:38:42 2004
>+++ b/extras/dbus/Makefile	Sun Apr 11 03:38:42 2004
>@@ -23,7 +23,7 @@
>  sbindir =	${exec_prefix}/sbin
>  usrbindir =	${exec_prefix}/usr/bin
>  mandir =	${prefix}/usr/share/man
>-hotplugdir =	${etcdir}/hotplug.d/default
>+devddir =	${etcdir}/dev.d/default
>  dbusdir =	${etcdir}/dbus-1/system.d
>  configdir =	${etcdir}/udev/
>  initdir = 	${etcdir}/init.d/
>@@ -53,9 +53,11 @@
>  install-dbus-policy:
>  	$(INSTALL) -d $(DESTDIR)$(dbusdir)
>  	$(INSTALL_DATA) etc/dbus-1/system.d/udev_sysbus_policy.conf 
>$(DESTDIR)$(dbusdir)
>+	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(devddir)/$(PROG).dev
>
>  uninstall-dbus-policy:
>  	- rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
>+	- rm $(DESTDIR)$(devddir)/$(PROG).dev
>
>  install: install-dbus-policy all
>
>diff -Nru a/extras/dbus/dbus-listener.py b/extras/dbus/dbus-listener.py
>--- /dev/null	Wed Dec 31 16:00:00 1969
>+++ b/extras/dbus/dbus-listener.py	Sun Apr 11 03:38:42 2004
>@@ -0,0 +1,25 @@
>+#!/usr/bin/python
>+
>+import dbus
>+import gtk
>+
>+def udev_signal_received(dbus_iface, member, service, object_path,
>+message):
>+	[filename, sysfs_path] = message.get_args_list()
>+	if member='NodeCreated':
>+		print 'Node %s created for %s'%(filename, sysfs_path)
>+	elif member='NodeDeleted':
>+		print 'Node %s deleted for %s'%(filename, sysfs_path)
>+
>+def main():
>+	bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
>+	bus.add_signal_receiver(udev_signal_received,
>+		'org.kernel.udev.NodeMonitor',		# interface
>+		'org.kernel.udev',			# service
>+		'/org/kernel/udev/NodeMonitor')		# object
>+
>+	gtk.mainloop()
>+
>+if __name__ = '__main__':
>+	main()
>+
>diff -Nru a/extras/dbus/udev_dbus.c b/extras/dbus/udev_dbus.c
>--- a/extras/dbus/udev_dbus.c	Sun Apr 11 03:38:42 2004
>+++ b/extras/dbus/udev_dbus.c	Sun Apr 11 03:38:42 2004
>@@ -1,3 +1,23 @@
>+/*
>+ * udev_dbus.c
>+ *
>+ * Copyright (C) 2003 David Zeuthen <david@fubar.dk>
>+ *
>+ *	This program is free software; you can redistribute it and/or modify it
>+ *	under the terms of the GNU General Public License as published by the
>+ *	Free Software Foundation version 2 of the License.
>+ *
>+ *	This program is distributed in the hope that it will be useful, but
>+ *	WITHOUT ANY WARRANTY; without even the implied warranty of
>+ *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>+ *	General Public License for more details.
>+ *
>+ *	You should have received a copy of the GNU General Public License along
>+ *	with this program; if not, write to the Free Software Foundation, Inc.,
>+ *	675 Mass Ave, Cambridge, MA 02139, USA.
>+ *
>+ */
>+
>  #include <stdlib.h>
>  #include <string.h>
>  #include <stdio.h>
>@@ -18,21 +38,18 @@
>  {
>  	va_list args;
>
>-	if (!udev_log)
>-		return;
>-
>  	va_start(args, format);
>  	vsyslog(level, format, args);
>  	va_end(args);
>  }
>  #endif
>
>-/** variable for the connection the to system message bus or #NULL
>+/*  variable for the connection the to system message bus or NULL
>   *  if we cannot connect or acquire the org.kernel.udev service
>   */
>  static DBusConnection* sysbus_connection;
>
>-/** Disconnect from the system message bus */
>+/* disconnect from the system message bus */
>  static void sysbus_disconnect(void)
>  {
>  	if (sysbus_connection = NULL)
>@@ -42,12 +59,12 @@
>  	sysbus_connection = NULL;
>  }
>
>-/** Connect to the system message bus */
>+/* connect to the system message bus */
>  static void sysbus_connect(void)
>  {
>  	DBusError error;
>
>-	/* Connect to a well-known bus instance, the system bus */
>+	/* connect to a well-known bus instance, the system bus */
>  	dbus_error_init(&error);
>  	sysbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
>  	if (sysbus_connection = NULL) {
>@@ -70,15 +87,15 @@
>  	dbus_bus_acquire_service(sysbus_connection, "org.kernel.udev", 0,
>  				 &error);
>  	if (dbus_error_is_set(&error)) {
>-		printf("cannot acquire org.kernel.udev service, error %s: %s'",
>-		       error.name, error.message);
>+		dbg("cannot acquire org.kernel.udev service, error %s: %s'",
>+		    error.name, error.message);
>  		sysbus_disconnect();
>  		return;
>  	}
>  }
>
>
>-/** Send out a signal that a device node is created
>+/*  send out a signal that a device node is created
>   *
>   *  @param  devname             name of the device node, e.g. /dev/sda1
>   *  @param  path                Sysfs path of device
>@@ -105,7 +122,7 @@
>  	dbus_connection_flush(sysbus_connection);
>  }
>
>-/** Send out a signal that a device node is deleted
>+/*  send out a signal that a device node is deleted
>   *
>   *  @param  devname             Name of the device node, e.g. /udev/sda1
>   *  @param  path                Sysfs path of device

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid963



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
  2004-04-11  2:17 ` Nick Yin
@ 2004-04-11  8:52 ` Marco d'Itri
  2004-04-11 10:05 ` Kay Sievers
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Marco d'Itri @ 2004-04-11  8:52 UTC (permalink / raw)
  To: linux-hotplug

On Apr 11, Kay Sievers <kay.sievers@vrfy.org> wrote:

>   o install the binary in /etc/dev.d
Bad idea. They should be installed in /sbin/ and referenced by a symlink.

-- 
ciao, |
Marco | [5660 in2WmO7h.GEY.]


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
  2004-04-11  2:17 ` Nick Yin
  2004-04-11  8:52 ` Marco d'Itri
@ 2004-04-11 10:05 ` Kay Sievers
  2004-04-11 10:07 ` Marco d'Itri
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2004-04-11 10:05 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Apr 11, 2004 at 10:52:41AM +0200, Marco d'Itri wrote:
> On Apr 11, Kay Sievers <kay.sievers@vrfy.org> wrote:
> 
> >   o install the binary in /etc/dev.d
> Bad idea. They should be installed in /sbin/ and referenced by a symlink.

Ok, sounds better. But should it go in /sbin/ or /usr/sbin/.
Hal installs the caller in /usr/libexec/, so what's the best :)

Kay


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
                   ` (2 preceding siblings ...)
  2004-04-11 10:05 ` Kay Sievers
@ 2004-04-11 10:07 ` Marco d'Itri
  2004-04-11 10:43 ` Kay Sievers
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Marco d'Itri @ 2004-04-11 10:07 UTC (permalink / raw)
  To: linux-hotplug

On Apr 11, Kay Sievers <kay.sievers@vrfy.org> wrote:

> > >   o install the binary in /etc/dev.d
> > Bad idea. They should be installed in /sbin/ and referenced by a symlink.
> Ok, sounds better. But should it go in /sbin/ or /usr/sbin/.
> Hal installs the caller in /usr/libexec/, so what's the best :)
/usr/libexec has been removed from FHS many years ago.
For debian, I use /usr/sbin/ for the programs which depends on libraries
in /usr/lib/ (currently only udev_dbus) and /sbin/ for the others.

-- 
ciao, |
Marco | [5662 tuoQffg2g26RM]


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
                   ` (3 preceding siblings ...)
  2004-04-11 10:07 ` Marco d'Itri
@ 2004-04-11 10:43 ` Kay Sievers
  2004-04-11 10:47 ` Kay Sievers
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2004-04-11 10:43 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

On Sun, Apr 11, 2004 at 03:51:07AM +0200, Kay Sievers wrote:
> Here we change extras/dbus/* to
>   o install the binary in /etc/dev.d
>   o append .dev to the binary
>   o add David's copyright
>   o add the listener script to watch the sent dbus messages
>   o removed the undefined udev_log variable
>   o switch printf() to dbg()

Here we install the binary in /usr/sbin/ and symlink it to
/etc/dev.d/ with the .dev suffix.

thanks,
Kay

[-- Attachment #2: 02-dbus.patch --]
[-- Type: text/plain, Size: 5009 bytes --]

diff -Nru a/extras/dbus/Makefile b/extras/dbus/Makefile
--- a/extras/dbus/Makefile	Sun Apr 11 12:38:01 2004
+++ b/extras/dbus/Makefile	Sun Apr 11 12:38:01 2004
@@ -22,8 +22,9 @@
 etcdir =	${prefix}/etc
 sbindir =	${exec_prefix}/sbin
 usrbindir =	${exec_prefix}/usr/bin
+usrsbindir =	${exec_prefix}/usr/sbin
 mandir =	${prefix}/usr/share/man
-hotplugdir =	${etcdir}/hotplug.d/default
+devddir =	${etcdir}/dev.d/default
 dbusdir =	${etcdir}/dbus-1/system.d
 configdir =	${etcdir}/udev/
 initdir = 	${etcdir}/init.d/
@@ -53,9 +54,13 @@
 install-dbus-policy:
 	$(INSTALL) -d $(DESTDIR)$(dbusdir)
 	$(INSTALL_DATA) etc/dbus-1/system.d/udev_sysbus_policy.conf $(DESTDIR)$(dbusdir)
+	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(usrsbindir)/$(PROG)
+	- ln -s -f $(DESTDIR)$(usrsbindir)/$(PROG) $(DESTDIR)$(devddir)/$(PROG).dev
 
 uninstall-dbus-policy:
 	- rm $(DESTDIR)$(dbusdir)/udev_sysbus_policy.conf
+	- rm $(DESTDIR)$(devddir)/$(PROG).dev
+	- rm $(DESTDIR)$(usrsbindir)/$(PROG)
 
 install: install-dbus-policy all
 
diff -Nru a/extras/dbus/dbus-listen-test.py b/extras/dbus/dbus-listen-test.py
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/extras/dbus/dbus-listen-test.py	Sun Apr 11 12:38:01 2004
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+# receives and prints the messages udev_dbus sent
+# to the org.kernel.udev.NodeMonitor interface
+
+import dbus
+import gtk
+
+def udev_signal_received(dbus_iface, member, service, object_path, message):
+	[filename, sysfs_path] = message.get_args_list()
+	if member=='NodeCreated':
+		print 'Node %s created for %s'%(filename, sysfs_path)
+	elif member=='NodeDeleted':
+		print 'Node %s deleted for %s'%(filename, sysfs_path)
+
+def main():
+	bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
+	bus.add_signal_receiver(udev_signal_received,
+		'org.kernel.udev.NodeMonitor',		# interface
+		'org.kernel.udev',			# service
+		'/org/kernel/udev/NodeMonitor')		# object
+	gtk.mainloop()
+
+if __name__ == '__main__':
+	main()
+
diff -Nru a/extras/dbus/udev_dbus.c b/extras/dbus/udev_dbus.c
--- a/extras/dbus/udev_dbus.c	Sun Apr 11 12:38:01 2004
+++ b/extras/dbus/udev_dbus.c	Sun Apr 11 12:38:01 2004
@@ -1,3 +1,23 @@
+/*
+ * udev_dbus.c
+ *
+ * Copyright (C) 2003 David Zeuthen <david@fubar.dk>
+ *
+ *	This program is free software; you can redistribute it and/or modify it
+ *	under the terms of the GNU General Public License as published by the
+ *	Free Software Foundation version 2 of the License.
+ * 
+ *	This program is distributed in the hope that it will be useful, but
+ *	WITHOUT ANY WARRANTY; without even the implied warranty of
+ *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *	General Public License for more details.
+ * 
+ *	You should have received a copy of the GNU General Public License along
+ *	with this program; if not, write to the Free Software Foundation, Inc.,
+ *	675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -18,21 +38,18 @@
 {
 	va_list args;
 
-	if (!udev_log)
-		return;
-
 	va_start(args, format);
 	vsyslog(level, format, args);
 	va_end(args);
 }
 #endif
 
-/** variable for the connection the to system message bus or #NULL
+/*  Variable for the connection the to system message bus or NULL
  *  if we cannot connect or acquire the org.kernel.udev service
  */
 static DBusConnection* sysbus_connection;
 
-/** Disconnect from the system message bus */
+/* Disconnect from the system message bus */
 static void sysbus_disconnect(void)
 {
 	if (sysbus_connection == NULL)
@@ -42,7 +59,7 @@
 	sysbus_connection = NULL;
 }
 
-/** Connect to the system message bus */
+/* Connect to the system message bus */
 static void sysbus_connect(void)
 {
 	DBusError error;
@@ -70,18 +87,18 @@
 	dbus_bus_acquire_service(sysbus_connection, "org.kernel.udev", 0, 
 				 &error);
 	if (dbus_error_is_set(&error)) {
-		printf("cannot acquire org.kernel.udev service, error %s: %s'",
-		       error.name, error.message);
+		dbg("cannot acquire org.kernel.udev service, error %s: %s'",
+		    error.name, error.message);
 		sysbus_disconnect();
 		return;
 	}
 }
 
 
-/** Send out a signal that a device node is created
+/*  Send out a signal that a device node is created
  *
- *  @param  devname             name of the device node, e.g. /dev/sda1
- *  @param  path                Sysfs path of device
+ *  @param  devname		Name of the device node, e.g. /dev/sda1
+ *  @param  path		Sysfs path of device
  */
 static void sysbus_send_create(const char *devname, const char *path)
 {
@@ -105,10 +122,10 @@
 	dbus_connection_flush(sysbus_connection);
 }
 
-/** Send out a signal that a device node is deleted
+/*  Send out a signal that a device node is deleted
  *
- *  @param  devname             Name of the device node, e.g. /udev/sda1
- *  @param  path                Sysfs path of device
+ *  @param  devname		Name of the device node, e.g. /udev/sda1
+ *  @param  path		Sysfs path of device
  */
 static void sysbus_send_remove(const char *devname, const char *path)
 {

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
                   ` (4 preceding siblings ...)
  2004-04-11 10:43 ` Kay Sievers
@ 2004-04-11 10:47 ` Kay Sievers
  2004-04-11 12:03 ` Marco d'Itri
  2004-04-13  0:21 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2004-04-11 10:47 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Apr 11, 2004 at 12:07:55PM +0200, Marco d'Itri wrote:
> On Apr 11, Kay Sievers <kay.sievers@vrfy.org> wrote:
> 
> > > >   o install the binary in /etc/dev.d
> > > Bad idea. They should be installed in /sbin/ and referenced by a symlink.
> > Ok, sounds better. But should it go in /sbin/ or /usr/sbin/.
> > Hal installs the caller in /usr/libexec/, so what's the best :)
> /usr/libexec has been removed from FHS many years ago.
> For debian, I use /usr/sbin/ for the programs which depends on libraries
> in /usr/lib/ (currently only udev_dbus) and /sbin/ for the others.

Thanks for pointing this out.
Hmm, so FHS doesn't specify a directory for binaries, which are not
included in the $PATH by default, right?

Kay


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
                   ` (5 preceding siblings ...)
  2004-04-11 10:47 ` Kay Sievers
@ 2004-04-11 12:03 ` Marco d'Itri
  2004-04-13  0:21 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Marco d'Itri @ 2004-04-11 12:03 UTC (permalink / raw)
  To: linux-hotplug

On Apr 11, Kay Sievers <kay.sievers@vrfy.org> wrote:

> Hmm, so FHS doesn't specify a directory for binaries, which are not
> included in the $PATH by default, right?
Right.

-- 
ciao, |
Marco | [5663 moSIJXlZrg/zI]


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] udev_dbus changes
  2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
                   ` (6 preceding siblings ...)
  2004-04-11 12:03 ` Marco d'Itri
@ 2004-04-13  0:21 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2004-04-13  0:21 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Apr 11, 2004 at 12:43:46PM +0200, Kay Sievers wrote:
> On Sun, Apr 11, 2004 at 03:51:07AM +0200, Kay Sievers wrote:
> > Here we change extras/dbus/* to
> >   o install the binary in /etc/dev.d
> >   o append .dev to the binary
> >   o add David's copyright
> >   o add the listener script to watch the sent dbus messages
> >   o removed the undefined udev_log variable
> >   o switch printf() to dbg()
> 
> Here we install the binary in /usr/sbin/ and symlink it to
> /etc/dev.d/ with the .dev suffix.

Applied, thanks.

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-04-13  0:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-11  1:51 [PATCH] udev_dbus changes Kay Sievers
2004-04-11  2:17 ` Nick Yin
2004-04-11  8:52 ` Marco d'Itri
2004-04-11 10:05 ` Kay Sievers
2004-04-11 10:07 ` Marco d'Itri
2004-04-11 10:43 ` Kay Sievers
2004-04-11 10:47 ` Kay Sievers
2004-04-11 12:03 ` Marco d'Itri
2004-04-13  0:21 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).