X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/0f46c675d326435065dec2dd3a5695bd16201c9f..80fc20d1d69b14f36ad9bb64d8af38481cbf1ff5:/components/disk.c?ds=inline diff --git a/components/disk.c b/components/disk.c index bf69875..f4031ea 100644 --- a/components/disk.c +++ b/components/disk.c @@ -12,7 +12,7 @@ disk_free(const char *mnt) struct statvfs fs; if (statvfs(mnt, &fs) < 0) { - fprintf(stderr, "statvfs '%s': %s\n", mnt, strerror(errno)); + warn("statvfs '%s':", mnt); return NULL; } @@ -26,7 +26,7 @@ disk_perc(const char *mnt) struct statvfs fs; if (statvfs(mnt, &fs) < 0) { - fprintf(stderr, "statvfs '%s': %s\n", mnt, strerror(errno)); + warn("statvfs '%s':", mnt); return NULL; } @@ -40,7 +40,7 @@ disk_total(const char *mnt) struct statvfs fs; if (statvfs(mnt, &fs) < 0) { - fprintf(stderr, "statvfs '%s': %s\n", mnt, strerror(errno)); + warn("statvfs '%s':", mnt); return NULL; } @@ -54,7 +54,7 @@ disk_used(const char *mnt) struct statvfs fs; if (statvfs(mnt, &fs) < 0) { - fprintf(stderr, "statvfs '%s': %s\n", mnt, strerror(errno)); + warn("statvfs '%s':", mnt); return NULL; }