diff options
author | David Zeuthen <david@fubar.dk> | 2005-02-11 22:01:08 +0000 |
---|---|---|
committer | David Zeuthen <david@fubar.dk> | 2005-02-11 22:01:08 +0000 |
commit | 158dd76dc28f671668e075b1e70693678ea334c6 (patch) | |
tree | 4ac0a7187a5396955bb47616d748de71f4e7bc8c /hald/hald.c | |
parent | ef42a73e64729b5925e73f713e66469a4c3258a5 (diff) |
With this path, all storage devices should be working just as well as on
the 0.4.x branch.
In fact, since we're doing things in separate processes hald now nicely
handles my very troublesome USB 6in1 card reader. There's other
improvements too; we handle media with non-partitioned file systems _a
lot nicer_, especially those on PCMCIA card readers (driven by ide-cs)
since we now have logic to discard hotplug rem/add for those
partitions.
Rock on.
Add prototypes for libhal_device_rescan() and libhal_device_reprobe()
New function (libhal_device_reprobe): New function
Be able to probe for volumes on main block devices. Retrieve optical disc
properties if applicable.
New function (main): Add a new option --only-check-for-media which is used
on Rescan() of a storage device. Check for fs on main block device or a
disc in the optical drive. Return code 2 if that is the case.
New function (unmount_childs): New function (is_mounted): New function
(main): Do lazy unmount, if necessary, when media goes away. Handle
polling on optical drives.
Add prototype for hotplug_event_reposted() and
hotplug_event_enqueue_at_front().
New function; like event_end but without deleting the hotplug event (useful
for reordering events) (hotplug_event_enqueue_at_front): New function;
to insert events at the front of the queue
New function (and what a nice long name :-/)
(add_blockdev_probing_helper_done): Check result from hald-probe-
storage and add a new fakevolume add event if one was detected.
(hotplug_event_begin_add_blockdev): Handle fakevolume add events. Add
some more debug spewage when things fail. (force_unmount): New function
(hotplug_event_begin_remove_blockdev): Handle fakevolume remove events;
reorder queue to process non-handled volume before the storage device.
Nice. (block_rescan_storage_done): New function
(blockdev_rescan_device): Actually do something here; a Rescan() method
call on a storage device will induce searching a filesystem on the main
block device
Add new master_slave code but comment it out for now
Fix up
Fix up to use new way of figuring vendor_id/product_id etc.
Diffstat (limited to 'hald/hald.c')
-rw-r--r-- | hald/hald.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/hald/hald.c b/hald/hald.c index a89d8039..9f337108 100644 --- a/hald/hald.c +++ b/hald/hald.c @@ -44,6 +44,9 @@ #include <dbus/dbus.h> #include <dbus/dbus-glib.h> +#include <dbus/dbus-glib-lowlevel.h> + +/*#include "master_slave.h"*/ #include "logger.h" #include "hald.h" @@ -407,14 +410,19 @@ main (int argc, char *argv[]) } } - if (!retain_privs) - drop_privileges(); - if (hald_is_verbose) logger_enable (); else logger_disable (); + /* will fork into two; only the child will return here if we are successful */ + /*master_slave_setup ();*/ + + if (!retain_privs) + drop_privileges(); + + loop = g_main_loop_new (NULL, FALSE); + HAL_INFO ((PACKAGE_STRING)); if (opt_become_daemon) HAL_INFO (("Will daemonize")); @@ -426,7 +434,7 @@ main (int argc, char *argv[]) int dev_null_fd; int pf; char pid[9]; - + HAL_INFO (("Becoming a daemon")); if (pipe (startup_daemonize_pipe) != 0) { @@ -519,8 +527,6 @@ main (int argc, char *argv[]) if (!hald_dbus_init ()) return 1; - loop = g_main_loop_new (NULL, FALSE); - /* initialize operating system specific parts */ osspec_init (); |