* 'refine-the-choice-of-stream-related-functions-in-usage' of https://github.com/masatake/util-linux:
Make the ways of using output stream consistent in usage()
Use fputs instead of fprintf if possible
* modify samples/fromfile.c to use scols_wrapzero_nextchunk() callback
if "wrapzero" specified for the test colum
* add col-wrapzero and data-string-zero to define the column and zero
separated data
Signed-off-by: Karel Zak <kzak@redhat.com>
The test (sample) binary already supports \n in strings to covert it
to the real line-break. It seem more generic to use \x?? (hex) to
support arbitrary byte in the column data.
Signed-off-by: Karel Zak <kzak@redhat.com>
* add debug messages
* make columns stat debug more compact
* default to zero if data undefined
* fix "extreme" column enlarging
Signed-off-by: Karel Zak <kzak@redhat.com>
* move data wrapping code to column.c
* do data wrapping on one place when copy cell data to buffer
* use table cursor in affected functions
* calculate tree ASCII-art to wrapped data
* mark wrap_chunksize() callback as deprecated; library calculates
the size itself from real data
Signed-off-by: Karel Zak <kzak@redhat.com>
The cursor makes it simple for callbacks to access information about
the current cell, line and column. It will reduce number of necessary
arguments for callbacks.
Signed-off-by: Karel Zak <kzak@redhat.com>
The "safe" encoding replaces each unsafe byte with \x<hex>, the new
function mbs_safe_decoded_size() calculates the original size of the
string.
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'misc/fixes' of https://github.com/t-8ch/util-linux:
meson: don't try to build test_ca without libcap-ng
blkpr: store return value of getopt_long in int
* 'path' of https://github.com/stoeckmann/util-linux:
sys-utils/lscpu: Use ul_path_scanf where possible
lib/path: Set errno in case of fgets failure
lib/path: fix typos
lib/path: remove ul_prefix_fopen
lib/path: set errno in case of error
lib/path: fix possible out of boundary access
Also avoid opening device if nowayout is set.
Opening the device node starts the watchdog.
With 'nowayout' enabled unstoppably.
Also the device node can only be opened once at the same time which can
be problematic.
Prefer to retrieve the information via sysfs which does not have such
problems.
Fixes#2543
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
The test files have been constructed manually from the prober.
While not providing a real test at least they make sure that the
existing logic stays stable.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
In case of an absence /etc/libuser.conf, use empty file by pointing
LIBUSER_CONF to /dev/null. This allows chfn/gecos to pass without error.
PS: The "libuser" library is no longer maintained, and it was recommended
by the original author to not use it anymore.
Commit f98b56326 set the maximum number of iterations to 10000.
If the volume label is after the 10000th entry, the volume label
will not be found. So this commit sets the maximum number of
iterations to correct value 256×1024×1024/32.
Fixes: f98b56326 ("libblkid: [exfat] Limit maximum number of iterations in find_label")
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>