static void drain_pending_changes (DevkitDisksDevice *device, gboolean force_update);
+static gboolean devkit_disks_device_local_is_busy (DevkitDisksDevice *device);
+static gboolean devkit_disks_device_local_partitions_are_busy (DevkitDisksDevice *device);
+
static gboolean luks_get_uid_from_dm_name (const char *dm_name, uid_t *out_uid);
return ret;
}
-gboolean
+static gboolean
devkit_disks_device_local_is_busy (DevkitDisksDevice *device)
{
gboolean ret;
return ret;
}
+/* note: this only checks whether the actual partitions are busy;
+ * caller will need to check the main device itself too
+ */
+static gboolean
+devkit_disks_device_local_partitions_are_busy (DevkitDisksDevice *device)
+{
+ gboolean ret;
+ GList *l;
+ GList *devices;
+
+ ret = FALSE;
+
+ devices = devkit_disks_daemon_local_get_all_devices (device->priv->daemon);
+ for (l = devices; l != NULL; l = l->next) {
+ DevkitDisksDevice *d = DEVKIT_DISKS_DEVICE (l->data);
+
+ if (d->priv->device_is_partition &&
+ d->priv->partition_slave != NULL &&
+ strcmp (d->priv->partition_slave, device->priv->object_path) == 0) {
+
+ if (devkit_disks_device_local_is_busy (d)) {
+ ret = TRUE;
+ break;
+ }
+ }
+ }
+
+ return ret;
+}
+
void
devkit_disks_device_removed (DevkitDisksDevice *device)
{
}
}
-/* note: this only checks whether the actual partitions are busy;
- * caller will need to check the main device itself too
- */
-gboolean
-devkit_disks_device_local_partitions_are_busy (DevkitDisksDevice *device)
-{
- gboolean ret;
- GList *l;
- GList *devices;
-
- ret = FALSE;
-
- devices = devkit_disks_daemon_local_get_all_devices (device->priv->daemon);
- for (l = devices; l != NULL; l = l->next) {
- DevkitDisksDevice *d = DEVKIT_DISKS_DEVICE (l->data);
-
- if (d->priv->device_is_partition &&
- d->priv->partition_slave != NULL &&
- strcmp (d->priv->partition_slave, device->priv->object_path) == 0) {
-
- if (devkit_disks_device_local_is_busy (d)) {
- ret = TRUE;
- break;
- }
- }
- }
-
- return ret;
-}
-
gboolean
devkit_disks_device_partition_table_create (DevkitDisksDevice *device,
const char *scheme,
const char *devkit_disks_device_local_get_device_file (DevkitDisksDevice *device);
const char *devkit_disks_device_local_get_mount_path (DevkitDisksDevice *device);
-gboolean devkit_disks_device_local_is_busy (DevkitDisksDevice *device);
-gboolean devkit_disks_device_local_partitions_are_busy (DevkitDisksDevice *device);
-
/* exported methods */
gboolean devkit_disks_device_job_cancel (DevkitDisksDevice *device,