btop: patch to move the log file to tmpfs

The log file path is hardcoded as $HOME/.local/state/btop.log, i.e. to the router’s flash storage rather than to tmpfs. This patch sets the log file path to /tmp/log/btop.log

Signed-off-by: XCas13 <xcas13@gmail.com>
This commit is contained in:
XCas13
2026-02-08 11:26:05 +04:00
committed by Hannu Nyman
parent b8aa4a1f9c
commit 7c3e376967
2 changed files with 15 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=btop PKG_NAME:=btop
PKG_VERSION:=1.4.6 PKG_VERSION:=1.4.6
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL=https://codeload.github.com/aristocratos/btop/tar.gz/v$(PKG_VERSION)? PKG_SOURCE_URL=https://codeload.github.com/aristocratos/btop/tar.gz/v$(PKG_VERSION)?

View File

@@ -0,0 +1,14 @@
--- a/src/btop_config.cpp
+++ b/src/btop_config.cpp
@@ -800,10 +800,7 @@ namespace Config {
if (xdg_state_home_ptr != nullptr) {
xdg_state_home = std::make_optional(fs::path(xdg_state_home_ptr));
} else {
- const auto* home_ptr = std::getenv("HOME");
- if (home_ptr != nullptr) {
- xdg_state_home = std::make_optional(fs::path(home_ptr) / ".local" / "state");
- }
+ xdg_state_home = std::make_optional(fs::path("/tmp/log"));
}
}