hal/tools/linux hal_dev.c,1.7,1.8 hal_hotplug.c,1.23,1.24
David Zeuthen
david at freedesktop.org
Mon Oct 18 15:52:07 PDT 2004
Update of /cvs/hal/hal/tools/linux
In directory gabe:/tmp/cvs-serv26755/tools/linux
Modified Files:
hal_dev.c hal_hotplug.c
Log Message:
2004-10-18 David Zeuthen <davidz at redhat.com>
* hald/hald.c (main): Do openlog() so we can log to the syslog
* hald/linux/hald_helper.h: Add a timestamp field
* hald/linux/osspec.c:
(osspec_timer_handler): Call hotplug_timeout_handler
(hotplug_timeout_handler): New function
(hald_helper_hotplug_process_queue): Set last timestamp and add
uncommented test code for dropping every 16th hotplug event
(hald_helper_first_hotplug_event): Update last timestamp
* tools/linux/hal_dev.c (main): Set timestamp
* tools/linux/hal_hotplug.c (main): Set timestamp
Index: hal_dev.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_dev.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- hal_dev.c 14 Sep 2004 12:26:24 -0000 1.7
+++ hal_dev.c 18 Oct 2004 22:52:05 -0000 1.8
@@ -44,6 +44,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
+#include <time.h>
#include "../../hald/linux/hald_helper.h"
@@ -131,6 +132,7 @@
strncpy (msg.subsystem, subsystem, HALD_HELPER_STRLEN-1);
strncpy (msg.sysfs_path, devpath, HALD_HELPER_STRLEN-1);
strncpy (msg.device_name, devname, HALD_HELPER_STRLEN-1);
+ msg.time_stamp = time (NULL);
if (sendto (fd, &msg, sizeof(struct hald_helper_msg), 0,
(struct sockaddr *)&saddr, addrlen) == -1) {
Index: hal_hotplug.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_hotplug.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- hal_hotplug.c 16 Sep 2004 22:04:15 -0000 1.23
+++ hal_hotplug.c 18 Oct 2004 22:52:05 -0000 1.24
@@ -43,6 +43,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
+#include <time.h>
#include "../../hald/linux/hald_helper.h"
@@ -350,6 +351,7 @@
strncpy (msg.subsystem, subsystem, HALD_HELPER_STRLEN-1);
strncpy (msg.sysfs_path, devpath, HALD_HELPER_STRLEN-1);
msg.net_ifindex = net_ifindex;
+ msg.time_stamp = time (NULL);
if (sendto (fd, &msg, sizeof(struct hald_helper_msg), 0,
(struct sockaddr *)&saddr, addrlen) == -1) {
More information about the hal-commit
mailing list