hal/libhal-storage libhal-storage.c, 1.30, 1.31 libhal-storage.h,
1.15, 1.16
David Zeuthen
david at kemper.freedesktop.org
Tue Feb 21 22:35:11 PST 2006
- Previous message: hal/volume_id cramfs.c, 1.6, 1.7 ext.c, 1.7, 1.8 fat.c, 1.10,
1.11 hfs.c, 1.7, 1.8 highpoint.c, 1.8, 1.9 hpfs.c, 1.6,
1.7 iso9660.c, 1.8, 1.9 isw_raid.c, 1.6, 1.7 jfs.c, 1.7,
1.8 linux_raid.c, 1.8, 1.9 linux_swap.c, 1.7, 1.8 lsi_raid.c,
1.5, 1.6 lvm.c, 1.8, 1.9 mac.c, 1.8, 1.9 minix.c, 1.5,
1.6 msdos.c, 1.7, 1.8 ntfs.c, 1.8, 1.9 nvidia_raid.c, 1.5,
1.6 ocfs.c, 1.2, 1.3 promise_raid.c, 1.5, 1.6 reiserfs.c, 1.9,
1.10 romfs.c, 1.7, 1.8 silicon_raid.c, 1.5, 1.6 sysv.c, 1.7,
1.8 udf.c, 1.7, 1.8 ufs.c, 1.7, 1.8 via_raid.c, 1.5,
1.6 volume_id.c, 1.13, 1.14 volume_id.h, 1.13, 1.14 vxfs.c,
1.2, 1.3 xfs.c, 1.7, 1.8
- Next message: hal ChangeLog,1.817,1.818
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/hal/hal/libhal-storage
In directory kemper:/tmp/cvs-serv20480/libhal-storage
Modified Files:
libhal-storage.c libhal-storage.h
Log Message:
2006-02-22 David Zeuthen <davidz at redhat.com>
* libhal-storage/libhal-storage.h: Export prototypes for
libhal_volume_crypto_get_clear_volume_udi and
libhal_volume_crypto_get_backing_volume_udi
* libhal-storage/libhal-storage.c:
(libhal_volume_crypto_get_clear_volume_udi): New function
(libhal_volume_crypto_get_backing_volume_udi): New function
* ChangeLog: fix my commit entry for 2006-02-19 - missed changes to
hald/hald_runner.c
Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- libhal-storage.c 18 Feb 2006 22:30:58 -0000 1.30
+++ libhal-storage.c 22 Feb 2006 06:35:09 -0000 1.31
@@ -716,6 +716,7 @@
dbus_bool_t ignore_volume;
+ char *crypto_backing_volume;
char mount_options[MOUNT_OPTIONS_SIZE];
};
@@ -777,6 +778,7 @@
libhal_free_string (vol->uuid);
libhal_free_string (vol->desired_mount_point);
libhal_free_string (vol->mount_filesystem);
+ libhal_free_string (vol->crypto_backing_volume);
free (vol);
}
@@ -1054,6 +1056,8 @@
LIBHAL_PROP_EXTRACT_STRING ("block.storage_device", vol->storage_device);
+ LIBHAL_PROP_EXTRACT_STRING ("volume.crypto_luks.clear.backing_volume", vol->crypto_backing_volume);
+
LIBHAL_PROP_EXTRACT_INT ("volume.block_size", vol->block_size);
LIBHAL_PROP_EXTRACT_INT ("volume.num_blocks", vol->num_blocks);
LIBHAL_PROP_EXTRACT_STRING ("volume.label", vol->volume_label);
@@ -1516,6 +1520,42 @@
return result;
}
+const char *
+libhal_volume_crypto_get_backing_volume_udi (LibHalVolume *volume)
+{
+ return volume->crypto_backing_volume;
+}
+
+char *
+libhal_volume_crypto_get_clear_volume_udi (LibHalContext *hal_ctx, LibHalVolume *volume)
+{
+ DBusError error;
+ char **clear_devices;
+ int num_clear_devices;
+ char *result;
+
+ result = NULL;
+
+ LIBHAL_CHECK_LIBHALCONTEXT (hal_ctx, NULL);
+
+ dbus_error_init (&error);
+ clear_devices = libhal_manager_find_device_string_match (hal_ctx,
+ "volume.crypto_luks.clear.backing_volume",
+ volume->udi,
+ &num_clear_devices,
+ &error);
+ if (clear_devices != NULL) {
+
+ if (num_clear_devices >= 1) {
+ result = strdup (clear_devices[0]);
+ }
+ libhal_free_string_array (clear_devices);
+ }
+
+ return result;
+}
+
+
/*************************************************************************/
char *
Index: libhal-storage.h
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- libhal-storage.h 15 Jan 2006 16:54:05 -0000 1.15
+++ libhal-storage.h 22 Feb 2006 06:35:09 -0000 1.16
@@ -279,6 +279,10 @@
const char *libhal_volume_get_uuid (LibHalVolume *volume);
const char *libhal_volume_get_storage_device_udi (LibHalVolume *volume);
+const char *libhal_volume_crypto_get_backing_volume_udi (LibHalVolume *volume);
+char *libhal_volume_crypto_get_clear_volume_udi (LibHalContext *hal_ctx, LibHalVolume *volume);
+
+
dbus_bool_t libhal_volume_disc_has_audio (LibHalVolume *volume);
dbus_bool_t libhal_volume_disc_has_data (LibHalVolume *volume);
dbus_bool_t libhal_volume_disc_is_blank (LibHalVolume *volume);
- Previous message: hal/volume_id cramfs.c, 1.6, 1.7 ext.c, 1.7, 1.8 fat.c, 1.10,
1.11 hfs.c, 1.7, 1.8 highpoint.c, 1.8, 1.9 hpfs.c, 1.6,
1.7 iso9660.c, 1.8, 1.9 isw_raid.c, 1.6, 1.7 jfs.c, 1.7,
1.8 linux_raid.c, 1.8, 1.9 linux_swap.c, 1.7, 1.8 lsi_raid.c,
1.5, 1.6 lvm.c, 1.8, 1.9 mac.c, 1.8, 1.9 minix.c, 1.5,
1.6 msdos.c, 1.7, 1.8 ntfs.c, 1.8, 1.9 nvidia_raid.c, 1.5,
1.6 ocfs.c, 1.2, 1.3 promise_raid.c, 1.5, 1.6 reiserfs.c, 1.9,
1.10 romfs.c, 1.7, 1.8 silicon_raid.c, 1.5, 1.6 sysv.c, 1.7,
1.8 udf.c, 1.7, 1.8 ufs.c, 1.7, 1.8 via_raid.c, 1.5,
1.6 volume_id.c, 1.13, 1.14 volume_id.h, 1.13, 1.14 vxfs.c,
1.2, 1.3 xfs.c, 1.7, 1.8
- Next message: hal ChangeLog,1.817,1.818
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the hal-commit
mailing list