hrev56235 adds 2 changesets to branch 'master'
old head: 3571cd8a6b9926007a6ac1fdefa9a46c4c0caaec
new head: 0db74b55dc721a50c9d1eed551f9b98b91d49837
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=0db74b55dc72+%5E3571cd8a6b99
----------------------------------------------------------------------------
374a3a07a137: libtracker: don't try to fix permissions on read-only volumes
* instead try to guess the type, find the app, and launch the app with the
document refs.
* fix #5783
Change-Id: Icd25a81ff28038fec0494045390edc6271433b07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5425
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
0db74b55dc72: btrfs: fix SMAP violation, reading inline uncompressed data
should fix for #17061
Change-Id: I5973be6c443e8cf4460c6a3aca7b5378e90d717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5426
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
[ Jérôme Duval <jerome.duval@xxxxxxxxx> ]
----------------------------------------------------------------------------
2 files changed, 23 insertions(+), 4 deletions(-)
src/add-ons/kernel/file_systems/btrfs/Inode.cpp | 7 ++++---
src/kits/tracker/FSUtils.cpp | 20 +++++++++++++++++++-
############################################################################
Commit: 374a3a07a1373161ceae7fa975eafdee66dbfeaa
URL: https://git.haiku-os.org/haiku/commit/?id=374a3a07a137
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Thu Jun 30 15:28:42 2022 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Thu Jun 30 15:47:08 2022 UTC
Ticket: https://dev.haiku-os.org/ticket/5783
libtracker: don't try to fix permissions on read-only volumes
* instead try to guess the type, find the app, and launch the app with the
document refs.
* fix #5783
Change-Id: Icd25a81ff28038fec0494045390edc6271433b07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5425
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp
index 27b5689721..5ab526299a 100644
--- a/src/kits/tracker/FSUtils.cpp
+++ b/src/kits/tracker/FSUtils.cpp
@@ -2463,7 +2463,7 @@ FSRecursiveCalcSize(BInfoWindow* window, CopyLoopControl*
loopControl,
if (status != B_OK)
return status;
- (*_runningSize) += statbuf.st_blocks* 512;
+ (*_runningSize) += statbuf.st_blocks * 512;
if (S_ISDIR(statbuf.st_mode)) {
BDirectory subdir(&entry);
@@ -3583,6 +3583,24 @@ _TrackerLaunchDocuments(const entry_ref*, const
BMessage* refs,
error = B_OK;
if (error == B_OK || mimesetIt != 0)
break;
+ if (error == B_LAUNCH_FAILED_EXECUTABLE) {
+ BVolume volume(documentRef.device);
+ if (volume.IsReadOnly()) {
+ BMimeType type;
+ error =
BMimeType::GuessMimeType(&documentRef, &type);
+ if (error != B_OK)
+ break;
+ error = be_roster->FindApp(type.Type(),
&app);
+ if (error != B_OK)
+ break;
+ error = be_roster->Launch(&app, refs,
&team);
+ if (error == B_ALREADY_RUNNING)
+ // app already running, not
really an error
+ error = B_OK;
+ if (error == B_OK || mimesetIt != 0)
+ break;
+ }
+ }
SniffIfGeneric(©OfRefs);
}
############################################################################
Revision: hrev56235
Commit: 0db74b55dc721a50c9d1eed551f9b98b91d49837
URL: https://git.haiku-os.org/haiku/commit/?id=0db74b55dc72
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Thu Jun 30 15:40:51 2022 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Thu Jun 30 15:47:08 2022 UTC
Ticket: https://dev.haiku-os.org/ticket/17061
btrfs: fix SMAP violation, reading inline uncompressed data
should fix for #17061
Change-Id: I5973be6c443e8cf4460c6a3aca7b5378e90d717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5426
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
----------------------------------------------------------------------------
diff --git a/src/add-ons/kernel/file_systems/btrfs/Inode.cpp
b/src/add-ons/kernel/file_systems/btrfs/Inode.cpp
index 8faa9f007c..d6e3fbfd9b 100644
--- a/src/add-ons/kernel/file_systems/btrfs/Inode.cpp
+++ b/src/add-ons/kernel/file_systems/btrfs/Inode.cpp
@@ -269,9 +269,10 @@ Inode::ReadAt(off_t pos, uint8* buffer, size_t* _length)
}
*_length = min_c(extent_data->Size() - diff, *_length);
- if (compression == BTRFS_EXTENT_COMPRESS_NONE)
- memcpy(buffer, extent_data->inline_data, *_length);
- else if (compression == BTRFS_EXTENT_COMPRESS_ZLIB) {
+ if (compression == BTRFS_EXTENT_COMPRESS_NONE) {
+ if (user_memcpy(buffer, extent_data->inline_data, *_length) <
B_OK)
+ return B_BAD_ADDRESS;
+ } else if (compression == BTRFS_EXTENT_COMPRESS_ZLIB) {
char in[2048];
z_stream zStream = {
(Bytef*)in, // next in