]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agobuild-sys: fix ENABLE_ALL
Karel Zak [Tue, 3 Jun 2014 10:52:33 +0000 (12:52 +0200)] 
build-sys: fix ENABLE_ALL

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: fix docs
Karel Zak [Tue, 3 Jun 2014 10:41:58 +0000 (12:41 +0200)] 
libsmartcols: fix docs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: rename libs xml/version.xml to xml/version-utils.xml
Karel Zak [Tue, 3 Jun 2014 10:37:33 +0000 (12:37 +0200)] 
docs: rename libs xml/version.xml to xml/version-utils.xml

It seems that gtk-docs stuff is confused when we use version.xml
(package version) and xml/version.xml (library version functions).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuil-sys: disable in UL_BUILD_INIT() on --disable-all-programs
Karel Zak [Mon, 2 Jun 2014 09:34:21 +0000 (11:34 +0200)] 
buil-sys: disable in UL_BUILD_INIT() on --disable-all-programs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: don't compile deprecated last(1) on --enable-all-programs
Karel Zak [Mon, 2 Jun 2014 09:21:35 +0000 (11:21 +0200)] 
build-sys: don't compile deprecated last(1) on --enable-all-programs

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoscript: fix spurious exit from input read loop on EINTR.
Csaba Kos [Fri, 30 May 2014 09:40:15 +0000 (18:40 +0900)] 
script: fix spurious exit from input read loop on EINTR.

11 years agoscript: fix a rare deadlock after child termination
Csaba Kos [Fri, 30 May 2014 05:33:32 +0000 (14:33 +0900)] 
script: fix a rare deadlock after child termination

11 years agolibsmartcols: clean up test.c example
Karel Zak [Fri, 30 May 2014 12:17:29 +0000 (14:17 +0200)] 
libsmartcols: clean up test.c example

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update TODO
Karel Zak [Fri, 30 May 2014 11:50:10 +0000 (13:50 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 30 May 2014 10:01:27 +0000 (12:01 +0200)] 
Merge branch 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux

* '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

11 years agolibblkid: (zfs) let's keep compiler happy
Karel Zak [Fri, 30 May 2014 09:27:41 +0000 (11:27 +0200)] 
libblkid: (zfs) let's keep compiler happy

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'warnings-squashed' of https://github.com/rudimeier/util-linux
Karel Zak [Fri, 30 May 2014 09:26:43 +0000 (11:26 +0200)] 
Merge branch 'warnings-squashed' of https://github.com/rudimeier/util-linux

* 'warnings-squashed' of https://github.com/rudimeier/util-linux:
  build: fix some compiler warnings

11 years agolibfdisk: (gpt) fix last LBA code for S_ISREG
Karel Zak [Fri, 30 May 2014 08:51:53 +0000 (10:51 +0200)] 
libfdisk: (gpt) fix last LBA code for S_ISREG

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild: fix some compiler warnings
Ruediger Meier [Thu, 29 May 2014 23:18:09 +0000 (01:18 +0200)] 
build: fix some compiler warnings

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

11 years agolslogins: fix pretty-print columns
Karel Zak [Thu, 29 May 2014 13:08:26 +0000 (15:08 +0200)] 
lslogins: fix pretty-print columns

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup some command line options
Karel Zak [Thu, 29 May 2014 13:05:10 +0000 (15:05 +0200)] 
lslogins: cleanup some command line options

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup default outputs
Karel Zak [Thu, 29 May 2014 12:48:45 +0000 (14:48 +0200)] 
lslogins: cleanup default outputs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup -a output
Karel Zak [Thu, 29 May 2014 12:17:41 +0000 (14:17 +0200)] 
lslogins: cleanup -a output

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: improve COL_PWD_WARN and COL_NPROCS desc
Karel Zak [Thu, 29 May 2014 11:37:58 +0000 (13:37 +0200)] 
lslogins: improve COL_PWD_WARN and COL_NPROCS desc

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup usage()
Karel Zak [Thu, 29 May 2014 11:32:03 +0000 (13:32 +0200)] 
lslogins: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: fix nologins check
Karel Zak [Thu, 29 May 2014 11:24:35 +0000 (13:24 +0200)] 
lslogins: fix nologins check

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: cleanup time formats
Karel Zak [Thu, 29 May 2014 11:21:57 +0000 (13:21 +0200)] 
lslogins: cleanup time formats

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: improve vmware detection
Ruediger Meier [Tue, 20 May 2014 11:26:48 +0000 (11:26 +0000)] 
lscpu: improve vmware detection

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>
11 years agotests: add lscpu IBM pSeries test data
Ruediger Meier [Wed, 28 May 2014 19:15:24 +0000 (21:15 +0200)] 
tests: add lscpu IBM pSeries test data

Just adding missing files
  /proc/device-tree/ibm,partition-name
  /proc/device-tree/hmc-managed?
to our existing lscpu-ppc64-POWER7-64cpu dump.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolscpu: detect OS/400 and pHyp hypervisors
Ruediger Meier [Tue, 20 May 2014 11:26:48 +0000 (11:26 +0000)] 
lscpu: detect OS/400 and pHyp hypervisors

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>
11 years agotests: add vbox lscpu dump
Ruediger Meier [Tue, 20 May 2014 12:18:04 +0000 (12:18 +0000)] 
tests: add vbox lscpu dump

Taken from openSUSE-13.1 guest in VirtualBox-4.3.10 (host=Win7):
   Hypervisor vendor:     Oracle
   Virtualization type:   full

Dump was provides by Bernhard Voelker.

CC: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolslogins: clean up password hash check
Karel Zak [Thu, 29 May 2014 10:48:40 +0000 (12:48 +0200)] 
lslogins: clean up password hash check

 * rename to PWD-* column names
 * add PWD-DENY for accounts where is no possible to login by password
 * PWD-LOCK (was LOCKED) checks for valid but locked pawwords
 * LOGIN renamed to USER

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add sys-utils/uname26.8 to gitignore
Karel Zak [Thu, 29 May 2014 09:50:44 +0000 (11:50 +0200)] 
build-sys: add sys-utils/uname26.8 to gitignore

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: remove --sort-by-name
Karel Zak [Thu, 29 May 2014 09:37:15 +0000 (11:37 +0200)] 
lslogins: remove --sort-by-name

If we really need a sort functionality hardcoded into lslogins(1) then we need
a generic sort options (like for lsblk,--sort <column>).

Note that it seems that "lslogins | sort --key <col>" is good enough for now as
lslogins(1) does not convert any data to human readable non-precise format (like
for example lsblk SIZE column etc.).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: improve nologins and shadow usage
Karel Zak [Thu, 29 May 2014 09:28:39 +0000 (11:28 +0200)] 
lslogins: improve nologins and shadow usage

 * fix coding style
 * don't require shadow entries
 * check for /var/run/nologin

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosetarch: add generic support for setarch $(uname -m) ...
Ruediger Meier [Thu, 29 May 2014 00:53:18 +0000 (02:53 +0200)] 
setarch: add generic support for setarch $(uname -m) ...

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: minor cleanup and improve hypervisor detection
Ruediger Meier [Tue, 20 May 2014 11:26:48 +0000 (11:26 +0000)] 
lscpu: minor cleanup and improve hypervisor detection

- 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>
11 years agobuild-sys: fix typo, set HAVE_LIBUUID
Karel Zak [Wed, 28 May 2014 08:05:22 +0000 (10:05 +0200)] 
build-sys: fix typo, set HAVE_LIBUUID

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: enable chfn and chsh by default
Karel Zak [Wed, 28 May 2014 07:57:55 +0000 (09:57 +0200)] 
build-sys: enable chfn and chsh by default

The util-linux version (is the best:-) uses libuser,
so it usable for non-local users (LDAP, etc.).

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

* 'tests-stuff' of https://github.com/rudimeier/util-linux:
  tests: split off losetup scsi_debug part
  tests: fix, typo schedutils/cpuset
  tests: run tests in deterministic order
  tests: ts_scsi_debug_init skip instead of die

11 years agolosetup: don't ignore EBUSY in losetup when the loop device is given
Stanislav Brabec [Tue, 27 May 2014 18:38:17 +0000 (20:38 +0200)] 
losetup: don't ignore EBUSY in losetup when the loop device is given

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>
11 years agolosetup: don't clear FD at EBUSY error in loopcxt_setup_device()
Stanislav Brabec [Tue, 27 May 2014 18:38:10 +0000 (20:38 +0200)] 
losetup: don't clear FD at EBUSY error in loopcxt_setup_device()

loopback lib clears the existing FD unconditionally at error in
loopcxt_setup_device().  This is done even after EBUSY, thus the second call
actually clears the previous setup wrongly.

Author:  Takashi Iwai <tiwai@suse.de>
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
11 years agolslogins: print systemd journal logs
Karel Zak [Tue, 27 May 2014 15:34:15 +0000 (17:34 +0200)] 
lslogins: print systemd journal logs

Co-Author: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild_sys: fix default estate usage
Karel Zak [Tue, 27 May 2014 15:22:28 +0000 (17:22 +0200)] 
build_sys: fix default estate usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: count per-user processes
Ondrej Oprala [Mon, 19 May 2014 10:25:06 +0000 (12:25 +0200)] 
lslogins: count per-user processes

[kzak@redhat.com: - rename column, align to right]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'setterm' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Tue, 27 May 2014 14:23:46 +0000 (16:23 +0200)] 
Merge branch 'setterm' of git://github.com/kerolasa/lelux-utiliteetit

* 'setterm' of git://github.com/kerolasa/lelux-utiliteetit:
  docs: setterm.1 clean up manual page groff style
  docs: setterm.1 add options compatibility note
  docs: setterm.1 add missing options to manual page and remove duplicate
  setterm: add usage() descriptions

11 years agoMerge branch 'uuid' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Tue, 27 May 2014 14:15:30 +0000 (16:15 +0200)] 
Merge branch 'uuid' of git://github.com/kerolasa/lelux-utiliteetit

11 years agocal: all output must use my_putstring
Ruediger Meier [Tue, 27 May 2014 13:07:05 +0000 (15:07 +0200)] 
cal: all output must use my_putstring

Replace all puts, fputs and printf calls by my_putstring() because
we don't want to mix different output channels (buffers).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agosfdisk: suppress Linux-irrelevant warnings with -L
Petr Uzel [Mon, 26 May 2014 16:28:03 +0000 (18:28 +0200)] 
sfdisk: suppress Linux-irrelevant warnings with -L

Sfdisk prints out a warning about extended partition not
starting at a cylinder boundary. Since this is irrelevant
for linux, the -L option should suppress this warning.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
11 years agodocs: update howto regards to build-system changes
Karel Zak [Tue, 27 May 2014 13:37:26 +0000 (15:37 +0200)] 
docs: update howto regards to build-system changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: split off losetup scsi_debug part
Ruediger Meier [Mon, 26 May 2014 22:43:37 +0000 (00:43 +0200)] 
tests: split off losetup scsi_debug part

It's a pity that we would skip the whole test if scsi_debug is not
available.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agodocs: remove obsolete cfdisk.txt
Karel Zak [Tue, 27 May 2014 13:18:35 +0000 (15:18 +0200)] 
docs: remove obsolete cfdisk.txt

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add missing dependencies to libsmartcols
Karel Zak [Tue, 27 May 2014 09:45:24 +0000 (11:45 +0200)] 
build-sys: add missing dependencies to libsmartcols

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: fix UL_BUILD_INIT()
Karel Zak [Tue, 27 May 2014 12:58:14 +0000 (14:58 +0200)] 
build-sys: fix UL_BUILD_INIT()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add disable-all.conf to config-gen
Karel Zak [Tue, 27 May 2014 09:37:18 +0000 (11:37 +0200)] 
build-sys: add disable-all.conf to config-gen

Signed-off-by: Karel Zak <kzak@redhat.com>
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 agotests: fix, typo schedutils/cpuset
Ruediger Meier [Mon, 26 May 2014 12:05:45 +0000 (14:05 +0200)] 
tests: fix, typo schedutils/cpuset

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: run tests in deterministic order
Ruediger Meier [Wed, 21 May 2014 13:04:55 +0000 (13:04 +0000)] 
tests: run tests in deterministic order

Not really needed but it makes debugging of existing build logs
much more easier.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: ts_scsi_debug_init skip instead of die
Ruediger Meier [Wed, 21 May 2014 23:37:17 +0000 (01:37 +0200)] 
tests: ts_scsi_debug_init skip instead of die

If any of these modprobe commands fails then it's not a broken test.
ALso ts_die often does not work correctly from subtests which should
be fixed someday too.

BTW modprobe dry-run (even the real modprobe) is not reliable.
Moreover now we respect blacklisted modules (-b).

This error handling is not only useful to let the test-suite succeed
on broken systems but also to not fail all "scsi_debug tests" after
just one of them failed to umount something.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agouuidd: do not mix signed type and unsigned code
Sami Kerola [Sat, 24 May 2014 17:49:53 +0000 (18:49 +0100)] 
uuidd: do not mix signed type and unsigned code

Both the strtou32_or_err() and alarm() expect timeout to be unsigned.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agouuidgen: use type definitions from uuid.h
Sami Kerola [Sat, 24 May 2014 17:41:08 +0000 (18:41 +0100)] 
uuidgen: use type definitions from uuid.h

There is no need to re-invent wheel.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agouuidd: set options to be mutually exclusive
Sami Kerola [Sat, 24 May 2014 16:58:05 +0000 (17:58 +0100)] 
uuidd: set options to be mutually exclusive

--pid     || --no-pid
--debug   || --quiet
--random  || --time

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agouuidd: ensure pid file is wrote when it is requested
Sami Kerola [Sat, 24 May 2014 16:38:49 +0000 (17:38 +0100)] 
uuidd: ensure pid file is wrote when it is requested

Earlier for example this 'uuidd --pid /dev/full' worked, now error is
printed about truncating not being possible for character device and
assuming someone would write pid to full disk it should not be go by
unnoticed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: setterm.1 clean up manual page groff style
Sami Kerola [Sat, 24 May 2014 11:04:05 +0000 (12:04 +0100)] 
docs: setterm.1 clean up manual page groff style

Underline option arguments, and use bold for options.  Avoid use of \f
font style change in paragraphs, but use them when describing options.

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: setterm.1 add options compatibility note
Sami Kerola [Sat, 24 May 2014 09:58:27 +0000 (10:58 +0100)] 
docs: setterm.1 add options compatibility note

Both --option and -option formats are accepted.

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: setterm.1 add missing options to manual page and remove duplicate
Sami Kerola [Sat, 24 May 2014 09:38:16 +0000 (10:38 +0100)] 
docs: setterm.1 add missing options to manual page and remove duplicate

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: add usage() descriptions
Sami Kerola [Sat, 24 May 2014 09:17:01 +0000 (10:17 +0100)] 
setterm: add usage() descriptions

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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>