]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agobuild-sys: add --disable-all-programs
Karel Zak [Tue, 27 May 2014 09:34:15 +0000 (11:34 +0200)] 
build-sys: add --disable-all-programs

This is necessary to build only explicitly specified program/library,
for example to build only libblkid.so

   ./configure --disable-all-programs --enable-libblkid

or to build only hwclock(8):

   ./configure --disable-all-programs --enable-hwclock

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add UL_DEFAULT_ENABLE() and $ul_default_estate
Karel Zak [Tue, 27 May 2014 09:33:48 +0000 (11:33 +0200)] 
build-sys: add UL_DEFAULT_ENABLE() and $ul_default_estate

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'fix-build-sys' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 26 May 2014 10:52:18 +0000 (12:52 +0200)] 
Merge branch 'fix-build-sys' of https://github.com/rudimeier/util-linux

11 years agoMerge branch 'setarch' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 26 May 2014 10:48:35 +0000 (12:48 +0200)] 
Merge branch 'setarch' of https://github.com/rudimeier/util-linux

* 'setarch' of https://github.com/rudimeier/util-linux:
  setarch: add shortcut binary uname26
  setarch: flush output streams before exec

11 years agoMerge branch 'master' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 26 May 2014 10:44:31 +0000 (12:44 +0200)] 
Merge branch 'master' of https://github.com/rudimeier/util-linux

11 years agomount: add note about order for -a to the man page
Karel Zak [Mon, 26 May 2014 10:17:29 +0000 (12:17 +0200)] 
mount: add note about order for -a to the man page

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: detect squashfs 3 vs 4
Ruediger Meier [Tue, 20 May 2014 10:23:33 +0000 (10:23 +0000)] 
libblkid: detect squashfs 3 vs 4

Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs.

squashfs kernel module version 4.0 (kernel 2.6.29) is not backward
compatible to open squashfs created with previous versions.

Also fixed version number parsing, see
$  mkdir test
$  mksquashfs test test.sqsh
$  blkid -p test.sqsh
- test.sqsh: VERSION="1024.0" TYPE="squashfs" USAGE="filesystem"
+ test.sqsh: VERSION="4.0" TYPE="squashfs" USAGE="filesystem"

This patch comes from openSUSE / SLE. Original author was probably
Miklos Szeredi.
Internal SUSE references: bnc#666893, sr226509

CC: Stanislav Brabec <sbrabec@suse.cz>
CC: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: skip umount-alltargets on regular mtab
Karel Zak [Mon, 26 May 2014 09:43:27 +0000 (11:43 +0200)] 
tests: skip umount-alltargets on regular mtab

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoumount: add info that --all-targets works with mtab symlink only
Karel Zak [Mon, 26 May 2014 09:37:02 +0000 (11:37 +0200)] 
umount: add info that --all-targets works with mtab symlink only

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: fix typo, sparc vs spark (62b2c024)
Ruediger Meier [Fri, 23 May 2014 15:15:05 +0000 (15:15 +0000)] 
build-sys: fix typo, sparc vs spark (62b2c024)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: fix typo, look vs loop (1b15cbd1)
Ruediger Meier [Fri, 23 May 2014 11:08:28 +0000 (11:08 +0000)] 
build-sys: fix typo, look vs loop (1b15cbd1)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agosetarch: add shortcut binary uname26
Ruediger Meier [Thu, 22 May 2014 07:42:32 +0000 (09:42 +0200)] 
setarch: add shortcut binary uname26

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>
11 years agosetarch: flush output streams before exec
Ruediger Meier [Thu, 22 May 2014 07:19:08 +0000 (09:19 +0200)] 
setarch: flush output streams before exec

This fixes the following (non-deterministic) discrepancy:

$ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success
Switching on READ_IMPLIES_EXEC.
Switching on ADDR_LIMIT_32BIT.
Switching on SHORT_INODE.
Switching on WHOLE_SECONDS.
Switching on STICKY_TIMEOUTS.
Switching on ADDR_LIMIT_3GB.
Switching on UNAME26.
success

$ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success  &> /tmp/bla; cat /tmp/bla
success

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: cleanup bash-completion/
Karel Zak [Wed, 21 May 2014 12:29:42 +0000 (14:29 +0200)] 
build-sys: cleanup bash-completion/

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_{COL,COLCRT,COLRM,COLUMN,HEXDUMP,REV,TAILF}
Karel Zak [Wed, 21 May 2014 12:09:43 +0000 (14:09 +0200)] 
build-sys: add BUILD_{COL,COLCRT,COLRM,COLUMN,HEXDUMP,REV,TAILF}

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolsblk: fix, set default sort_id = -1
Ruediger Meier [Wed, 21 May 2014 11:56:20 +0000 (11:56 +0000)] 
lsblk: fix, set default sort_id = -1

Introduced in 642048e4:
 $ lsblk -o SIZE /dev/loop1
lsblk: the sort column has to be between output columns.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: add BUILD_{SCRIPT,SCRIPTREPLAY}
Karel Zak [Wed, 21 May 2014 11:58:03 +0000 (13:58 +0200)] 
build-sys: add BUILD_{SCRIPT,SCRIPTREPLAY}

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_ vars for all Linux-only utils
Karel Zak [Wed, 21 May 2014 11:53:44 +0000 (13:53 +0200)] 
build-sys: add BUILD_ vars for all Linux-only utils

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_CHRT
Karel Zak [Wed, 21 May 2014 11:35:01 +0000 (13:35 +0200)] 
build-sys: add BUILD_CHRT

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_GETOPT
Karel Zak [Wed, 21 May 2014 11:26:56 +0000 (13:26 +0200)] 
build-sys: add BUILD_GETOPT

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_{BLKID,FINDFS,WIPEFS,FINDMNT}
Karel Zak [Wed, 21 May 2014 11:24:21 +0000 (13:24 +0200)] 
build-sys: add BUILD_{BLKID,FINDFS,WIPEFS,FINDMNT}

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_{UUIDGEN,CAL,LOGGER,LOOP,MCOOKIE,NAMEI,WHEREIS}
Karel Zak [Wed, 21 May 2014 11:09:17 +0000 (13:09 +0200)] 
build-sys: add BUILD_{UUIDGEN,CAL,LOGGER,LOOP,MCOOKIE,NAMEI,WHEREIS}

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add UL_EXCLUDE_ARCH()
Karel Zak [Wed, 21 May 2014 10:57:13 +0000 (12:57 +0200)] 
build-sys: add UL_EXCLUDE_ARCH()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add BUILD_{SFDISK,BLOCKDEV,MKSWAP,IOSIZE,MKFS}
Karel Zak [Wed, 21 May 2014 10:34:34 +0000 (12:34 +0200)] 
build-sys: add BUILD_{SFDISK,BLOCKDEV,MKSWAP,IOSIZE,MKFS}

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --disable-minix
Karel Zak [Wed, 21 May 2014 10:13:12 +0000 (12:13 +0200)] 
build-sys: add --disable-minix

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolsblk: add --sort <column>
Karel Zak [Tue, 20 May 2014 13:08:08 +0000 (15:08 +0200)] 
lsblk: add --sort <column>

This implementation allow to sort output by arbitrary output column.

Note that output is always converted to human readable strings, but
sort functions in many cases work with original data (stored as
private data to cells by scols_cell_set_userdata()).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: add scols_sort_table()
Karel Zak [Tue, 20 May 2014 13:04:11 +0000 (15:04 +0200)] 
libsmartcols: add scols_sort_table()

 * add pointer to column cmp() function [scols_column_set_cmpfunc()]

 * allow to store per-cell application private data
   (to make it possible to sort tables on data independent on cell
    output data) [scols_cell_set_userdata() ...]

 * make it possible to access line cell by column
   [scols_line_get_column_cell()]

Sort and cmp() stuff based on patches from Shakur Shams Mullick.

Co-Author: Shakur Shams Mullick <shakursmullick@gmail.com>
Signed-off-by: Shakur Shams Mullick <shakursmullick@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosetterm: fix 'bright' in usage, remove unnecessary error message
Karel Zak [Tue, 20 May 2014 09:56:43 +0000 (11:56 +0200)] 
setterm: fix 'bright' in usage, remove unnecessary error message

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch '2014wk19' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Tue, 20 May 2014 09:44:26 +0000 (11:44 +0200)] 
Merge branch '2014wk19' of git://github.com/kerolasa/lelux-utiliteetit

* '2014wk19' of git://github.com/kerolasa/lelux-utiliteetit:
  setterm: remove ulcolor and hbcolor duplicates
  setterm: add set_blanking() action
  setterm: mark some options to be exclusive with each other
  setterm: various visual terminal effects are not console specific
  setterm: improve error messages
  setterm: tell user when options does not effect
  setterm: improve perform_sequence() coding style
  setterm: correct usage() bright color argument
  setterm: make -msglevel 0 to work as is did earlier
  setterm: remove devfs and /dev/vcsa0 support
  setterm: clean up screendump()
  setterm: add init_terminal() to make main() shorter
  setterm: add option control structure
  setterm: remove usage comment segment
  setterm: move show_tabs() and screendump() functions
  setterm: use string utils to numeric parsing
  setterm: recommend long options with double hyphen
  setterm: use getopt_long_only() for option parsing
  setterm: clean up includes

11 years agofsck.cramfs: cleanup usage() and warning messages
Karel Zak [Tue, 20 May 2014 08:32:57 +0000 (10:32 +0200)] 
fsck.cramfs: cleanup usage() and warning messages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'cramfs-blocksize' of https://github.com/rudimeier/util-linux
Karel Zak [Tue, 20 May 2014 08:23:18 +0000 (10:23 +0200)] 
Merge branch 'cramfs-blocksize' of https://github.com/rudimeier/util-linux

* 'cramfs-blocksize' of https://github.com/rudimeier/util-linux:
  mkfs.cramfs: fix crash when -b 0
  fsck.cramfs: update man page (--extract and --blocksize)
  tests: remove test_fsck.cramfs (reverts 6c32ae78)
  fsck.cramfs: remove define INCLUDE_FS_TESTS
  fsck.cramfs: refactor option -x/--extract
  tests: fix fsck.cramfs for systems with certain page sizes
  fsck.cramfs: add option --blocksize
  fsck.cramfs: rename variable page_size to blksize
  fsck.cramfs: ifdef unused outbuffer and page_size
  fsck.cramfs: allow smaller superblock sizes
  tests, fix cramfs for systems with certain page sizes

11 years agolib/canonicalize: make DM canonicalization more robust
Karel Zak [Tue, 20 May 2014 08:11:57 +0000 (10:11 +0200)] 
lib/canonicalize: make DM canonicalization more robust

The current code cares about filenames, but it's too fragile, we have
to check the path is really path to the block device.

Addresses: https://github.com/karelzak/util-linux/issues/83
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosetterm: remove ulcolor and hbcolor duplicates
Sami Kerola [Mon, 19 May 2014 21:58:14 +0000 (22:58 +0100)] 
setterm: remove ulcolor and hbcolor duplicates

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: add set_blanking() action
Sami Kerola [Sun, 18 May 2014 13:55:23 +0000 (14:55 +0100)] 
setterm: add set_blanking() action

This make over long perform_sequence() function a little bit shorter.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: mark some options to be exclusive with each other
Sami Kerola [Sun, 18 May 2014 13:39:58 +0000 (14:39 +0100)] 
setterm: mark some options to be exclusive with each other

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: various visual terminal effects are not console specific
Sami Kerola [Sun, 18 May 2014 13:10:21 +0000 (14:10 +0100)] 
setterm: various visual terminal effects are not console specific

Setting colors, making line not to wrap, and so on can be attempted in
other than consoles.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: improve error messages
Sami Kerola [Sun, 18 May 2014 13:04:03 +0000 (14:04 +0100)] 
setterm: improve error messages

Reuse messages to make translation work easier.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: tell user when options does not effect
Sami Kerola [Sun, 18 May 2014 12:40:11 +0000 (13:40 +0100)] 
setterm: tell user when options does not effect

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: improve perform_sequence() coding style
Sami Kerola [Sun, 18 May 2014 12:12:09 +0000 (13:12 +0100)] 
setterm: improve perform_sequence() coding style

Delete pointless braces, new lines, and add spacing between operators.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: correct usage() bright color argument
Sami Kerola [Sun, 18 May 2014 11:37:24 +0000 (12:37 +0100)] 
setterm: correct usage() bright color argument

This has been wrong since commit 2dc8716.  The bright is a prefix
attribute to other colors.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agomkfs.cramfs: fix crash when -b 0
Ruediger Meier [Mon, 19 May 2014 13:52:38 +0000 (15:52 +0200)] 
mkfs.cramfs: fix crash when -b 0

Now -b 0 gives us the default (page size) like we do it in
fsck.cramfs.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agofsck.cramfs: update man page (--extract and --blocksize)
Ruediger Meier [Mon, 19 May 2014 12:23:45 +0000 (14:23 +0200)] 
fsck.cramfs: update man page (--extract and --blocksize)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: remove test_fsck.cramfs (reverts 6c32ae78)
Ruediger Meier [Mon, 19 May 2014 11:47:27 +0000 (13:47 +0200)] 
tests: remove test_fsck.cramfs (reverts 6c32ae78)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agofsck.cramfs: remove define INCLUDE_FS_TESTS
Ruediger Meier [Mon, 19 May 2014 11:03:16 +0000 (13:03 +0200)] 
fsck.cramfs: remove define INCLUDE_FS_TESTS

There is only one non-trivial issue where we now print a
warning instead of exit error.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agosetterm: make -msglevel 0 to work as is did earlier
Sami Kerola [Sun, 18 May 2014 11:31:16 +0000 (12:31 +0100)] 
setterm: make -msglevel 0 to work as is did earlier

Commit 3393c136 caused regression.  The klogctl() logging range is 1-8,
but the value 0 is special according to setterm.1 manual page.  It turns
on loging, same way as '-msg on' option.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: remove devfs and /dev/vcsa0 support
Sami Kerola [Sun, 18 May 2014 10:32:04 +0000 (11:32 +0100)] 
setterm: remove devfs and /dev/vcsa0 support

The devfs files /dev/vcc/a* does not need to be supported, and vcsa0 has
not existed in years if ever.

Reference: http://lwn.net/Articles/65197/
Reference: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devices.txt?id=14186fea0cb06bc43181ce239efe0df6f1af260a#n260
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: clean up screendump()
Sami Kerola [Sun, 18 May 2014 10:00:14 +0000 (11:00 +0100)] 
setterm: clean up screendump()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: add init_terminal() to make main() shorter
Sami Kerola [Sun, 18 May 2014 08:54:12 +0000 (09:54 +0100)] 
setterm: add init_terminal() to make main() shorter

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: add option control structure
Sami Kerola [Sun, 18 May 2014 08:35:01 +0000 (09:35 +0100)] 
setterm: add option control structure

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: remove usage comment segment
Sami Kerola [Sat, 17 May 2014 19:42:37 +0000 (20:42 +0100)] 
setterm: remove usage comment segment

It is enough trouble to keep usage output aligned with getopt() parsing,
manual page, and bash-completion, so get rid of the unnecessary effort
duplication.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: move show_tabs() and screendump() functions
Sami Kerola [Sat, 17 May 2014 19:12:23 +0000 (20:12 +0100)] 
setterm: move show_tabs() and screendump() functions

Earlier the function was in the middle of option parsing code segment,
and screendump() required function prototype.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: use string utils to numeric parsing
Sami Kerola [Sat, 17 May 2014 18:21:34 +0000 (19:21 +0100)] 
setterm: use string utils to numeric parsing

Check the input numbers are numbers, which makes also the code shorter,
and user experience better as half invalid imputs will error.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: recommend long options with double hyphen
Sami Kerola [Mon, 19 May 2014 21:21:14 +0000 (22:21 +0100)] 
setterm: recommend long options with double hyphen

While the -version style options will work for next unknown number of
years start moving towards user interface that has way of invoking long
options as most of the other commands.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: use getopt_long_only() for option parsing
Sami Kerola [Sat, 17 May 2014 17:52:01 +0000 (18:52 +0100)] 
setterm: use getopt_long_only() for option parsing

The getopt_long_only() has advantage of allowing one and two hyphen
versions of options, for example -help and --help.  Secondly the getopt
function family from libc can ensure some options requiring arguments,
while other are optional, and some should not accept argument at all.
That makes option parsing more robust.

Unfortunately retiring the old option parsing makes this change greater
than preferred.  Assuming not mistakes happen the new code works
functionally exactly as the old did.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: clean up includes
Sami Kerola [Sun, 11 May 2014 21:52:09 +0000 (22:52 +0100)] 
setterm: clean up includes

Use klogctl(2) from sys/klog.h just like dmesg(1).  The rest is just
reordering, and indenting.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agofsck.cramfs: refactor option -x/--extract
Ruediger Meier [Mon, 19 May 2014 10:57:59 +0000 (12:57 +0200)] 
fsck.cramfs: refactor option -x/--extract

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>
11 years agomount: fix tiny typo in man page
Stephan Müller [Thu, 15 May 2014 12:12:54 +0000 (14:12 +0200)] 
mount: fix tiny typo in man page

adjust command to use /dev/loop3 as described in text

Signed-off-by: Stephan Mueller <fruktopus@gmail.com>
11 years agoagetty: update man page
Karel Zak [Mon, 19 May 2014 08:59:54 +0000 (10:59 +0200)] 
agetty: update man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix fsck.cramfs for systems with certain page sizes
Ruediger Meier [Sun, 18 May 2014 23:32:41 +0000 (01:32 +0200)] 
tests: fix fsck.cramfs for systems with certain page sizes

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agofsck.cramfs: add option --blocksize
Ruediger Meier [Sat, 17 May 2014 13:43:30 +0000 (15:43 +0200)] 
fsck.cramfs: add option --blocksize

.. similar to mkfs.cramfs

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agofsck.cramfs: rename variable page_size to blksize
Ruediger Meier [Sun, 18 May 2014 21:31:28 +0000 (23:31 +0200)] 
fsck.cramfs: rename variable page_size to blksize

... similar to mkfs.cramfs.c

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agofsck.cramfs: ifdef unused outbuffer and page_size
Ruediger Meier [Sat, 17 May 2014 12:58:30 +0000 (14:58 +0200)] 
fsck.cramfs: ifdef unused outbuffer and page_size

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agofsck.cramfs: allow smaller superblock sizes
Ruediger Meier [Sun, 18 May 2014 22:43:53 +0000 (00:43 +0200)] 
fsck.cramfs: allow smaller superblock sizes

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>
11 years agotests, fix cramfs for systems with certain page sizes
Ruediger Meier [Sat, 17 May 2014 10:55:27 +0000 (12:55 +0200)] 
tests, fix cramfs for systems with certain page sizes

This is only a partial fix to get comparable image md5sums.
fsck.cramfs still fails if system page size > 4096

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoagetty: Update help usage function
Benjamin Robin [Sun, 18 May 2014 00:48:14 +0000 (02:48 +0200)] 
agetty: Update help usage function

Signed-off-by: Benjamin Robin <dev@benjarobin.fr>
11 years agoagetty: Fix implementation of option --nonewline. The flag F_NONL was never set.
Benjamin Robin [Sun, 18 May 2014 00:47:42 +0000 (02:47 +0200)] 
agetty: Fix implementation of option --nonewline. The flag F_NONL was never set.

Signed-off-by: Benjamin Robin <dev@benjarobin.fr>
11 years agoMerge branch 'tests-mount' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 16 May 2014 12:30:05 +0000 (14:30 +0200)] 
Merge branch 'tests-mount' of https://github.com/rudimeier/util-linux

* 'tests-mount' of https://github.com/rudimeier/util-linux:
  tests: use ts_mount for cramfs
  tests: ts_mount knows which fs is expected
  tests: ts_mount validates error message
  tests, add function ts_mount

11 years agoMerge branch 'tests-check-prog' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 16 May 2014 12:27:11 +0000 (14:27 +0200)] 
Merge branch 'tests-check-prog' of https://github.com/rudimeier/util-linux

* 'tests-check-prog' of https://github.com/rudimeier/util-linux:
  tests: check for mkfs.ext{2,3,4}
  tests: consolidate some checks for commands
  tests: add function ts_check_prog

11 years agolslogins: add FAILED-LOGIN to pretty output
Karel Zak [Fri, 16 May 2014 12:14:02 +0000 (14:14 +0200)] 
lslogins: add FAILED-LOGIN to pretty output

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: sync man page and usage()
Karel Zak [Fri, 16 May 2014 12:04:54 +0000 (14:04 +0200)] 
lslogins: sync man page and usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: improve pretty output
Karel Zak [Fri, 16 May 2014 10:35:46 +0000 (12:35 +0200)] 
lslogins: improve pretty output

 * use Yes/No
 * print all available information (columns)
 * cleanup code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: use ts_mount for cramfs
Ruediger Meier [Thu, 15 May 2014 15:01:00 +0000 (17:01 +0200)] 
tests: use ts_mount for cramfs

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: ts_mount knows which fs is expected
Ruediger Meier [Thu, 15 May 2014 14:56:18 +0000 (16:56 +0200)] 
tests: ts_mount knows which fs is expected

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: ts_mount validates error message
Ruediger Meier [Thu, 15 May 2014 14:27:28 +0000 (16:27 +0200)] 
tests: ts_mount validates error message

Skip only if mount reports a non-empty fs which is not available
in /proc/filesystems.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests, add function ts_mount
Ruediger Meier [Thu, 15 May 2014 11:20:31 +0000 (13:20 +0200)] 
tests, add function ts_mount

We want to generalize mounts similar to how we do it already in
minix/mkfs. Currently most of our other checks just fail if
"fs not supported".

Note that the new function checks a bit stronger than before in
minix/mkfs. It respects mount's return value and stderr goes
to $TS_OUTPUT too.

It's a bit ugly that we write to $TS_OUTPUT from inside of the
function. But if the caller would do it then we couldn't
ts_skip and the whole function would be pointless.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolslogins: NLS for all messages
Karel Zak [Fri, 16 May 2014 09:41:18 +0000 (11:41 +0200)] 
lslogins: NLS for all messages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: conding style changes
Karel Zak [Fri, 16 May 2014 09:31:00 +0000 (11:31 +0200)] 
lslogins: conding style changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: improve supplementary groups code, add SUPP-GIDS
Karel Zak [Fri, 16 May 2014 09:14:32 +0000 (11:14 +0200)] 
lslogins: improve supplementary groups code, add SUPP-GIDS

 * don't build list, but directly create a string
 * don't mix IDs and group names on output
 * add SUPP-GIDS to print only IDs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: align to right 0|1 columns
Karel Zak [Thu, 15 May 2014 12:10:50 +0000 (14:10 +0200)] 
lslogins: align to right 0|1 columns

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup status[] usage
Karel Zak [Thu, 15 May 2014 12:01:51 +0000 (14:01 +0200)] 
lslogins: cleanup status[] usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup fill_table()
Karel Zak [Thu, 15 May 2014 11:35:08 +0000 (13:35 +0200)] 
lslogins: cleanup fill_table()

 * check xasprintf() return code is unnecessary
 * just check all scols_line_set_data() return codes on one place

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: mention --time-format in usage
Ondrej Oprala [Wed, 30 Apr 2014 13:59:01 +0000 (15:59 +0200)] 
lslogins: mention --time-format in usage

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: fix option exclusivity
Ondrej Oprala [Wed, 30 Apr 2014 13:52:50 +0000 (15:52 +0200)] 
lslogins: fix option exclusivity

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: add option --time-format
Ondrej Oprala [Wed, 30 Apr 2014 13:46:50 +0000 (15:46 +0200)] 
lslogins: add option --time-format

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: comment-in an expensive realloc
Ondrej Oprala [Wed, 30 Apr 2014 12:46:47 +0000 (14:46 +0200)] 
lslogins: comment-in an expensive realloc

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: add option --iso
Ondrej Oprala [Wed, 30 Apr 2014 12:42:51 +0000 (14:42 +0200)] 
lslogins: add option --iso

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: add support for multiple time formats
Ondrej Oprala [Wed, 30 Apr 2014 12:25:54 +0000 (14:25 +0200)] 
lslogins: add support for multiple time formats

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: pretty printing and extended -l,-g
Ondrej Oprala [Tue, 29 Apr 2014 11:40:32 +0000 (13:40 +0200)] 
lslogins: pretty printing and extended -l,-g

11 years agolslogins: also add readutmp.c
Ondrej Oprala [Mon, 28 Apr 2014 10:33:11 +0000 (12:33 +0200)] 
lslogins: also add readutmp.c

11 years agolslogins: add readtump.h header
Ondrej Oprala [Mon, 28 Apr 2014 10:18:18 +0000 (12:18 +0200)] 
lslogins: add readtump.h header

11 years agolslogins: make it work
Ondrej Oprala [Wed, 23 Apr 2014 10:46:56 +0000 (12:46 +0200)] 
lslogins: make it work

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: use thread-safe functions
Ondrej Oprala [Wed, 23 Apr 2014 07:33:25 +0000 (09:33 +0200)] 
lslogins: use thread-safe functions

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: store users in a tree
Ondrej Oprala [Tue, 22 Apr 2014 13:38:27 +0000 (15:38 +0200)] 
lslogins: store users in a tree

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: add functionality
Ondrej Oprala [Mon, 7 Apr 2014 16:24:19 +0000 (18:24 +0200)] 
lslogins: add functionality

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agologin: extract get_hushlogin_status
Ondrej Oprala [Tue, 8 Apr 2014 11:26:33 +0000 (13:26 +0200)] 
login: extract get_hushlogin_status

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins: move to login-utils
Ondrej Oprala [Tue, 8 Apr 2014 08:51:02 +0000 (10:51 +0200)] 
lslogins: move to login-utils

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agolslogins(1): skeleton and argparsing for a new utility
Ondrej Oprala [Fri, 4 Apr 2014 15:58:06 +0000 (17:58 +0200)] 
lslogins(1): skeleton and argparsing for a new utility

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agotests: check for mkfs.ext{2,3,4}
Ruediger Meier [Wed, 14 May 2014 21:54:23 +0000 (23:54 +0200)] 
tests: check for mkfs.ext{2,3,4}

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: consolidate some checks for commands
Ruediger Meier [Thu, 15 May 2014 09:24:59 +0000 (11:24 +0200)] 
tests: consolidate some checks for commands

Use ts_check_prog for mdadm, readelf, file, ntpdate, bc (mdadm was
not always checked so far).

There are some positive side-effects. We are using always $PATH now
instead of randomly hardcoded /usr/bin, /sbin, etc. If we ever want
to change this again, we should do this generically in ts_init.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: add function ts_check_prog
Ruediger Meier [Wed, 14 May 2014 21:53:52 +0000 (23:53 +0200)] 
tests: add function ts_check_prog

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>