This change fixes all shadow declarations. The worth while to mention
fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16
macro that further expands from include/bits/byteswap.h that has the
shadowing.
libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow]
libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow]
libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow]
libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow]
That could have caused earlier some unexpected results.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Use two separate strings for the two different forms of setarch,
instead of filling in an untranslated word into a single string.
Also use the standard angular brackets for nonliteral arguments.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Commit c372860ddb accidentally removed
the alternative form of setarch in which the command name specifies
the architecture to be set. Also improve some formatting.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Also, the resource option -a is not valid with -i, so show the valid
ones explicitly. Also gettextize the synopsis as a single string, as
the two lines are tightly related and other synopses do this too.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
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>
The function shmctl() has to be called with 'struct shmid_ds', and if
you need 'struct shminfo' then the right way is to cast:
bad way:
struct shm_info info;
shmctl(0, SHM_INFO, &info);
right way:
struct shmid_ds buf;
struct shm_info *info;
shmctl(0, SHM_INFO, &buf);
info = (struct shm_info *) &buf);
The patch also fixes bug in ipc_shm_get_limits() where is missing
lim->shmmax in code based on shmctl().
Signed-off-by: Karel Zak <kzak@redhat.com>
==3218==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa577e2b0 at pc 0x4501f9 bp 0x7fffa577e130 sp 0x7fffa577e108
WRITE of size 112 at 0x7fffa577e2b0 thread T0
#0 0x4501f8 in shmctl /home/users/aadgrand/LLVM/releases/ubuntu/final/llvm.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:2502
#1 0x48bd13 in ipc_shm_get_info /home/travis/build/kerolasa/lelux-utiliteetit/sys-utils/ipcutils.c:157
#2 0x488884 in do_shm /home/travis/build/kerolasa/lelux-utiliteetit/sys-utils/ipcs.c:279
#3 0x4844a8 in main /home/travis/build/kerolasa/lelux-utiliteetit/sys-utils/ipcs.c:175
#4 0x2afb3f8c176c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#5 0x48408c in _start (/home/travis/build/kerolasa/lelux-utiliteetit/ipcs+0x48408c)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
AddressSanitizer is identifying the __asm__ segment as suspicious.
==1215==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000
(pc 0x0000004ccffd bp 0x7fff9b7184f0 sp 0x7fff9b7184e0 T0)
#0 0x4ccffc in vmware_bdoor /home/src/util-linux/sys-utils/lscpu.c:660
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
As per the convention shown in Documentation/howto-man-page.txt.
Also make a few other tiny adjustments along the way.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
kernel does not require mount source (e.g. device name) on remount, it
means that fstab/mtab/mountinfo should be optional in this case.
For example:
mount -o rw,remount /
has to work on system without mounted /proc.
Signed-off-by: Karel Zak <kzak@redhat.com>
Patch add:
--intro-command string : send command to modem
--pause value : define delay between intro command and ldattach
Based on patch from Martin Schmid <scm@aps-systems.ch>
Signed-off-by: Karel Zak <kzak@redhat.com>
there is a theoretical buffer overflow possible in the hypervisor
parsing code of lscpu. It would require a proc entry to return way more
than expected so it's no high priority. But better be safe than sorry.
At first I thought about switching to fgets but there is another
code file that adds a format specifier. The diff is less intrusive
that way, too.
Signed-off-by: Karel Zak <kzak@redhat.com>
__SWORD_TYPE is not available everywhere, for example it's not defined
by musl libc. It also seems that __SWORD_TYPE is not used for f_type
on some architectures (s390x).
Reported-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
A new option was added recently; seize this opportunity to cut the
usage text into small and easily managed chunks.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Reading the code this initialization is not necessary, so the change is
mostly about silencing a compiler warning and ensuring the program keeps
on working if there is a future bug that could make uninitialized 'path'
reachable to use.
sys-utils/fstrim.c:247: warning: 'path' may be used uninitialized in this
function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
To facilitate the calculation of 'cold' vs 'warm' Hardware Clock drift
factor the limit on the update period needs to be less than 8 hours.
4 hours should be enough drift to allow calculations that are not
grossly out of range.
For example, with a workstation that is shutdown every night the cold
drift factor can be significantly different than a drift factor based on
a 24 hour period.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
The new option allows to specify swap options by fstab compatible
string. The concept is the same as for mount(8).
swapon -o pri=1,discard=pages,nofail /dev/sda2
The advantage is that tools (like systmed) that parses fstab can call
swapon without translation from fstab options to swapon(8) command
line options.
Signed-off-by: Karel Zak <kzak@redhat.com>
There are cases where we need to refresh the
timestamps in the adjtime file without updating the
drift factor.
For example, with ntpd and an Eleven Minute Mode
kernel, we need to call systohc at shutdown to
facilitate drift correction. With the current
behavior hwclock will clobber the drift factor to
near zero, because the Hardware Clock and System
Clock are synced by Eleven Minute Mode. What
actually needs to be done is refresh the adjtime
file timestamps and not calculate a new drift
factor.
Because it is a manual process to craft a good
Hardware Clock drift factor, that is, there is no
automated method that will produce a good drift
factor, this patch changes the default drift
calculation behavior to off, and it is turned on
by using the --update-drift option. Once we have a good
drift factor for a given machine we do not want
anything clobbering it, including an administrator
forgetting to turn off recalculation. A system
administrator should make a concious effort in
telling hwclock with the --update-drift option that
(s)he wants to recalculate the drift factor.
Without using the --update-drift option with calibrate
operations only the timestamps are refreshed in
the adjtime file. With the --update-drift option the old
default behavior of refreshing the timestamps and
updating the drift factor is performed.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
When hctosys is used at boot time, making it the
first caller of settimeofday, the responsibility
of setting persistent_clock_is_local is thrust
upon it. Currently hctosys always leaves this
variable uninitialized. This causes a Hardware
Clock configured to use the local timescale to be
clobbered with the UTC timescale by the kernel's
NTP eleven minute mode.
This patch fixes this hctosys bug, by having it
properly set persistent_clock_is_local according
to the time scale configured for the Hardware
Clock.
It does this via the kernel warp_clock function
but this in inconsequential, because we set the
system time immediately afterward.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Allowing hctosys to drift compensate facilitates:
More precise setting of the System Clock early in
the boot process when --adjust cannot be used
because the file system is not writeable.
Applies sub second drift corrections immediately,
where as --adjust cannot.
Reduces boot time by not calling hwclock multiple
times, e.g., --hctosys early before fsck when the
file system is read-only, then --adjust later when
the file system is read-write and --hctosys again
for drift correction.
Use of --adjust elsewhere may no longer be
necessary.
Part II
After the original submission of this patch I
realized that now all operations except --systz
require drift corrected Hardware Clock time.
Therefore, it should be done only once early in
the process. Upon implementation of that premise
many improvements were facilitated:
* Adds drift correction to --hctosys.
* Adds setting system time with sub-second precision.
* Adds --get, a drift corrected 'show' operation.
* Improves drift factor calculation precision while
greatly simplifying its algorithm.
* Fixes --show bug, printing integer sub-seconds, and
now uses a more intuitive positive value.
* Fixes --predict bug, drift correction must be
negated to predict future RTC time.
* Reduces the number of function arguments and
lines of code.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
If offset (range[0]) is greater than device size (blksize), the variable 'end'
will be greater than blksize, and range[1] (length) will be recalculated.
The underflow happens when subtracting range[0] (offset) from blksize, thus
range[1] will be the result of an underflow. The bug leads to unwanted behavior
from the program, where range[1] is likely to be a high number and then will
discard a considerable amount of blocks from the device. The fix consists of
exitting the program with an error message when the condition stated above is
true. Spotted while auditing the code.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
This patch reverts Sami's "timeout cannot be zero", introduced
in commit 605325b23b.
The --timeout 0 has been originally interpreted as --nonblock. The
patch also add hint about this behavior to the man page.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1149974
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock.c:1219:13: warning: using integer absolute value function
'abs' when argument is of floating point type [-Wabsolute-value]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Translating these text elements should happen only once, which is
more likely when the text macros are used properly.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
In usage texts each word that is an argument should be marked
separately with angular brackets. Also add a translator comment.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* 'misc' of git://github.com/kerolasa/lelux-utiliteetit:
textual: share crypt() error message in sulogin and newgrp
newgrp: avoid use of obsolete getpass() function
newgrp: use libc function to read gshadow if it is available
setarch: use personality() system call when it is available
setarch: reindent code
hwclock: remove referal to deprecated keyboard interface
eject: make open_device() and select_speed() to use struct eject_control
eject: add struct eject_control to remove global variables
mountpoint: simplify if statement
mkfs.minix: fix couple compiler warnings
mountpoint: add struct mountpoint_control
last: improve code readability by renaming variable names
last: make is_phantom() when kernel config does not include audit support
lib: remove xgetpass()
include: simplify fputc_careful() in carefulputc.h
libuuid: add extern qualifiers to uuid/uuid.h system header
* 'renice' of git://github.com/kerolasa/lelux-utiliteetit:
renice: reorder usage() option descriptions
rename: add getpriority() message lookup table
renice: fix numeric uid argument parsing
renice: avoid having same lines of code twice
renice: disallow --priority <arg> without pid argument
rename: use usage and version print out macros
renice: reorder functions to avoid need of function prototype
swapon - requires libmount and libblkid
swapoff - requires libmount
swaplabel - requires libblkid
This patch add lib/swapprober.c with blkid stuff for swap. It allows
to use and link libblkid only when necessary.
Signed-off-by: Karel Zak <kzak@redhat.com>
Make the Usage: and Options: sections to be in same order, which I found
to be quicker to use than alphabetical order.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The following was inconflict with what usage() tells are valid option
arguments.
$ renice 1 -u 1000
renice: unknown user 1000
$ id
uid=1000(kerolasa) ...
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Earlier a lonely priority with an argument but without pid resulted to no
action and success, when the invocation should have failed.
$ renice --priority 42 ; echo $?
0
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Returning straight after print_devno() makes the code to be more obvious
and removes need for long else statement.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
CppCheck founds a few wrong arguments in format strings and a NULL
pointer dereference.
Amended version with fixed strcmp() usage.
Signed-off-by: Boris Egorov <egorov@linux.com>
fef4dfa174 removed the restriction that the argument must explicitly be
a directory, so let's fix up the documentation to reflect that.
Signed-off-by: Karel Zak <kzak@redhat.com>
This code is not PIC clean which means it fails to build on hardened
32bit x86 systems (i.e. building as PIE).
While here, optimize the existing cpuid logic slightly.
URL: https://bugs.gentoo.org/518936
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Use of --algorithm or --streams is not expected to work without
reseting device, that happens when --size is specified, so ensure the
former options to be combined with the later.
[kzak@redhat.com: - make it more generic]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Now it's possible to set UID and GID for user namespaces only. This
patch removes this restriction and allow to use --set{uid,gid} in all
cases. The default for user namespaces is still GID=0, UID=0.
Reported-by: Tomas Doran <bobtfish@bobtfish.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
Also sort the options alphabetically, and use the standard comma
instead of the vertical bar to separate short from long option.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This fixes the following compiler warning.
disk-utils/swaplabel.c:175:2: warning: implicit declaration of function
'get_swap_prober' [-Wimplicit-function-declaration]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
The xiafs filesystem was removed from the kernel fifteen years ago,
and any kernel that contained it reached end of life ten years ago.
It's time to stop mentioning it in the mount man page and elsewhere.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Also sort the command-line options alphabetically
(with the customary exception of -V and -h).
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Mainly more option sorting, some formatting adjustments, and the adding
of a missing --version here and there.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* remove the huge and unmaintained list of filesystems, just keep
only very basic FS types in the man pages
* add info about command delimited lists to fstab.5
Signed-off-by: Karel Zak <kzak@redhat.com>
# mkfs.ext4 /dev/sda1
# mount -t foo,bar /dev/sda1 /mnt
successfully mount the device, this is unexpected as extN is no
between wanted (by -t specified) filesystems.
Summary about -t:
* "mount -t foo" mount(2) with "foo" type
* "mount -t foo,bar" try mount(2) with "foo" or "bar"
* "mount -t foo,auto" try mount(2) with "foo" or ask libblkid for
the type
* "mount -t nofoo,bar" try types from /{etc,proc}/filesystems, but
exclude "foo" and "bar"
Note that more filesystems may be specified in fstab (as comma
delimited list). The stuff from fstab is always interpreted as list
and never as a pattern ("no" prefix makes no sense in fstab).
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
The swapon(8) listing was almost complete, apart from label and uuid.
This change moves the code from swaplabel(8) to shared scope to be used
for printouts in other swap commands, such as swapon.
Adding this feature to lsblk(8) was a consideration, but lsblk is not
interested of swapfiles, so the swapon seems like a better option to add
this information.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Also, for chcpu, the options -c, -d, -e and -g are mutually exclusive,
and for the mode argument the option -p is not optional. For ldattach,
use the standard options separator ", " instead of the unusual " | ".
And add the missing --version to several of the pages. Besides, improve
the wording and the consistency of the spacing.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Also, for renice, adapt the descriptions to the behaviour: the -g,
-p and -u options do not actually need to be followed by any ID.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
In the IPC man pages strictly adhere to the memory, queue, semaphore
order, to reduce disorientation. And for 'ipcmk', the arguments for
-M and -S and -p are not optional. Add --version for 'mountpoint'.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Where POSIX_FADV_SEQUENTIAL and HAVE_POSIX_FADVISE are not available it
is waste of resources to have variables that are meaningful only for
posix_fadvise(). Also initialize the variables immediately to correct
values, and since cachesz is never changed mark it read only.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The getgroups() can return up to NGROUPS_MAX supplementary groups, that
is (since kernel 2.6.3) 65536 in total. The git_t is 4 bytes, so maximum
request is 256 kilobytes. When a system happen to have memory preasure
alloca() may not be able to allocate enough memory, making debugging
unnecessarily difficult. IMHO 64 pages is significant enough amount of
memory to be properly error checked at a time of allocation.
Reference: http://www.gnu.org/software/libc/manual/html_node/Disadvantages-of-Alloca.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit makes partitions and files to have remaining three columns
aligned. Below print out demonstrates earlier misalignment.
$ swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 4194300 0 3
/home/src/util-linux/newswap file 496 0 -1
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Well, let's copy & past from fallocate(2) syscall man page rather than
try to be creative with another description for the flags.
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
If less than 23 hours have passed since the last calibration, hwclock
says "Not adjusting drift factor because it has been less than a day since
the last calibration.", but in fact compares to 23 hours, not 24.
This was originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689534
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
POSIX exit code is only 8-bit, and since umount sums up error
codes, it can sometimes report success (exit code 0) even though
a number of operations failed.
For example, running, in an empty directory:
umount `seq 1 7`
returns 224 (7*32), since none of the 7 mount point exists but
umount `seq 1 8`
returns 0 (8*32=256)
This patch clips the return value to 255.
Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
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>
* 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux:
lscpu: improve vmware detection
tests: add lscpu IBM pSeries test data
lscpu: detect OS/400 and pHyp hypervisors
tests: add vbox lscpu dump
lscpu: minor cleanup and improve hypervisor detection
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
This patch comes from openSUSE / SLE. Original author was probably
Petr Uzel.
Internal SUSE references: fate310255, sr226509
VMmware backdoor assembler code has been fixed for old clang compiler
(travis), see
see http://llvm.org/bugs/show_bug.cgi?id=9379
CC: Stanislav Brabec <sbrabec@suse.cz>
CC: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This patch comes originally from openSUSE / SLE. Author was probably
Petr Uzel.
Internal SUSE references: fate310255, sr226509
In comparison to the original patch we have slightly corrected iSeries
and pSeries detection according to Alexander Graf's comments on
util-linux@vger.kernel.org. Maybe we would need to add some more code
to detect pSeries emulated by Qemu/KVM.
CC: Stanislav Brabec <sbrabec@suse.cz>
CC: Petr Uzel <petr.uzel@suse.cz>
CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
- add HYPER_VBOX
- improve HYPER_VMWARE
This patch comes from openSUSE / SLE. Original author was probably
Petr Uzel.
Internal SUSE references: fate310255, sr226509
CC: Stanislav Brabec <sbrabec@suse.cz>
CC: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
losetup ignores the EBUSY error. In the loop fo A_CREATE action, it skips
the error handling when errno = EBUSY. It's OK for the case where no loop
device is specified, but the error has to be handled when the device is given
explicitly.
Author: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
There are some uname26 binaries flying around. Let's make it available
everywhere.
Internal SUSE references: fate313476, sr226509
CC: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Assumption is there are not many who need this tool. Whom ever they
might be the recommendation is to use the command from old util-linux
release. Second reason to removal is difficulty to test hardware
specific command when none of the active project members does not seem to
have such. Basically the command has reached dead end what comes to
maintainability of it.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Due to bug in older versions of hwclock, /etc/adjtime can contain
excessive drift value (up to many years per day). Prevent it
from applying.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Failure of CMOS battery can cause writing of excessive drift
values (up to many years per day).
This causes excessive hwclock adjustment next time, which may lead
to overflow in calculate_adjustment() (and hang before 4a44a54b).
Prevent this situation, check drift for limits and reset drift to zero
instead.
Steps to reproduce:
mv /etc/adjtime /etc/adjtime.backup
rm /etc/adjtime
hwclock --set --date 2001-01-01\ 01:00:00
changing of /etc/adjtime.
mv /etc/adjtime /etc/adjtime.saved
hwclock --set --date 2001-01-02\ 01:00:01
mv /etc/adjtime.saved /etc/adjtime
echo "======= The /etc/adjtime has a \"correct\" look:"
cat /etc/adjtime
hwclock --debug --systohc --utc
echo "======= The /etc/adjtime now has deeply failed drift value:"
cat /etc/adjtime
mv /etc/adjtime /etc/adjtime.saved
hwclock --set --date 2015-01-01\ 01:00:00
mv /etc/adjtime.saved /etc/adjtime
hwclock --debug --adjust
echo "======= And the last /etc/adjtime:"
cat /etc/adjtime
mv /etc/adjtime.backup /etc/adjtime
hwclock --systohc --utc
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
This commit:
commit 05cef8eafb
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Apr 13 20:54:59 2013 +0100
setpriv: check writing to a file descriptor was successful
broke --selinux-label. It checks whether fsyncing /proc/self/attr/exec
succeeds, and it doesn't, because fsync isn't supported on that file.
I have stealthily improved the error message as part of this fix.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
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>
It will be better to support colors customization than use
ugly blue color. BTW, for example git-log uses brow/yellow too
by default.
This reverts commit 0b6fbc2599.
Recent Linux kernel supports FALLOC_FL_ZERO_RANGE in fallocate(2).
This patch adds FALLOC_FL_ZERO_RANGE support to fallocate utility,
by introducing a new option -z|--zero-range.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Introduce a new option -c (or --collapse-range) to support a new flag
FALLOC_FL_COLLAPSE_RANGE for fallocate(2). It will nullify a particular
range [offset, offset+len] by shifting extents beyond the range to the
beginning of the hole.
Cc: Lukas Czerner <lczerner@redhat.com>
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Cc: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
* systemd (since v209) uses only one library (when compiled
without --enable-compat-libs)
* all systemd build-sys stuff is merged into HAVE_SYSTEMD
(automake) and HAVE_LIBSYSTEMD (C macro) now
* all is controlled by --with-systemd, default is to automatically
check for systemd libs
* no more --enable-socket-activation and --enable-journald
Signed-off-by: Karel Zak <kzak@redhat.com>
I forgot to add the patch to the attachment.
Additional changes to "Changes:"
" \(em " changed to " \(en ", as the em-dash with a word space on each
side is to long (troff)
".na/.ad" is not used but .nf/.fi for a long command line and it is
split into two lines
Word "illegal" is changed to "invalid"
Word "hyphen-separated" is changed to '"hyphen-minus"-separated' as
the meaning is the code and not the glyph (on the command line) (beware
of UTF-8)
--
Bjarni I. Gislason
fstab:
UUID=nonexist /mnt/nonexist1 ext4 nofail 0 1
# mount -av
mount: can't find UUID=nonexist
.. this is bug of course.
Reported-by: Patrick McLean <chutzpah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Now the "nofail" affects warnings warning messages only. That's wrong
and regression (against original non-libmount version). The nofail has
to control return code too.
Reported-by: Patrick McLean <chutzpah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
As of linux 3.14, the initramfs device will have both major and
minor 0, causing our paranoia check to fail. Make this version agnostic
by checking the filesystem type, rather than a device number.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* rename flags functions to scols_table_enable_*
* rename *_no_foo() functions to _nofoo()
* output formats are mutually exclusive, so don't use flags there
* don't assume symbols in scols_new_table(), use scols_table_set_symbols()
Signed-off-by: Karel Zak <kzak@redhat.com>
This patch comes originally from Jan Kara <jack@suse.cz> and updates
the default behaviour of the kernel which has been changed some years
ago. See kernel docs
Documentation/filesystems/ext3.txt
Documentation/filesystems/ext4.txt
* 'fix-ipcs-q-fallback' of https://github.com/rudimeier/util-linux:
travis-ci: abort if make check fails
ipcs: fix memleak in ipc_*_get_info functions
ipcs: fix ipc_sem_get_info fallback case
ipcs: fix ipc_shm_get_info fallback case
ipcs: fix ipc_msg_get_info fallback case
tests: add basic test case for ipcs -m -i n
tests: add basic test case for ipcs -s -i n
tests: add basic test case for ipcs -q -i n
tests: quote generated arguments for ipcrm
ipcs: cleanup jumplabel stlyes
* 'fix-lscpu-cache' of https://github.com/rudimeier/util-linux:
tests: cleanup, remove unused lscpu output
tests: add lscpu dump for ppc cpu with no cache size
lscpu: cleanup, use _PATH_SYS_CPU/NODE
lscpu: don't abort if cache size is unknown
There are systems where the size file does not exist. Most badly even
lscpu -p would abort allthough it does not use the size:
$ lscpu -p
lscpu: error: cannot open
/sys/devices/system/cpu/cpu0/cache/index0/size: No such file or directory
This patch does not abort in this case and prints "unknown size" in
human-readable case. For examle on this qemu pcc test machine:
$ lscpu
Architecture: ppc
CPU op-mode(s): 32-bit
Byte Order: Big Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
Model: Power Macintosh
BogoMIPS: 33.25
L1d cache: unknown size
L1i cache: unknown size
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
The kernel regression (probably v3.4, commit 55725513) introduces a
new errno for O_RDONLY on NFS. Now it returns EBADF rather than EIO.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1078618
Signed-off-by: Karel Zak <kzak@redhat.com>
Since 6728ca10 we are using MS_PRIVATE and MS_REC which are not defined
in some systems's sys/mount.h.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>