Author: freetz                       Date: Thu Jun  1 19:42:33 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- CVS backport,
  http://mail.gnome.org/archives/nautilus-list/2006-March/msg00045.html

---- Files affected:
SOURCES:
   hal-is_mounted_read_only_property.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/hal-is_mounted_read_only_property.patch
diff -u /dev/null SOURCES/hal-is_mounted_read_only_property.patch:1.1
--- /dev/null   Thu Jun  1 21:42:33 2006
+++ SOURCES/hal-is_mounted_read_only_property.patch     Thu Jun  1 21:42:28 2006
@@ -0,0 +1,115 @@
+===================================================================
+RCS file: 
/srv/anoncvs.freedesktop.org/cvs/hal/hal/libhal-storage/libhal-storage.h,v
+rcsdiff: 
/srv/anoncvs.freedesktop.org/cvs/hal/hal/libhal-storage/libhal-storage.h,v: 
warning: Unknown phrases like `commitid ...;' are present.
+retrieving revision 1.18
+retrieving revision 1.19
+diff -u -r1.18 -r1.19
+--- libhal-storage.h   2006/02/25 20:38:23     1.18
++++ hal/libhal-storage/libhal-storage.h        2006/03/10 18:46:16     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);
+===================================================================
+RCS file: /srv/anoncvs.freedesktop.org/cvs/hal/hal/hald/linux2/blockdev.c,v
+rcsdiff: /srv/anoncvs.freedesktop.org/cvs/hal/hal/hald/linux2/blockdev.c,v: 
warning: Unknown phrases like `commitid ...;' are present.
+retrieving revision 1.38
+retrieving revision 1.39
+diff -u -r1.38 -r1.39
+--- blockdev.c 2006/02/24 04:29:06     1.38
++++ hal/hald/linux2/blockdev.c 2006/03/10 18:46:16     1.39
+@@ -228,9 +228,13 @@
+                               /* found entry for this device in /proc/mounts 
*/
+                               device_property_atomic_update_begin ();
+                               hal_device_property_set_bool (dev, 
"volume.is_mounted", TRUE);
++                              hal_device_property_set_bool (dev, 
"volume.is_mounted_read_only",
++                                                            hasmntopt (&mnt, 
MNTOPT_RO) ? TRUE : FALSE);
+                               hal_device_property_set_string (dev, 
"volume.mount_point", mnt.mnt_dir);
+                               device_property_atomic_update_end ();
+-                              HAL_INFO (("  set %s to be mounted at %s", 
hal_device_get_udi (dev), mnt.mnt_dir));
++                              HAL_INFO (("  set %s to be mounted at %s (%s)",
++                                         hal_device_get_udi (dev), 
mnt.mnt_dir,
++                                         hasmntopt (&mnt, MNTOPT_RO) ? "ro" : 
"rw"));
+                               volumes = g_slist_delete_link (volumes, volume);
+                               break;
+                       }
+@@ -247,6 +251,7 @@
+               mount_point = g_strdup (hal_device_property_get_string (dev, 
"volume.mount_point"));
+               device_property_atomic_update_begin ();
+               hal_device_property_set_bool (dev, "volume.is_mounted", FALSE);
++              hal_device_property_set_bool (dev, 
"volume.is_mounted_read_only", FALSE);
+               hal_device_property_set_string (dev, "volume.mount_point", "");
+               device_property_atomic_update_end ();
+               HAL_INFO (("set %s to unmounted", hal_device_get_udi (dev)));
+@@ -924,6 +929,7 @@
+               hal_device_property_set_string (d, "volume.label", "");
+               hal_device_property_set_string (d, "volume.mount_point", "");
+               hal_device_property_set_bool (d, "volume.is_mounted", FALSE);
++              hal_device_property_set_bool (d, "volume.is_mounted_read_only", 
FALSE);
+               hal_device_property_set_bool (
+                       d, "volume.is_disc", 
+                       strcmp (hal_device_property_get_string (parent, 
"storage.drive_type"), "cdrom") == 0);
+===================================================================
+RCS file: /srv/anoncvs.freedesktop.org/cvs/hal/hal/doc/spec/hal-spec.xml.in,v
+rcsdiff: /srv/anoncvs.freedesktop.org/cvs/hal/hal/doc/spec/hal-spec.xml.in,v: 
warning: Unknown phrases like `commitid ...;' are present.
+retrieving revision 1.68
+retrieving revision 1.69
+diff -u -r1.68 -r1.69
+--- hal-spec.xml.in    2006/03/08 05:15:47     1.68
++++ hal/doc/spec/hal-spec.xml.in       2006/03/10 18:46:16     1.69
+@@ -2525,6 +2525,14 @@
+               <entry>This property is TRUE if and only if the volume is 
mounted</entry>
+             </row>
+             <row>
++              <entry><literal>volume.is_mounted_read_only</literal> 
(bool)</entry>
++              <entry></entry>
++              <entry>Yes</entry>
++              <entry>This property is TRUE if and only if the volume is 
mounted and
++              the volume's file-system is read-only.
++              </entry>
++            </row>
++            <row>
+               <entry><literal>volume.mount_point</literal> (string)</entry>
+               <entry>example: /media/compact_flash1  </entry>
+               <entry>Yes (is blank only when volume.is_mounted is 
FALSE)</entry>
+===================================================================
+RCS file: 
/srv/anoncvs.freedesktop.org/cvs/hal/hal/libhal-storage/libhal-storage.c,v
+rcsdiff: 
/srv/anoncvs.freedesktop.org/cvs/hal/hal/libhal-storage/libhal-storage.c,v: 
warning: Unknown phrases like `commitid ...;' are present.
+retrieving revision 1.33
+retrieving revision 1.34
+diff -u -r1.33 -r1.34
+--- libhal-storage.c   2006/02/25 20:38:23     1.33
++++ hal/libhal-storage/libhal-storage.c        2006/03/10 18:46:16     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;
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to