{
/* update_info_mount_state() will update the mounts file and clean up the directory if needed */
update_info (device);
- if (context != NULL)
- dbus_g_method_return (context);
+ dbus_g_method_return (context);
}
else
{
action_id = NULL;
if (!mount_file_has_device (device->priv->device_file, &uid_of_mount, NULL))
{
- if (context != NULL && !is_device_in_fstab (device, NULL))
+ if (!is_device_in_fstab (device, NULL))
{
action_id = "org.freedesktop.udisks.filesystem-unmount-others";
}
{
uid_t uid;
daemon_local_get_uid (device->priv->daemon, &uid, context);
- if (context != NULL && uid_of_mount != uid)
+ if (uid_of_mount != uid)
{
action_id = "org.freedesktop.udisks.filesystem-unmount-others";
}
if (WEXITSTATUS (status) == 0 && !job_was_cancelled)
{
/* TODO: probably wait for has_media to change to FALSE */
- if (context != NULL)
- dbus_g_method_return (context);
+ dbus_g_method_return (context);
}
else
{
if (device_local_is_busy (device, TRUE, &error))
{
- throw_error (context, ERROR_BUSY, error->message);
+ dbus_g_method_return_error (context, error);
g_error_free (error);
goto out;
}
daemon_local_check_auth (device->priv->daemon,
device,
- context ? "org.freedesktop.udisks.drive-eject" : NULL,
+ "org.freedesktop.udisks.drive-eject",
"DriveEject",
TRUE,
device_drive_eject_authorized_cb,