[gvfs] Automount flash card readers
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Automount flash card readers
- Date: Tue, 3 May 2011 11:54:10 +0000 (UTC)
commit 342ae51fe86663dce07d18a21c9827f8ee7fd131
Author: Ayan George <ayan george canonical com>
Date: Tue May 3 07:16:22 2011 +0200
Automount flash card readers
Check for flash media to also provide automounting for card readers which are
not on the USB bus.
https://bugzilla.gnome.org/show_bug.cgi?id=648980
https://launchpad.net/bugs/759963
Signed-off-by: Martin Pitt <martin pitt ubuntu com>
monitor/gdu/ggduvolume.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/monitor/gdu/ggduvolume.c b/monitor/gdu/ggduvolume.c
index 1633c0d..0665b7a 100644
--- a/monitor/gdu/ggduvolume.c
+++ b/monitor/gdu/ggduvolume.c
@@ -103,6 +103,18 @@ static void gdu_cleartext_volume_job_changed (GduPresentable *presentable,
static void mount_with_mount_operation (MountOpData *data);
+static gboolean
+g_gdu_drive_device_is_flash(GduDevice *drive_device)
+{
+ const gchar *drive_media;
+
+ if (drive_device == NULL)
+ return FALSE;
+
+ drive_media = gdu_device_drive_get_media (drive_device);
+ return g_str_has_prefix (drive_media, "flash");
+}
+
static void
g_gdu_volume_finalize (GObject *object)
{
@@ -388,6 +400,7 @@ update_volume (GGduVolume *volume)
if (g_strcmp0 (connection_interface, "usb") == 0 ||
g_strcmp0 (connection_interface, "firewire") == 0 ||
g_strcmp0 (connection_interface, "sdio") == 0 ||
+ g_gdu_drive_device_is_flash (drive_device) ||
gdu_device_is_optical_disc (drive_device))
{
volume->should_automount = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]