]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libsmartcols: don't print empty output on empty table in JSON
authorKarel Zak <kzak@redhat.com>
Mon, 7 Sep 2020 09:52:13 +0000 (11:52 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Sep 2020 09:52:13 +0000 (11:52 +0200)
commitf29a2cfbe18ecc165f188b2df572be01a74e1ec5
tree9242b858e5522d37d1318d479aefe8d6e1fc157f
parentf9de18f54a7b78b4617831c6154beda54fb8e23c
libsmartcols: don't print empty output on empty table in JSON

old version:
 $ findmnt --json --type foo
 $

new version:
 $ findmnt --json --type foo
 {
    "filesystems": [
    ]
 }

Addresses: https://github.com/karelzak/util-linux/issues/1136
Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/src/print-api.c