linux.cのコンパイルエラーとstorage.cの修正 #33

マージ済み
suwako が 5 個のコミットを haturatu/farfetch:master から master へマージ 2024-06-25 20:56:47 +09:00
1個のファイルの変更11行の追加12行の削除
コミット 30c7268063 の変更だけを表示しています - すべてのコミットを表示

ファイルの表示

@ -5,17 +5,16 @@
#include <stdlib.h>
const char *display_storage() {
const char *excode = run_command_s("zpool list 2>/dev/null || echo $?");
if (
excode != NULL && (strncmp(excode, "127", strlen("127")) == 0)) {
free((void *)excode);
return run_command_s("df -h | "
"awk '/^\\/dev\\// {printf \"%s: %s / %s, \", $1, $3, $2}' | "
"awk '{sub(/, $/, \"\"); print}'");
}
const char *excode = run_command_s("zpool list 2>/dev/null || echo $?");
if ( excode != NULL && (strncmp(excode, "127", strlen("127")) == 0)) {
free((void *)excode);
return run_command_s("df -h | "
"awk '/^\\/dev\\// {printf \"%s: %s / %s, \", $1, $3, $2}' | "
"awk '{sub(/, $/, \"\"); print}'");
}
free((void *)excode);
return run_command_s("zpool list | "
"awk 'NR>1 {printf \"%s: %s / %s, \", $1, $3, $2}' | "
"awk '{sub(/, $/, \"\"); print}'");
free((void *)excode);
return run_command_s("zpool list | "
"awk 'NR>1 {printf \"%s: %s / %s, \", $1, $3, $2}' | "
"awk '{sub(/, $/, \"\"); print}'");
}