summaryrefslogtreecommitdiffstats
path: root/disk-utils/isosize.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-3/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* isosize: usage() and coding style cleanupKarel Zak2017-08-211-13/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* isosize: iterate over all arguments even when something failsKarel Zak2017-08-211-13/+28
| | | | | | | | | | Earlier the command exit too early if one of the arguments failed. After this change all arguments are examined, and command return value will have information what happen during processing. Based on patch from Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* 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>
* 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>
* misc: never use usage(stderr)Ruediger Meier2017-06-261-5/+8
| | | | | | | Here we fix all cases where we have usage(FILE*) functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* isosize: avoid reading more data than what is neededSami Kerola2017-06-141-47/+10Star
| | | | | | | | | | | In same go fix error reporting when input file is not long enough. $ touch empty $ isosize empty isosize: empty: might not be an ISO filesystem isosize: read error on empty: Success Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: do not use plain 0 as NULL [smatch scan]Sami Kerola2017-02-201-5/+5
| | | | | | | | | | text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Use --help suggestion on invalid optionKarel Zak2016-12-191-1/+1
| | | | | | | | The current default is to print all usage() output. This is overkill in many case. Addresses: https://github.com/karelzak/util-linux/issues/338 Signed-off-by: Karel Zak <kzak@redhat.com>
* isosize: fix read() result checkKarel Zak2016-10-041-1/+1
|
* isosize: don't ignore read() result [coverity scan]Karel Zak2016-10-041-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* isosize: stop unmeaningful printing errno messageSami Kerola2016-03-141-1/+1
| | | | | | | | | | | Earlier printout had strange looking 'Success'. $ isosize --sectors /dev/urandom isosize: /dev/urandom: might not be an ISO filesystem isosize: 733error: le=-1971599244 be=1633181607: Success ... Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-061-0/+4
| | | | | | | | | This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* isosize: make --divisor to require argumentSami Kerola2014-02-171-1/+1
| | | | | | Silly bug, only the short option -d allowed divisor argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: move file name printing after error determinationSami Kerola2014-02-171-6/+5Star
| | | | | | | | | | | | Earlier the filename printing was buffered, and exit at error made output to appear in front of prompt. Output below demonstrates the brokenness. prompt> isosize /etc / isosize: /etc: might not be an ISO filesystem isosize: read error on /etc: Is a directory /etc: prompt> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: improve an error message and a help textBenno Schulenberg2013-01-301-4/+4
| | | | | | | * disk-utils/isosize.c: Improve grammar of error message, and in the help text make use of the standard angular brackets for arguments. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* isosize: inform if file does not look like iso file systemSami Kerola2012-12-191-0/+10
| | | | | | | | $ isosize /dev/urandom isosize: /dev/urandom: might not be iso file system -67690643227260 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: fix usage() -h option print outSami Kerola2012-12-191-10/+11
| | | | | | | Fixes usage() bug from commit 4eba43a7 which claimed sort option for --help being -H. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* translation: unify file open error messagesSami Kerola2012-07-161-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Fix typos found by misspellingsBernhard Voelker2012-04-231-1/+1
| | | | | | | | | | | | | | | The tool misspellings (https://github.com/lyda/misspell-check) detected several typos. Command used: $ git ls-files | grep -v ^po/ | misspellings -f - * isosize: Fix typo in usage string. * configure.ac: Fix typo in help string of --enable-most-builds option. * fdisk: Fix typo in man page. * libblkid, blkid, mount: Likewise. * Fix various typos in docs and in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* disk-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: fix coding styleSami Kerola2011-06-301-84/+83Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: include-what-you-use header checkSami Kerola2011-06-301-1/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: check user input to be numericSami Kerola2011-06-301-3/+6
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: use long optionsSami Kerola2011-06-301-15/+24
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: remove global variablesSami Kerola2011-06-301-11/+8Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* iosize: fix gcc warningKarel Zak2011-04-121-1/+0Star
| | | | | | | isosize.c: In function ‘main’: isosize.c:168:8: warning: unused variable ‘p’ Signed-off-by: Karel Zak <kzak@redhat.com>
* elvtune, isosize: print usage text in case of invalid optionFrancesco Cosoleto2011-04-121-5/+11
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* isosize: use program_invocation_short_nameFrancesco Cosoleto2011-04-121-7/+3Star
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* isosize: simplify some error messagesFrancesco Cosoleto2011-04-121-18/+9Star
| | | | | | | perror() and fprintf() are replaced with err() calls Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* elvtune, isosize: remove redundant message in case of invalid optionFrancesco Cosoleto2011-04-121-2/+0Star
| | | | | | | This leaves getopt() only to print a similar error message on invalid options. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* blockdev: fix: opened file leaving unclosedlizf2007-10-261-0/+2
| | | | Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
* Imported from util-linux-2.13-pre2 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-0/+218