dev.c: emit usage for devices with unknown mount point
commitfc2f3298da5ad3496ff2ae7c1f6b5b5c4327decd
authorEric Wong <e@80x24.org>
Mon, 20 Jul 2020 03:36:48 +0000 (20 03:36 +0000)
committerEric Wong <e@80x24.org>
Sun, 9 Aug 2020 03:12:31 +0000 (9 03:12 +0000)
tree6e3bde8f3a5d994b94d2b9c0403f3c640b255e4e
parentd7626e6cd2e71ab3587d3facc561187d8f94afa4
dev.c: emit usage for devices with unknown mount point

LUKS + btrfs on Linux gives an .st_rdev value of `0', so we
can't reliably figure out what the "device:" field in
/devXX/usage should be without parsing /proc/partitions.

Since MogileFS::Worker::Monitor only cares about the "used:" and
"total:" fields, we'll just emit "(?)" in the device field.  The
effort of parsing /proc/partitions to correctly display a field
that our only known consumer won't use is a waste of our time.
cmogstored.h
dev.c