summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdformat.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>
* 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>
* fdformat: clear progress message before printing "done"Jakub Wilk2017-06-021-1/+1
| | | | | | | | | | | | Before: Formatting ... done1 After: Formatting ... done Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
* misc: add static keyword to where needed [smatch scan]Sami Kerola2017-02-201-1/+1
| | | | | | | text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be static? 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>
* fdformat: fix block device open raceSami Kerola2015-11-221-4/+2Star
| | | | | | | This fix makes fdformat also to detect if block device is busy, and warn if the device is misaligned. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: grammarize and harmonize the stat error messageBenno Schulenberg2015-02-021-1/+1
| | | | | | | | | The message "stat failed %s" seems to say that stat() failed to do something, or failed to pass a test, but of course it means that the statting of something failed. So say so. Also make two very similar messages equal to this one. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-061-0/+3
| | | | | | | | | 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>
* fdformat: clean up usage()Karel Zak2014-07-291-10/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdformat: Add new switches -f/--from, -t/--to, -r/--repairJaromir Capik2014-07-291-64/+146
| | | | | | | | | This commit introduces a support for user configurable from/to track and a basic repair mode for broken floppies. It also fixes a recently introduced bug that causes a line breakage when printing the track number. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdformat: match variable and print format typesSami Kerola2014-07-131-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: check writing to a file descriptor was successfulSami Kerola2013-04-261-1/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use UTIL_LINUX_VERSION everywhereKarel Zak2013-01-251-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* translation: unify file open error messagesSami Kerola2012-07-161-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* translation: unify stat error messagesSami Kerola2012-07-161-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* disk-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: fix uninitialized variableFrancesco Cosoleto2011-09-121-1/+1
| | | | | | Spotted by EKOPath compiler. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdformat: cleanup error messagesKarel Zak2011-07-181-12/+7Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdformat: coding styleSami Kerola2011-07-111-122/+124
| | | | | | Reindent the file to match with README.devel instructions. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: include-what-you-use header checkSami Kerola2011-07-111-1/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: use xalloc.hSami Kerola2011-07-111-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: integer comparisons & unused parameterSami Kerola2011-07-111-4/+5
| | | | | | Fix compiler warnings about mismatching types and unused parameter. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: use long optionsSami Kerola2011-07-111-34/+46
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: use libc error printing facilitiesSami Kerola2011-07-111-18/+23
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fdformat: fix memory leak in verify_disk()Cristian Rodríguez2009-10-061-0/+2
| | | | Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
* 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.11t tarball.Karel Zak2006-12-071-6/+3Star
|
* Imported from util-linux-2.11m tarball.Karel Zak2006-12-071-6/+12
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-3/+3
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-1/+4
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-5/+15
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-12/+23
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-1/+11
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-5/+9
|
* Imported from util-linux-2.5 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+109