dmesg: don't use pager for --follow

References: https://bugzilla.redhat.com/show_bug.cgi?id=984666
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: change tailing to trailing in *_tailing_comments functions

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libmount: add missing declarations to libmount.h.in and documentation

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
setsid: add an option to wait child return value

This change proposed in util-linux maillist by Damien Wyart in behalf of
Daniel Kahn Gillmor.  Sami Kerola changed the patch to use option rather
than makign the default behavior of the command to change.

Reported-by: Damien Wyart <damien.wyart@gmail.com>
Reference: http://markmail.org/message/2z6qh5auk7wjie3l
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495881
CC: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
more: fix buffer overflow

The bug has been probably introduced by commit
1ac300932deab8dea2c43050921bbbdb36d62ff1.

Reported-by: "Dr. David Alan Gilbert" <dave@treblig.org>
References: https://bugzilla.novell.com/show_bug.cgi?id=829720
Signed-off-by: Karel Zak <kzak@redhat.com>
lscpu: fix shadow declaration [smatch scan]

sys-utils/lscpu.c:572:22: warning: symbol 'fd' shadows an earlier one

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setarch: prefer preprocessor rather than autotools check

It seems to be pointless to spend time in ./configure phase when
preprocessor has to perform #ifndef check anyway.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: use m4 quoting consistently

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: prefer AS_CASE rather than shell 'case'

References: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Builtins.html#case
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: prefer AS_IF rather than shell 'if'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: use backticks rather than $() for commands in configure

The configure had both backticks and $() in use.  These command
susbstitutions are mutually interchangeable, so one should pick only one
form.  In this case backticks were favored because they are known with
greater range of shells, making the backticks to be more portable.

References: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Shell-Substitutions.html#index-g_t_0024_0028_0040var_007bcommands_007d_0029-1632
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
rev: use string printing rather than character output

Fliping a string in memory, and printing it with multibyte output
function makes the command about 1/3 quicker.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mkswap: add note about swap header limit to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
more: check for buffer size when write multibyte char

Signed-off-by: Karel Zak <kzak@redhat.com>
more: guarantee space for multibyte

.. to make the code more robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: fix typos

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
column: use variable lenght printf field width to wprint blanks

This makes program to run a little faster.  My test input show about 20%
speed improvement.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
more: make output redirection more efficient

Especially with large inputs the change improves performance
considerably.

old> time more /boot/vmlinuz >/dev/null
real    0m0.224s

new> more /boot/vmlinuz >/dev/null
real    0m0.009s

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cal: set statically defined data read-only

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libmount: canonicalize for conversion from loopdev backing file

  # mount foo.img /mnt
  # umount foo.img
  umount: foo.img: not mounted

The loopdev code (and sysfs backing_file) uses absolute paths, but
libmount does not canonicalize the path before lookup for the backing file.

References: https://bugzilla.redhat.com/show_bug.cgi?id=950497
Signed-off-by: Karel Zak <kzak@redhat.com>