hal/hald/linux2 blockdev.c,1.11,1.12 classdev.c,1.17,1.18
David Zeuthen
david at freedesktop.org
Mon Feb 28 11:43:31 PST 2005
- Previous message: hal/hald hald.c,1.31,1.32 util.c,1.7,1.8 util.h,1.6,1.7
- Next message: hal/hald/linux2/probing probe-storage.c, 1.3, 1.4 probe-volume.c,
1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv31423/hald/linux2
Modified Files:
blockdev.c classdev.c
Log Message:
2005-02-28 David Zeuthen <davidz at redhat.com>
* tools/linux/hal_hotplug.c (main): Use "hal.hotplug" instead of
"hal.hotplug2" for syslog. Don't write a message for every entry.
* hald/linux2/probing/probe-volume.c (main): Only probe for fs on
optical disc if there is indeed data on the disc
* hald/linux2/probing/probe-storage.c (main): Fix up debug outputs;
don't read fs on cdrom's, only check if there is a disc. Don't use
O_NONBLOCK on non-cdrom's.
* hald/linux2/classdev.c (add_classdev_probing_helper_done): Handle
that HalDevice object is already unreffed
* hald/linux2/blockdev.c (add_blockdev_probing_helper_done): Handle
that HalDevice object is already unreffed
(block_rescan_storage_done): -do-
* hald/util.h (struct HalHelperData_s): Add already_issued_kill field
* hald/util.c (hal_util_terminate_helper): Don't kill helpers twice
and don't callback more than once
(helper_child_timeout): Don't callback more than once
(helper_device_object_finalized): Finalized; being called when
a HalDevice object is finalized; use this as hint to terminate
the helper
(helper_child_exited): Remove the weak reference to the HalDevice
object
(hal_util_helper_invoke): Create a weak reference to the HalDevice
object so we get a callback when it's finalized
* hald/hald.c (main): Bah, put LIBEXECDIR at the end so we get
the local helpers when running via run-hald.sh
Index: blockdev.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/blockdev.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- blockdev.c 28 Feb 2005 04:53:15 -0000 1.11
+++ blockdev.c 28 Feb 2005 19:43:29 -0000 1.12
@@ -265,6 +265,12 @@
HAL_INFO (("entering; timed_out=%d, return_code=%d", timed_out, return_code));
+ if (d == NULL) {
+ HAL_INFO (("Device object already removed"));
+ hotplug_event_end (end_token);
+ goto out;
+ }
+
is_volume = hal_device_property_get_bool (d, "block.is_volume");
/* Discard device if probing reports failure
@@ -465,7 +471,6 @@
}
/* lip service for PC floppy drives */
- HAL_INFO (("foo = '%s'", hal_util_get_last_element (sysfs_path)));
if (parent == NULL && sscanf (hal_util_get_last_element (sysfs_path), "fd%d", &floppy_num) == 1) {
;
} else {
@@ -1049,7 +1054,12 @@
HalDevice *fakevolume;
char fake_sysfs_path[HAL_PATH_MAX];
- HAL_ERROR (("hald-probe-storage --only-check-for-media returned %d", return_code));
+ HAL_INFO (("hald-probe-storage --only-check-for-media returned %d (timed_out=%d)", return_code, timed_out));
+
+ if (d == NULL) {
+ HAL_INFO (("Device object already removed"));
+ goto out;
+ }
sysfs_path = hal_device_property_get_string (d, "linux.sysfs_path");
@@ -1074,6 +1084,9 @@
}
}
}
+
+out:
+ ;
}
gboolean
Index: classdev.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/classdev.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- classdev.c 28 Feb 2005 04:53:15 -0000 1.17
+++ classdev.c 28 Feb 2005 19:43:29 -0000 1.18
@@ -587,6 +587,12 @@
HAL_INFO (("entering; timed_out=%d, return_code=%d", timed_out, return_code));
+ if (d == NULL) {
+ HAL_INFO (("Device object already removed"));
+ hotplug_event_end (end_token);
+ goto out;
+ }
+
/* Discard device if probing reports failure */
if (return_code != 0) {
hal_device_store_remove (hald_get_tdl (), d);
- Previous message: hal/hald hald.c,1.31,1.32 util.c,1.7,1.8 util.h,1.6,1.7
- Next message: hal/hald/linux2/probing probe-storage.c, 1.3, 1.4 probe-volume.c,
1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the hal-commit
mailing list