File ivman-0.6.14-no_assert.patch of Package ivman
Index: ivman-0.6.14/src/IvmConfig/IvmConfigCommon.c
===================================================================
--- ivman-0.6.14.orig/src/IvmConfig/IvmConfigCommon.c 2006-12-02 01:30:16.000000000 +0100
+++ ivman-0.6.14/src/IvmConfig/IvmConfigCommon.c 2008-10-29 17:57:39.000000000 +0100
@@ -162,7 +162,10 @@ gboolean ivm_device_is_mountable(char co
char *device = (char *) libhal_device_get_property_string(hal_ctx, udi,
"block.device",
&dbus_error);
- assert(device);
+ if (!device) {
+ ivm_check_dbus_error(&dbus_error);
+ return FALSE;
+ }
DEBUG(_("UDI %s is device %s"), udi, device, &dbus_error);
// if we get here, condition one is satisfied
ivm_check_dbus_error(&dbus_error);
@@ -210,7 +213,10 @@ is specified"), device);
udi,
"block.storage_device",
&dbus_error);
- assert(new_udi);
+ if (!new_udi) {
+ ivm_check_dbus_error(&dbus_error);
+ return FALSE;
+ }
if (!libhal_device_property_exists
(hal_ctx, new_udi, "storage.policy.should_mount", &dbus_error))
{
@@ -290,7 +296,11 @@ Device %s can't be mounted because it is
"block.storage_device",
NULL
);
- assert(new_udi);
+ if (!new_udi) {
+ ivm_check_dbus_error(&dbus_error);
+ libhal_free_string(device);
+ return FALSE;
+ }
if ( libhal_device_property_exists(
hal_ctx,
new_udi,