]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
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>
11 years agoMerge branch 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux
Karel Zak [Wed, 14 May 2014 12:15:58 +0000 (14:15 +0200)] 
Merge branch 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux

* 'travis-root-checks-v2' of https://github.com/rudimeier/util-linux:
  travis-ci: enable root checks
  travis-ci: minor cleanup and speedup
  tests: introduce TS_CMD_UUIDGEN (never use installed one)
  tests, don't write TS_DEVICE to stdout anymore
  tests: ts_scsi_debug_init must not run in a subshell
  tests: cleanup ts_scsi_debug_init
  tests: some more tests need loop support
  tests: ts_device_init requires loop support
  tests: use ts_check_losetup in losetup test
  tests: add function ts_check_losetup
  tests: ts_device_init remove useless error handling

11 years agotests: add .BE hexdump test results (from s390)
Karel Zak [Wed, 14 May 2014 12:05:54 +0000 (14:05 +0200)] 
tests: add .BE hexdump test results (from s390)

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'tests-known' of https://github.com/rudimeier/util-linux
Karel Zak [Wed, 14 May 2014 11:19:37 +0000 (13:19 +0200)] 
Merge branch 'tests-known' of https://github.com/rudimeier/util-linux

* 'tests-known' of https://github.com/rudimeier/util-linux:
  tests, script/race is known to fail
  tests: script/race would work with variable loop count
  tests: ipcs/limits2 is known to fail
  tests: fix hexdump for big endian
  tests, add missing output for hexdump
  tests: fix hexdump, add ts_finalize
  tests: fix "KNOWN FAILED" for subtests

11 years agolosetup: fix -f on systems without /dev/loop-control
Karel Zak [Wed, 14 May 2014 10:53:24 +0000 (12:53 +0200)] 
losetup: fix -f on systems without /dev/loop-control

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests, script/race is known to fail
Ruediger Meier [Tue, 13 May 2014 13:19:35 +0000 (15:19 +0200)] 
tests, script/race is known to fail

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: script/race would work with variable loop count
Ruediger Meier [Tue, 13 May 2014 13:13:12 +0000 (15:13 +0200)] 
tests: script/race would work with variable loop count

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: ipcs/limits2 is known to fail
Ruediger Meier [Tue, 13 May 2014 10:10:17 +0000 (12:10 +0200)] 
tests: ipcs/limits2 is known to fail

See github issue #51, comment 2
https://github.com/karelzak/util-linux/issues/51

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: fix hexdump for big endian
Ruediger Meier [Tue, 13 May 2014 11:19:22 +0000 (13:19 +0200)] 
tests: fix hexdump for big endian

For now endianess dependent subtests have undefined output on
BE systems until sombody re-checks this and provides expected
output files with .BE suffix.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotravis-ci: enable root checks
Ruediger Meier [Mon, 12 May 2014 11:50:25 +0000 (13:50 +0200)] 
travis-ci: enable root checks

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotravis-ci: minor cleanup and speedup
Ruediger Meier [Sun, 11 May 2014 04:49:02 +0000 (06:49 +0200)] 
travis-ci: minor cleanup and speedup

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: introduce TS_CMD_UUIDGEN (never use installed one)
Ruediger Meier [Sun, 11 May 2014 21:58:53 +0000 (23:58 +0200)] 
tests: introduce TS_CMD_UUIDGEN (never use installed one)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests, don't write TS_DEVICE to stdout anymore
Ruediger Meier [Tue, 13 May 2014 15:17:24 +0000 (17:17 +0200)] 
tests, don't write TS_DEVICE to stdout anymore

11 years agotests: ts_scsi_debug_init must not run in a subshell
Ruediger Meier [Sun, 11 May 2014 06:50:28 +0000 (08:50 +0200)] 
tests: ts_scsi_debug_init must not run in a subshell

ts_skip and ts_die won't work from subshell. Now we simply use
TS_DEVICE which is globally set in that function.

I've made sure that we never change TS_DEVICE variable after
we've got it. So we could use it again for cleanup on exit in
ts_{finalize,die,skip} functions.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: cleanup ts_scsi_debug_init
Ruediger Meier [Sun, 11 May 2014 20:48:16 +0000 (22:48 +0200)] 
tests: cleanup ts_scsi_debug_init

Sort out global and local vars. Now we set TS_DEVICE globally
to be use later.
Skip really quiet if modprobe fails.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: some more tests need loop support
Ruediger Meier [Sun, 11 May 2014 20:47:22 +0000 (22:47 +0200)] 
tests: some more tests need loop support

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: ts_device_init requires loop support
Ruediger Meier [Mon, 12 May 2014 10:45:03 +0000 (12:45 +0200)] 
tests: ts_device_init requires loop support

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: use ts_check_losetup in losetup test
Ruediger Meier [Mon, 12 May 2014 10:42:07 +0000 (12:42 +0200)] 
tests: use ts_check_losetup in losetup test

In losetup test we have to handle the special case that ts_check_losetup
requires a working losetup binary.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: add function ts_check_losetup
Ruediger Meier [Mon, 12 May 2014 00:45:10 +0000 (02:45 +0200)] 
tests: add function ts_check_losetup

Unfortunately losetup -f does not return an error nowadays.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests, add missing output for hexdump
Ruediger Meier [Tue, 13 May 2014 11:36:08 +0000 (13:36 +0200)] 
tests, add missing output for hexdump

One file was missing and one was too much.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: fix hexdump, add ts_finalize
Ruediger Meier [Mon, 12 May 2014 21:16:25 +0000 (23:16 +0200)] 
tests: fix hexdump, add ts_finalize

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: fix "KNOWN FAILED" for subtests
Ruediger Meier [Mon, 12 May 2014 20:56:57 +0000 (22:56 +0200)] 
tests: fix "KNOWN FAILED" for subtests

It didn't worked for tests with subtests.

Here we consolidate both cases which fixes the issue by the way. This
is basically a rewrite of 7641ccec.

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