hal/tools/linux hal_dev.c,1.3,1.4 hal_hotplug.c,1.16,1.17
David Zeuthen
david at freedesktop.org
Sun Aug 22 12:27:25 PDT 2004
Update of /cvs/hal/hal/tools/linux
In directory gabe:/tmp/cvs-serv2401/tools/linux
Modified Files:
hal_dev.c hal_hotplug.c
Log Message:
2004-08-22 David Zeuthen <david at fubar.dk>
* hald/callout.c: Only invoke callouts if they have the .hal extension.
Export HALD_VERBOSE if the hald instance is started with verbose.
Add HALD_STARTUP resp. HALD_SHUTDOWN only if the callout is in response
to hald starting up/shutting down.
* hald/hald.c: Add an verbose option. Use the HALD_VERBOSE environment
variable. Postpone daemonization until we are done probing.
* hald/hald.h: Move hald_is_[verbose|initialising|is_shutting_down] here
* hald/linux/bus_device.c:
(bus_device_visit): We can now always assume we got a parent
* hald/linux/class_device.c:
(class_device_visit): We can now always assume we got a parent
* hald/linux/common.h:
* hald/linux/drive_id/drive_id.c:
* hald/linux/osspec.c: Complete rewrite of probing code; now we
construct a list of ''coldplug events'' and feed them to the
two new functions add_device() and rem_device(); this unifies
a few codepaths and it's much faster, cleaner and just yummier.
Also ensure that callouts are run sequentially.
* hald/logger.c:
(logger_enable),
(logger_disable): New functions
(logger_emit): Print time and don't print function name
* hald/logger.h: Add logger_[enable|disable].
* tools/fstab-sync.c:
(open_temp_fstab_file): Use /tmp for the temporary file
(fs_table_has_volume): Remove debug spew
(add_udi): Log a message to the syslog on success
(remove_udi): Log a message to the syslog on success
(clean): Log a message to the syslog on success
(main): Use HALD_VERBOSE. When invoked for the ''computer'' device
object on hald startup, automatically clean the fstab (but only if
using a managed keyword). Don't remove entries on hald
shutdown. In line with the osspec.c changes (sequential callouts)
we now get a fully sanitized /etc/fstab at hald startup, Yay!
* tools/linux/hal_dev.c: (main): Less syslog spamming
* tools/linux/hal_hotplug.c:
(wait_for_sysfs_info): Less syslog spamming
(main): Less syslog spamming
Index: hal_dev.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_dev.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hal_dev.c 15 Aug 2004 18:54:57 -0000 1.3
+++ hal_dev.c 22 Aug 2004 19:27:22 -0000 1.4
@@ -122,7 +122,7 @@
if (sendto (fd, &msg, sizeof(struct hald_helper_msg), 0,
(struct sockaddr *)&saddr, addrlen) == -1) {
- syslog (LOG_ERR, "error sending message to hald");
+ /*syslog (LOG_ERR, "error sending message to hald");*/
}
out:
return 0;
Index: hal_hotplug.c
===================================================================
RCS file: /cvs/hal/hal/tools/linux/hal_hotplug.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- hal_hotplug.c 15 Aug 2004 18:54:57 -0000 1.16
+++ hal_hotplug.c 22 Aug 2004 19:27:23 -0000 1.17
@@ -227,11 +227,7 @@
if (rc != 0)
goto try_again;
- }
-
- syslog (LOG_NOTICE, "got info for %s (waited %d ms)",
- devpath, (num_tries - 1) * 100);
-
+ }
return 0;
}
@@ -308,8 +304,8 @@
rc = wait_for_sysfs_info (devpath, subsystem);
if (rc != 0) {
/* Don't know how to wait, just sleep one econd */
- syslog (LOG_WARNING, "Dont know how to wait for %s at %s; "
- "sleeping 1000 ms", subsystem, devpath);
+ /*syslog (LOG_WARNING, "Dont know how to wait for %s at %s; "
+ "sleeping 1000 ms", subsystem, devpath);*/
usleep (1000 * 1000);
}
}
@@ -330,7 +326,7 @@
if (sendto (fd, &msg, sizeof(struct hald_helper_msg), 0,
(struct sockaddr *)&saddr, addrlen) == -1) {
- syslog (LOG_INFO, "error sending message to hald");
+ /*syslog (LOG_INFO, "error sending message to hald");*/
goto out;
}
More information about the hal-commit
mailing list