hal/libhal-storage libhal-storage.c, 1.26, 1.27 libhal-storage.h,
1.14, 1.15
David Zeuthen
david at freedesktop.org
Sun Jan 15 08:54:08 PST 2006
Update of /cvs/hal/hal/libhal-storage
In directory gabe:/tmp/cvs-serv31515/libhal-storage
Modified Files:
libhal-storage.c libhal-storage.h
Log Message:
2006-01-15 David Zeuthen <davidz at redhat.com>
* tools/hal-system-storage-mount: Respect volume.ignore and refuse to
mount if set to TRUE
* libhal-storage/libhal-storage.h: Export libhal_volume_should_ignore
as a public method (API addition, no breakage)
* libhal-storage/libhal-storage.c (libhal_volume_should_ignore): New
function.
(libhal_volume_from_udi): Set vol->ignore_volume from property
* fdi/policy/10osvendor/20-storage-methods.fdi: Introduce volume.ignore
as a way for vendors and admins to signify a volume should be ignored.
* fdi/information/10freedesktop/10-usb-card-readers.fdi: Add an entry
for my Firewire card reader (yes, it works perfectly on my PB 12" G4
running Fedora Rawhide - it's fast too.. vroom vroom).
Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- libhal-storage.c 15 Jan 2006 15:33:48 -0000 1.26
+++ libhal-storage.c 15 Jan 2006 16:54:05 -0000 1.27
@@ -714,6 +714,9 @@
char *mount_filesystem;
dbus_bool_t should_mount;
+ dbus_bool_t ignore_volume;
+
+
char mount_options[MOUNT_OPTIONS_SIZE];
};
@@ -1055,6 +1058,8 @@
LIBHAL_PROP_EXTRACT_BOOL ("volume.is_mounted", vol->is_mounted);
LIBHAL_PROP_EXTRACT_STRING ("volume.fsusage", vol_fsusage_textual);
+ LIBHAL_PROP_EXTRACT_BOOL ("volume.ignore", vol->ignore_volume);
+
LIBHAL_PROP_EXTRACT_BOOL ("volume.is_disc", vol->is_disc);
LIBHAL_PROP_EXTRACT_STRING ("volume.disc.type", disc_type_textual);
LIBHAL_PROP_EXTRACT_BOOL ("volume.disc.has_audio", vol->disc_has_audio);
@@ -1454,6 +1459,12 @@
return volume->disc_type;
}
+dbus_bool_t
+libhal_volume_should_ignore (LibHalVolume *volume)
+{
+ return volume->ignore_volume;
+}
+
char **
libhal_drive_find_all_volumes (LibHalContext *hal_ctx, LibHalDrive *drive, int *num_volumes)
{
Index: libhal-storage.h
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- libhal-storage.h 2 Nov 2005 15:38:14 -0000 1.14
+++ libhal-storage.h 15 Jan 2006 16:54:05 -0000 1.15
@@ -288,6 +288,8 @@
int libhal_volume_get_msdos_part_table_type (LibHalVolume *volume);
+dbus_bool_t libhal_volume_should_ignore (LibHalVolume *volume);
+
char *libhal_volume_policy_compute_size_as_string (LibHalVolume *volume);
char *libhal_volume_policy_compute_display_name (LibHalDrive *drive,
More information about the hal-commit
mailing list