hal/libhal-storage libhal-storage.c, 1.33, 1.34 libhal-storage.h, 1.18, 1.19

David Zeuthen david at kemper.freedesktop.org
Fri Mar 10 10:46:18 PST 2006


Update of /cvs/hal/hal/libhal-storage
In directory kemper:/tmp/cvs-serv32750/libhal-storage

Modified Files:
	libhal-storage.c libhal-storage.h 
Log Message:
2006-03-10  David Zeuthen  <davidz at redhat.com>

        Patch from Christian Neumair <chris at gnome-de.org>.

        * hald/linux2/blockdev.c (hotplug_event_begin_add_blockdev): Set
        FALSE for volume.is_mounted_read_only

        * libhal-storage/libhal-storage.c (libhal_drive_from_udi): Extract
        volume.is_mounted_read_only
        (libhal_volume_is_mounted_read_only): New function

        * libhal-storage/libhal-storage.h: Export prototype for
        libhal_volume_is_mounted_read_only()

        * hald/linux2/blockdev.c (blockdev_refresh_mount_state): Set
        volume.is_mounted_read_only

        * doc/spec/hal-spec.xml.in: Document volume.is_mounted_read_only



Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- libhal-storage.c	25 Feb 2006 20:38:23 -0000	1.33
+++ libhal-storage.c	10 Mar 2006 18:46:16 -0000	1.34
@@ -722,6 +722,7 @@
 	char *device_file;
 	char *volume_label; /* may be NULL, is never "" */
 	dbus_bool_t is_mounted;
+	dbus_bool_t is_mounted_read_only; /* TRUE iff is_mounted and r/o fs */
 	char *mount_point;  /* NULL iff !is_mounted */
 	char *fstype;       /* NULL iff !is_mounted or unknown */
 	char *fsversion;
@@ -1108,6 +1109,7 @@
 		LIBHAL_PROP_EXTRACT_STRING ("volume.fstype",             vol->fstype);
 		LIBHAL_PROP_EXTRACT_STRING ("volume.fsversion",             vol->fsversion);
 		LIBHAL_PROP_EXTRACT_BOOL   ("volume.is_mounted",         vol->is_mounted);
+		LIBHAL_PROP_EXTRACT_BOOL   ("volume.is_mounted_read_only", vol->is_mounted_read_only);
 		LIBHAL_PROP_EXTRACT_STRING ("volume.fsusage",            vol_fsusage_textual);
 		LIBHAL_PROP_EXTRACT_STRING ("volume.uuid",               vol->uuid);
 
@@ -1453,6 +1455,12 @@
 }
 
 dbus_bool_t 
+libhal_volume_is_mounted_read_only (LibHalVolume *volume)
+{
+	return volume->is_mounted_read_only;
+}
+
+dbus_bool_t 
 libhal_volume_is_partition (LibHalVolume *volume)
 {
 	return volume->is_partition;

Index: libhal-storage.h
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- libhal-storage.h	25 Feb 2006 20:38:23 -0000	1.18
+++ libhal-storage.h	10 Mar 2006 18:46:16 -0000	1.19
@@ -281,6 +281,7 @@
 const char          *libhal_volume_get_fsversion                 (LibHalVolume     *volume);
 LibHalVolumeUsage    libhal_volume_get_fsusage                   (LibHalVolume     *volume);
 dbus_bool_t          libhal_volume_is_mounted                    (LibHalVolume     *volume);
+dbus_bool_t          libhal_volume_is_mounted_read_only          (LibHalVolume     *volume);
 dbus_bool_t          libhal_volume_is_partition                  (LibHalVolume     *volume);
 dbus_bool_t          libhal_volume_is_disc                       (LibHalVolume     *volume);
 unsigned int         libhal_volume_get_partition_number          (LibHalVolume     *volume);




More information about the hal-commit mailing list