summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkfs.bfs.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/c: add print_version() macroKarel Zak2019-04-161-8/+2Star
| | | | | | | | | | | Let's consolidate the version printing code. It also seems better to use exit() after --version, because it's handled in different way by ASAN. It's strange, but ASAN reports leaks after return in main(). Note that we do not use free-before-exit. 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: consolidate all --help option descriptionsRuediger Meier2017-06-271-3/+2Star
| | | | | | | | Now we are always using the same text also for commands which had still hardcoded descriptions or where we can't use the standard print_usage_help_options macro. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: never use usage(stderr)Ruediger Meier2017-06-261-10/+16
| | | | | | | Here we fix all cases where we have usage(FILE*) functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* 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>
* mkfs.bfs: allow creating file system to a fileSami Kerola2015-11-221-3/+0Star
| | | | | | | Most, if not all, linux file systems allow this and there should not be a reason why bfs could not do the same. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: fix block device open raceSami Kerola2015-11-221-1/+1
| | | | | | | This fix makes mkfs.bfs also to detect if block device is busy, and warn if the device is misaligned. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* sys-utils/disk-utils/lib: fix printf format types [cppcheck]Boris Egorov2015-06-251-3/+3
| | | | | | Fix 'invalidPrintfArgType' cppcheck warnings Signed-off-by: Boris Egorov <egorov@linux.com>
* 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/+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>
* textual: use manual tail usage() macroSami Kerola2014-10-011-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: fix "behaviour" vs. "behavior"Karel Zak2014-06-061-1/+1
| | | | | | | | Sometimes we use "behaviour" and "behavior" in the same text, let's use "behavior" only everywhere. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068 Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.bfs: fix 64-Bit and endian problemsihno2013-06-131-33/+37
| | | | | | [kzak@redhat.com: - use cpu_to_leXX() macros rather than htoleXX()] Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.bfs: check writing to a file descriptor was successfulSami Kerola2013-04-261-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use UTIL_LINUX_VERSION everywhereKarel Zak2013-01-251-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* translation: unify stat error messagesSami Kerola2012-07-161-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* disk-utils: cleanup strtoxx_or_err()Karel Zak2012-05-151-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* disk-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: add setlocaleDavidlohr Bueso2012-02-221-0/+4
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mkfs.bfs: cleanu p --version outputKarel Zak2011-07-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.bfs: use err() instead of errx()Karel Zak2011-07-181-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.bfs: coding style fixSami Kerola2011-07-111-53/+55
| | | | | | Sync with README.devel Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: include-what-you-use header checkSami Kerola2011-07-111-2/+1Star
| | | | | | The limits.h is added for CHAR_MAX Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: validate numeric user inputsSami Kerola2011-07-111-5/+6
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: use xstrdup from xalloc.hSami Kerola2011-07-111-2/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: add long optionsSami Kerola2011-07-111-25/+46
| | | | | | Includes new usage output. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.bfs: use libc error facilitiesSami Kerola2011-07-111-42/+23Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Remove now unused <sys/ioctl.h> includesGuillem Jover2009-10-091-1/+0Star
| | | | | | Those became unused with the switch to the blkdev functions. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* disk-utils: clean up code, use blkdev_* functionsSamuel Thibault2008-07-241-14/+10Star
| | | | | | | [kzak@redhat.com: split the original patch to small patches] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* disk-utils: let mkfs tools open with O_EXCLMatthias Koenig2007-07-271-1/+1
| | | | | | | | | | | | | Let mkswap, mkfs.bfs, mkfs.minix open with O_EXCL if used on block devices to prevent writing to the device even if they are busy (mounted). Unfortunately, O_EXCL has zero effect for 2.4 kernels where in-kernel code doesn't use O_EXCL-like access locks. (Tested on RHEL3.) Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.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-29/+32
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-1/+4
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-0/+284