From eaccc846f6d7ebb5f38b39909e854febbe572340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Sat, 22 Jun 2024 00:24:24 +0900 Subject: =?UTF-8?q?Linux:=20segfault=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/storage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/storage.c') diff --git a/src/storage.c b/src/storage.c index b43529e..1924acf 100644 --- a/src/storage.c +++ b/src/storage.c @@ -16,8 +16,9 @@ const char *display_storage() { "internal error: failed to initialize ZFS library", strlen("internal error: failed to initialize ZFS library") ) == 0 || - strncmp(iszfs, "sh: zpool: not found", strlen("sh: zpool: not found") - ) == 0) { + strncmp(iszfs, "sh: zpool: not found", strlen("sh: zpool: not found")) == 0 || + strncmp(iszfs, "sh: 1: zpool: not found", strlen("sh: 1: zpool: not found")) == 0 + ) { return run_command_s("df -h | " "awk '/^\\/dev\\// {printf \"%s: %s / %s, \", $1, $3, $2}' | " "awk '{sub(/, $/, \"\"); print}'"); -- cgit v1.2.3