termux-packages/packages/fastfetch/src-modules-disk.c.patch
2022-04-05 09:11:21 +09:00

28 lines
1.1 KiB
Diff

--- a/src/modules/disk.c
+++ b/src/modules/disk.c
@@ -84,13 +84,13 @@
int rootRet = statvfs("/", &fsRoot);
struct statvfs fsHome;
- int homeRet = statvfs("/home", &fsHome);
+ int homeRet = statvfs("@TERMUX_HOME@", &fsHome);
if(rootRet != 0 && homeRet != 0)
{
FF_STRBUF_CREATE(key);
getKey(instance, &key, "", false);
- ffPrintError(instance, key.chars, 0, NULL, &instance->config.diskFormat, FF_DISK_NUM_FORMAT_ARGS, "statvfs failed for both / and /home");
+ ffPrintError(instance, key.chars, 0, NULL, &instance->config.diskFormat, FF_DISK_NUM_FORMAT_ARGS, "statvfs failed for both / and @TERMUX_HOME@");
ffStrbufDestroy(&key);
return;
}
@@ -99,7 +99,7 @@
printStatvfsCreateKey(instance, "/", &fsRoot);
if(homeRet == 0 && (rootRet != 0 || fsRoot.f_fsid != fsHome.f_fsid))
- printStatvfsCreateKey(instance, "/home", &fsHome);
+ printStatvfsCreateKey(instance, "@TERMUX_HOME@", &fsHome);
}
else
{