summaryrefslogtreecommitdiffstats
path: root/misc-utils/uuidparse.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* various: fix 'uninitialized when used' warnings [clang]Sami Kerola2019-02-181-1/+1
| | | | | | | This change fixes "warning: variable 'var' may be uninitialized when used here [-Wconditional-uninitialized]" warnings reported in various files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib/timeutils: add common ISO timestamp masksJ William Piggott2017-11-101-9/+3Star
| | | | | | | | | | | | | | | | | | | | | | * Start the ISO format flags at bit 0 instead of bit 1. * Remove unnecessary _8601 from ISO format flag names to avoid line wrapping and to ease readability. * ISO timestamps have date-time-timzone in common, so move the TIMEZONE flag to bit 2 causing all timestamp masks to have the first three bits set and the last four bits as timestamp 'options'. * Change the 'SPACE' flag to a 'T' flag, because it makes the code and comments more concise. * Add common ISO timestamp masks. * Implement the ISO timestamp masks in all applicable code using the strxxx_iso() functions. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* uuidparse:fix stack-buffer-overflow [asan]Karel Zak2017-09-151-3/+2Star
| | | | | Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: cleanup UUID_STR_LEN definitionsKarel Zak2017-09-151-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidparse: nil uuid have all bits set to zeroSami Kerola2017-08-051-1/+4
| | | | | | | | The nil UUID is special form of UUID that is specified to have all 128 bits set to zero. Reference: https://tools.ietf.org/html/rfc4122#section-4.1.7 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: consolidate macro style USAGE_HELP_OPTIONSRuediger Meier2017-06-291-2/+2
| | | | | | | | | changed in include/c.h and applied via sed: sed -i 's/fprintf.*\(USAGE_MAN_TAIL.*\)/printf(\1/' $(git ls-files -- "*.c") sed -i 's/print_usage_help_options\(.*\);/printf(USAGE_HELP_OPTIONS\1);/' $(git ls-files -- "*.c") Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* uuidgen: improve --helpKarel Zak2017-06-291-6/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidparse: se JSON table name on -JKarel Zak2017-06-291-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'help-description' of https://github.com/rudimeier/util-linuxKarel Zak2017-06-271-2/+1Star
|\ | | | | | | | | | | | | | | | | | | * 'help-description' of https://github.com/rudimeier/util-linux: misc: update --help content again login: add --help text blockdev: improve --help and man page misc: consolidate all --help option descriptions misc: introduce print_usage_help_options() misc: revert to the old USAGE_HELP strings
| * misc: introduce print_usage_help_options()Ruediger Meier2017-06-271-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Consolidate --help and --version descriptions. We are now able to align them to the other options. We changed include/c.h. The rest of this patch was generated by sed, plus manually setting the right alignment numbers. We do not change anything but white spaces in the --help output. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | uuidparse: fix getopt crashRuediger Meier2017-06-261-0/+1
|/ | | | | | | | | $ ./uuidparse --unknownopt Segmentation fault (core dumped) Hehe, this is the first real bug found by 'make checkusage'. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* uuidparse: add new commandSami Kerola2017-06-261-0/+354
This command will analyze and print information about UUID's. The command is based on libuuid/src/uuid_time.c but modified to use libsmartcol. [kzak@redhat.com: - minor coding style changes] Reference: http://marc.info/?l=util-linux-ng&m=149735980715600&w=2 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>