From manual page; 'On error, the value MAP_FAILED is returned, and errno
is set appropriately'.
Reference: http://man7.org/linux/man-pages/man2/mmap.2.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
BSD is nested within DOS partition, so for disk without any partition
table it does not make any sense to offer BSD label.
Signed-off-by: Karel Zak <kzak@redhat.com>
It seems overkill to lock directly whole-disk device (for -l) when we use the
lock only to synchronize fsck instances.
It's fsck private business, so don't use system files, but let's use private
/run/fsck/<diskname>.lock file.
Addresses: https://bugs.freedesktop.org/show_bug.cgi?id=79576
Signed-off-by: Karel Zak <kzak@redhat.com>
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>
Most of them catched on 32bit gcc and icc.
disk-utils/fsck.cramfs.c: printf format type
lib/boottime.c: unused variables
misc-utils/cal.c: set but never used
sys-utils/losetup.c: set but never used
sys-utils/lscpu-dmi.c: defined but not used
sys-utils/switch_root.c: comparison between signed and unsigned
tests/helpers/test_sysinfo.c: printf format type
Sfdisk prints out a warning about extended partition not
starting at a cylinder boundary. Since this is irrelevant
for linux, the -L option should suppress this warning.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
We want to clean it up to compile it later per default (not only
if defined INCLUDE_FS_TESTS).
- Rename option --destination to --extract.
- DIR argument is now optional because we want to keep the use
case "test uncompression without writing files" ... but we
don't want it always.
- Remove shortopt -x because shortopts with optional args are
evil.
Changing the cmd interface is no compatibility issue here because
all affected options errored out per default in past.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
We are already fine with checking for different endianess. Now we
also succeed if systems's page size does not match.
Note that page_size is only really used if INCLUDE_FS_TESTS is
defined, see followups.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Both swapon and mkswap need to know what is valid device signature, so
share the value.
[kzak@redhat.com: - use SWAP_SIGNATURE_SZ properly in write_signature()]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
If software archeolgists want to know how the old, and unused, swap
header looked they can dig it from the revision history.
[kzak@redhat.com: - use sizeof() for SWAP_HEADER_SIZE]
Reference: 4c85aa3a4c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
FIXME
Units KB, MB, GB, etc. are ambiguous (not necessarily used here)
Prefixes kilo, mega, giga, etc. are ambiguous with the unit byte (ditto)
Change ' \- ' to ' \(en ' (an en-dash), if it is a dash (pause,
separation)
Change ' - ' to ' \(en ' (an en-dash), if it is a dash (pause,
separation)
Change '\-' to '-' (code "hyphen-minus", rendered with the glyph
hyphen in troff), if it is a part of a compound name.
A minus is not used in words. People using UTF-8 and copy-and-paste
can(?) (may?) use "info", "man --ascii" or the command "man" should
have an option to display the '-' ("hyphen-minus") in names of options
with the code (character name) "hyphen-minus" (u002D) instead of
"u2010" (code (character) name "hyphen").
Change '-' to '\-', if it indicates an option
Protect a full stop (.), that begins or ends a string, with \&
Correct space between sentences to two space characters (or begin
each sentence on a new line).
Change '--' to '\-\-', if it indicates an option
Add \~ (no-break space) around '|' (means "or")
Change ' -- ' to ' \(en ' (an en-dash), if it is a dash (pause,
separation)
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Add a space character around '|' (means "or")
Add "(hyphen-minus)" after "\-" to show character name for input
Change '\-\-' to '\en', when it is used as a dash (pause, separation)
Add a comma before "or" in a series of words (3 or more)
Change '-' to '\(en' (an en-dash), if it means a range
Protect a full stop (.), that begins or ends a string, with \&
Change '--' to '\-\-', if it indicates an option
Change '-' to '\-', if it indicates an option
Change '-' to '\-', if means a minus
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>