From b16cba7bb538dfaedeacf486c50f4c2cc3ce4875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 13 Oct 2008 23:49:10 +0000 Subject: [PATCH] * The Tracker now makes use of the new B_DISK_SYSTEM_SUPPORTS_WRITING flag, and will only show the "mount me read-only?" dialog when the file system actually supports writing in the first place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28067 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/AutoMounter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/AutoMounter.cpp b/src/kits/tracker/AutoMounter.cpp index 3d7aa48ab4..b261cd09d8 100644 --- a/src/kits/tracker/AutoMounter.cpp +++ b/src/kits/tracker/AutoMounter.cpp @@ -46,6 +46,7 @@ All rights reserved. # include # include # include +# include # include #endif @@ -199,6 +200,11 @@ AutoMounter::_SuggestMountFlags(const BPartition* partition, isBFS = true; } + BDiskSystem diskSystem; + status_t status = partition->GetDiskSystem(&diskSystem); + if (status == B_OK && !diskSystem.SupportsWriting()) + askReadOnly = false; + if (partition->IsReadOnly()) askReadOnly = false; @@ -529,7 +535,7 @@ AutoMounter::GetSettings(BMessage *message) if (fs_stat_dev(volume.Device(), &info) == 0 && info.flags & (B_FS_IS_REMOVABLE | B_FS_IS_PERSISTENT)) { message->AddString(info.device_name, info.volume_name); - + BString mountFlagsKey(info.device_name); mountFlagsKey << kMountFlagsKeyExtension; uint32 mountFlags = 0;