From 562a879f7c40bb7586e2d4b8dc55cf3171e5d43d Mon Sep 17 00:00:00 2001 From: Christian Kohlstedde Date: Sun, 22 Feb 2015 18:25:12 +0100 Subject: [PATCH] removing Yoda-Style adding some words in the manpage --- man/i3status.man | 5 +++++ src/print_disk_info.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/man/i3status.man b/man/i3status.man index e11aff5..a2526e9 100644 --- a/man/i3status.man +++ b/man/i3status.man @@ -237,6 +237,11 @@ space is below 2 GiB, it will be colored bad. If not specified, threshold_type is assumed to be "percentage_avail" and low_threshold to be set to 0, which implies no coloring at all. +You can define a different format with the option "format_not_mounted" +which is used if the path is not a mount point. So you can just empty +the output for the given path with adding »format_not_mounted=""« +to the config section. + *Example order*: +disk /mnt/usbstick+ *Example format*: +%free (%avail)/ %total+ diff --git a/src/print_disk_info.c b/src/print_disk_info.c index 4ed2f22..e225923 100644 --- a/src/print_disk_info.c +++ b/src/print_disk_info.c @@ -131,7 +131,7 @@ void print_disk_info(yajl_gen json_gen, char *buffer, const char *path, const ch struct mntent *m; bool found = false; - while (NULL != (m = getmntent(mntentfile))) { + while ((m = getmntent(mntentfile)) != NULL) { if (strcmp(m->mnt_dir, path) == 0) { found = true; break; -- 2.39.2