Karel Zak
1ca2661bb8
libsmartcols: Corrected JSON escaping
...
Based on patch set https://github.com/karelzak/util-linux/pull/331
from Fordi.
Addresses: https://github.com/karelzak/util-linux/issues/330
Co-Author: Bryan Elliott <fordiman@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-08-02 12:05:05 +02:00
Karel Zak
6a768b5516
libsmartcols: keep JSON field names lower-case
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-06-05 11:58:42 +02:00
Karel Zak
cca51b9e45
include/carefulputc: encode also ' and $ in fputs_quoted() output
...
This change is important for commands linked with libsmartcols (e.g. lsblk(1))
to make it more safe for crazy scenarios like
eval $(lsblk --fs --pairs /dev/sdb1)
where the command returns NAME="value" from filesystem LABELS (etc.)
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-27 13:36:09 +01:00
Sami Kerola
c6d2d74ea0
include: simplify fputc_careful() in carefulputc.h
...
New version of comparisions does the same thing as the old without being
quite as difficult to understand.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-09-19 19:31:01 +01:00
Benno Schulenberg
459e95f391
include/carefulputc: remove a duplicate include
...
Also tweak a comment.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-05-06 11:09:22 +02:00
Karel Zak
78a3b0af30
include/carefulputc: cleanup and add fputs_{quoted,nonblank}()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:16 +02:00
Sami Kerola
ada6c48f06
include: carefulput: print determined char when unprintable char is found
...
This is done to allow reuse of the functin in last(1).
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-23 10:58:48 +02:00
Karel Zak
48d7b13a1e
Imported from util-linux-2.13-pre1 tarball.
2006-12-07 00:26:54 +01:00