summaryrefslogtreecommitdiff
path: root/src/print_disk_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_disk_info.c')
-rw-r--r--src/print_disk_info.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/print_disk_info.c b/src/print_disk_info.c
index b2cbd9c..1ac22d0 100644
--- a/src/print_disk_info.c
+++ b/src/print_disk_info.c
@@ -45,6 +45,9 @@ static void print_bytes_human(uint64_t bytes) {
void print_disk_info(const char *path, const char *format) {
const char *walk;
+ if (output_format == O_I3BAR)
+ printf("{\"name\":\"disk_info\", \"instance\": \"%s\", \"full_text\":\"", path);
+
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct statfs buf;
@@ -83,4 +86,7 @@ void print_disk_info(const char *path, const char *format) {
walk += strlen("avail");
}
}
+
+ if (output_format == O_I3BAR)
+ printf("\"}");
}