FreeBSD Bugzilla – Attachment 238260 Details for
Bug 265193
sysutils/bsdisks: can't mount ext2/ext3/ext4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch-ext2fs (text/plain), 2.83 KB, created by
Gleb Popov
on 2022-11-22 18:57:56 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Gleb Popov
Created:
2022-11-22 18:57:56 UTC
Size:
2.83 KB
patch
obsolete
>diff -r df5181ffe3cc blockfilesystem.cpp >--- a/blockfilesystem.cpp Mon Jan 17 14:04:22 2022 +0300 >+++ blockfilesystem.cpp Tue Nov 22 21:53:11 2022 +0300 >@@ -1,5 +1,5 @@ > /* >- Copyright 2016 Gleb Popov <6yearold@gmail.com> >+ Copyright 2016-2022 Gleb Popov <6yearold@gmail.com> > > Redistribution and use in source and binary forms, with or without modification, > are permitted provided that the following conditions are met: >@@ -32,6 +32,7 @@ > #include <QDBusConnectionInterface> > #include <QDBusMessage> > #include <QProcess> >+#include <QStandardPaths> > #include <QDir> > > #include <sys/param.h> >@@ -143,7 +144,7 @@ > } > else if(filesystem == "ntfs") > { >- mountProg = QStringLiteral("ntfs-3g"); >+ mountProg = QStandardPaths::findExecutable("ntfs-3g"); > } > else if(filesystem == "cd9660") > { >@@ -151,10 +152,19 @@ > } > else if(filesystem == "ext2fs") > { >- mountProg = QStringLiteral("fuse2fs"); >+ mountProg = QStandardPaths::findExecutable("fuse2fs"); > >- args << QStringLiteral("-o") << (QStringLiteral("uid=") + QString::number(uid)); >- args << QStringLiteral("-o") << QStringLiteral("allow_other"); >+ if (BsdisksConfig::get().PreferNativeExt2 || mountProg.isEmpty()) >+ { >+ mountProg = QStringLiteral("/sbin/mount"); >+ args << QStringLiteral("-t") << QStringLiteral("ext2fs"); >+ args << QStringLiteral("-o") << QStringLiteral("async"); >+ } >+ else >+ { >+ args << QStringLiteral("-o") << (QStringLiteral("uid=") + QString::number(uid)); >+ args << QStringLiteral("-o") << QStringLiteral("allow_other"); >+ } > } > else if(filesystem == "exfat") > { >diff -r df5181ffe3cc bsdisks.conf.sample >--- a/bsdisks.conf.sample Mon Jan 17 14:04:22 2022 +0300 >+++ bsdisks.conf.sample Tue Nov 22 21:53:11 2022 +0300 >@@ -2,3 +2,6 @@ > # Widely used value for Russia: > # mount_msdosfs_flags = -D cp1251 -L ru_RU.UTF-8 > mount_msdosfs_flags = >+ >+# Whether to prefer FreeBSD native ext2 support over FUSE-provided one >+prefer_native_ext2 = false >diff -r df5181ffe3cc bsdisks.h >--- a/bsdisks.h Mon Jan 17 14:04:22 2022 +0300 >+++ bsdisks.h Tue Nov 22 21:53:11 2022 +0300 >@@ -36,6 +36,7 @@ > { > public: > QString MountMsdosfsFlags; >+ bool PreferNativeExt2; > > static BsdisksConfig& get(); > }; >diff -r df5181ffe3cc main.cpp >--- a/main.cpp Mon Jan 17 14:04:22 2022 +0300 >+++ main.cpp Tue Nov 22 21:53:11 2022 +0300 >@@ -122,6 +122,9 @@ > > if(parsed[0].trimmed() == QStringLiteral("mount_msdosfs_flags")) > BsdisksConfig::get().MountMsdosfsFlags = parsed[1].trimmed(); >+ >+ else if(parsed[0].trimmed() == QStringLiteral("prefer_native_ext2")) >+ BsdisksConfig::get().PreferNativeExt2 = parsed[1] != "false"; > } while(!line.isEmpty()); > } > configFile.close();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 265193
: 238260