projects
/
platform
/
upstream
/
udisks2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6be8f89
)
Force ReadOnly to TRUE for optical drives
author
David Zeuthen
<davidz@redhat.com>
Fri, 9 Dec 2011 17:08:35 +0000
(12:08 -0500)
committer
David Zeuthen
<davidz@redhat.com>
Fri, 9 Dec 2011 17:08:35 +0000
(12:08 -0500)
At least do this until the kernel sets the 'ro' property properly.
Signed-off-by: David Zeuthen <davidz@redhat.com>
src/udiskslinuxblock.c
patch
|
blob
|
history
diff --git
a/src/udiskslinuxblock.c
b/src/udiskslinuxblock.c
index
eeb4a4d
..
8d16a27
100644
(file)
--- a/
src/udiskslinuxblock.c
+++ b/
src/udiskslinuxblock.c
@@
-638,6
+638,8
@@
udisks_linux_block_update (UDisksLinuxBlock *block,
udisks_block_set_size (iface, size);
read_only = g_udev_device_get_sysfs_attr_as_boolean (device, "ro");
+ if (!read_only && g_str_has_prefix (g_udev_device_get_name (device), "sr"))
+ read_only = TRUE;
udisks_block_set_read_only (iface, read_only);
/* dm-crypt