hal/tools/linux hal_dev.c,1.4,1.5

David Zeuthen david at freedesktop.org
Thu Aug 26 15:16:19 PDT 2004


Update of /cvs/hal/hal/tools/linux
In directory gabe:/tmp/cvs-serv15305/tools/linux

Modified Files:
	hal_dev.c 
Log Message:
2004-08-27  David Zeuthen  <david at fubar.dk>

	* AUTHORS: Add Kay Sievers <kay.sievers at vrfy.org> cause he rocks.
	Sort the list in alphabetical order of surname (I'm just soo
	political correct :-)

	* fdi/20freedesktop/canon-digital-ixus-v.fdi: Merge onto usb_device
	since we really don't know what interface to target

	* hald/linux/hald_helper.h: Change comment about seqnum

	* hald/linux/libsysfs/sysfs_dir.c (sysfs_open_link): Patch from
	Steve Grubb <linux4_ever at yahoo.com> to fix leak on error condition.

	* hald/linux/osspec.c: 
	(add_computer_callouts_done): Move from TDL to GDL
	(osspec_probe): Add to TDL; callouts may need it (seen by Kristof
	Vansant <de_lupus at pandora.be>
	(hald_helper_device_node): Print out seqnum
	(hald_helper_data): Pass seqnum

	* hald/logger.h: Ignore ENABLE_VERBOSE_MODE; always compile all
	logging statements in (should take the heat of some bugreports)

	* tools/linux/hal_dev.c (main): Pass seqnum if available; otherwise
	pass -1.



Index: hal_dev.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_dev.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hal_dev.c	22 Aug 2004 19:27:22 -0000	1.4
+++ hal_dev.c	26 Aug 2004 22:16:17 -0000	1.5
@@ -65,7 +65,9 @@
 	char *devpath;
 	char *devnode;
 	char *action;
+	char *seqnum_str;
 	int is_add;
+	int seqnum;
 
 	if (argc != 2)
 		return 1;
@@ -100,6 +102,14 @@
 	else
 		is_add = 0;
 
+	seqnum_str = getenv ("SEQNUM");
+	if (seqnum_str == NULL) {
+		seqnum = -1;
+	} else {
+		seqnum = atoi (seqnum_str);
+	}
+
+
 	fd = socket(AF_LOCAL, SOCK_DGRAM, 0);
 	if (fd == -1) {
 		syslog (LOG_ERR, "error opening socket");
@@ -116,6 +126,7 @@
 	msg.magic = HALD_HELPER_MAGIC; 
 	msg.is_hotplug_or_dev = 0;
 	msg.is_add = is_add;
+	msg.seqnum = seqnum;
 	strncpy (msg.subsystem, subsystem, HALD_HELPER_STRLEN);
 	strncpy (msg.sysfs_path, devpath, HALD_HELPER_STRLEN);
 	strncpy (msg.device_node, devnode, HALD_HELPER_STRLEN);




More information about the hal-commit mailing list