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

David Zeuthen david at freedesktop.org
Sun Aug 29 08:57:44 PDT 2004


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

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

	* hald/linux/block_class_device.c (detect_media): Set volume.fsusage
	to empty string by default
	(block_class_pre_process): Also set volume.fsusage to empty string by
	default. Set storage.drive_type to disk by default (should now work
	the the ub kernel driver instead of usb-storage)

	* hald/hald.c (main): Print out version

	* tools/linux/hal_dev.c (main): Put in option for more debug



Index: hal_dev.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_dev.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hal_dev.c	26 Aug 2004 22:16:17 -0000	1.5
+++ hal_dev.c	29 Aug 2004 15:57:41 -0000	1.6
@@ -47,6 +47,8 @@
 
 #include "../../hald/linux/hald_helper.h"
 
+/*#define HAL_DEVD_EXTRA_DEBUG 1*/
+
 /** Entry point
  *
  *  @param  argc                Number of arguments
@@ -69,11 +71,15 @@
 	int is_add;
 	int seqnum;
 
+	openlog ("hal.dev", LOG_PID, LOG_USER);
+
+#ifdef HAL_DEVD_EXTRA_DEBUG
+	syslog (LOG_NOTICE, "entering for %s", getenv ("DEVPATH"));
+#endif
+
 	if (argc != 2)
 		return 1;
 
-	openlog ("hal.dev", LOG_PID, LOG_USER);
-
 	subsystem = argv[1];
 	if (subsystem == NULL) {
 		syslog (LOG_ERR, "subsystem is not set");
@@ -133,8 +139,17 @@
 
 	if (sendto (fd, &msg, sizeof(struct hald_helper_msg), 0,
 		    (struct sockaddr *)&saddr, addrlen) == -1) {
-		/*syslog (LOG_ERR, "error sending message to hald");*/
+#ifdef HAL_DEVD_EXTRA_DEBUG
+		syslog (LOG_ERR, "error sending message to hald for %s", devpath);
+#endif
+	} else {
+#ifdef HAL_DEVD_EXTRA_DEBUG
+		syslog (LOG_NOTICE, "sent message to hald for %s", devpath);
+#endif
 	}
 out:
+#ifdef HAL_DEVD_EXTRA_DEBUG
+	syslog (LOG_NOTICE, "exiting");
+#endif
 	return 0;
 }




More information about the hal-commit mailing list