]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agotextual: fix some typos
Sami Kerola [Sun, 13 Jul 2014 16:17:51 +0000 (17:17 +0100)] 
textual: fix some typos

Found with misspell-check version 2.0d.

Reference: https://github.com/lyda/misspell-check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agobuild-sys: release++ (v2.25-rc2) v2.25-rc2
Karel Zak [Wed, 2 Jul 2014 09:40:19 +0000 (11:40 +0200)] 
build-sys: release++ (v2.25-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update v2.25-ReleaseNotes
Karel Zak [Wed, 2 Jul 2014 09:38:19 +0000 (11:38 +0200)] 
docs: update v2.25-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update AUTHORS file
Karel Zak [Wed, 2 Jul 2014 09:35:53 +0000 (11:35 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopo: merge changes
Karel Zak [Wed, 2 Jul 2014 09:33:31 +0000 (11:33 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/ismounted: more robust buffer usage [clang-analyze]
Karel Zak [Tue, 1 Jul 2014 11:51:32 +0000 (13:51 +0200)] 
lib/ismounted: more robust buffer usage [clang-analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofsck: uninitialized argument value [clang-analyze]
Karel Zak [Tue, 1 Jul 2014 11:48:01 +0000 (13:48 +0200)] 
fsck: uninitialized argument value [clang-analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: fix possible memory leak [clang-analyze]
Karel Zak [Tue, 1 Jul 2014 11:36:37 +0000 (13:36 +0200)] 
libfdisk: fix possible memory leak [clang-analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agocfdisk: fix division by zero [clang-analyze]
Karel Zak [Tue, 1 Jul 2014 11:25:46 +0000 (13:25 +0200)] 
cfdisk: fix division by zero [clang-analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix probe_ddf() [clang-analyze]
Karel Zak [Tue, 1 Jul 2014 10:32:25 +0000 (12:32 +0200)] 
libblkid: fix probe_ddf() [clang-analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: simplify cache_set_targets()
Karel Zak [Tue, 1 Jul 2014 08:36:40 +0000 (10:36 +0200)] 
findmnt: simplify cache_set_targets()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: always use mnt_resolve_target() in mnt_fs_match_target()
Karel Zak [Tue, 1 Jul 2014 08:34:09 +0000 (10:34 +0200)] 
libmount: always use mnt_resolve_target() in mnt_fs_match_target()

The requested path is also target mountpoint, so let's optimize
realpath() usage as well.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: use mnt_cache_set_targets() for non-kernel table
Eric Rannaud [Fri, 27 Jun 2014 05:18:48 +0000 (22:18 -0700)] 
findmnt: use mnt_cache_set_targets() for non-kernel table

findmnt compares the user-supplied path <target> with each entry in the
parsed table. To do this comparison, libmount attempts to canonicalize
the target path of each table entry, when the entry does not originate
from the kernel (kernel supplied target paths are already
canonicalized). However, if one of these entries is an active mount
point, stat(2) or readlink(2) on the mount target path can hang (e.g.
unreachable NFS server).

If the main table is not a kernel table, we parse /proc/self/mountinfo
into a secondary table and call mnt_cache_set_targets(). This allows
libmount to check that the target path of each entry in the main table
is not an active mount point, so it can avoid canonicalizing it.

Signed-off-by: Eric Rannaud <e@nanocritical.com>
11 years agolibmount: mnt_resolve_target: tiptoe around active mount points
Eric Rannaud [Fri, 27 Jun 2014 05:17:18 +0000 (22:17 -0700)] 
libmount: mnt_resolve_target: tiptoe around active mount points

Current code in mnt_fs_match_target() and mnt_table_find_target()
already does not canonicalize active mount points (when read from
mountinfo), because they are already canonicalized by the kernel.
Calling realpath(fs->target) on a mount point can hang -- e.g. if the
NFS server is unreachable.

This patch optionally extends this strategy to the general case, that is
when @fs does not directly come from the kernel through mountinfo (for
instance, it may have been parsed from /etc/fstab).

Given @mtab parsed from mountinfo, and if mnt_cache_set_targets(cache,
mtab) is used, then mnt_fs_match_target() and mnt_table_find_target()
check whether @fs->target is a known mount point in the cached
mountinfo, before attempting to canonicalize @fs->target, no matter
where @fs itself comes from. If found in the cached mountinfo,
@fs->target is not canonicalized.

[kzak@redhat.com: - don't allocate libmnt_iter,
                  - add docs for mnt_cache_set_targets(),
                  - fallback to mnt_resolve_path() if no cache->mtab specified,
                  - use streq_except_trailing_slash() to compare paths]

Signed-off-by: Eric Rannaud <e@nanocritical.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: mnt_resolve_path: don't canonicalize fs->target for swap
Eric Rannaud [Fri, 27 Jun 2014 05:17:17 +0000 (22:17 -0700)] 
libmount: mnt_resolve_path: don't canonicalize fs->target for swap

This is how mnt_table_find_target() does it. It makes sense because
@fs->target is "none" for swap and is never a sensible match for a
user-specified target.

Signed-off-by: Eric Rannaud <e@nanocritical.com>
11 years agolibmount: mnt_resolve_path: use strcmp() only if both are canonical
Eric Rannaud [Fri, 27 Jun 2014 05:17:16 +0000 (22:17 -0700)] 
libmount: mnt_resolve_path: use strcmp() only if both are canonical

Signed-off-by: Eric Rannaud <e@nanocritical.com>
11 years agofdisk: don't use --geom-* prefix for CHS options
Karel Zak [Mon, 30 Jun 2014 13:10:29 +0000 (15:10 +0200)] 
fdisk: don't use --geom-* prefix for CHS options

We already use --cylinders, --heads and --sectors for sfdisk, let's
make new fdisk option compatible.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: add note about deallocations
Karel Zak [Mon, 30 Jun 2014 12:14:34 +0000 (14:14 +0200)] 
libsmartcols: add note about deallocations

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoswapon: mark --sumarry as deprecated
Karel Zak [Mon, 30 Jun 2014 09:03:12 +0000 (11:03 +0200)] 
swapon: mark --sumarry as deprecated

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoswapon: align --summary fields
Sami Kerola [Sun, 29 Jun 2014 18:12:13 +0000 (19:12 +0100)] 
swapon: align --summary fields

This commit makes  partitions and files to have remaining three columns
aligned.  Below print out demonstrates earlier misalignment.

$ swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda2                               partition       4194300 0       3
/home/src/util-linux/newswap            file    496     0       -1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoumount: slightly improve the man page
Benno Schulenberg [Sun, 29 Jun 2014 15:49:43 +0000 (17:49 +0200)] 
umount: slightly improve the man page

Remove some stray words from option arguments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agofindmnt: minimally improve wording of usage text
Benno Schulenberg [Sun, 29 Jun 2014 15:49:42 +0000 (17:49 +0200)] 
findmnt: minimally improve wording of usage text

Also sort the options better and tweak whitespace.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agofindmnt: slightly improve wording and formatting in man page
Benno Schulenberg [Sun, 29 Jun 2014 15:49:41 +0000 (17:49 +0200)] 
findmnt: slightly improve wording and formatting in man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslogins: improve the columns information
Benno Schulenberg [Sun, 29 Jun 2014 15:49:40 +0000 (17:49 +0200)] 
lslogins: improve the columns information

Some fixes for typos, whitespace and wordings.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agolslogins: improve wording and formatting of the man page
Benno Schulenberg [Sun, 29 Jun 2014 15:49:39 +0000 (17:49 +0200)] 
lslogins: improve wording and formatting of the man page

Some typos, spacing, line breaks, and missing optional arguments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agosetterm: improve formatting and wording of usage text
Benno Schulenberg [Sun, 29 Jun 2014 15:49:38 +0000 (17:49 +0200)] 
setterm: improve formatting and wording of usage text

Mainly: showing that the word color is a placeholder by writing
<color>, showing some numbers as optional, and message levels
and colors as not optional.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agosetterm: improve wording and formatting of the man page
Benno Schulenberg [Sun, 29 Jun 2014 15:49:37 +0000 (17:49 +0200)] 
setterm: improve wording and formatting of the man page

The main changes are: showing the arguments of boolean options
as optional, improving the alphabetization, and restoring the
--half-bright option that went missing in 2011.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agofallocate: use O_CREAT only for the default behavior
Karel Zak [Thu, 26 Jun 2014 12:45:02 +0000 (14:45 +0200)] 
fallocate: use O_CREAT only for the default behavior

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofallocate: fix check of number of arguments
Bernhard Voelker [Thu, 26 Jun 2014 12:14:01 +0000 (14:14 +0200)] 
fallocate: fix check of number of arguments

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
11 years agofallocate: clarify usage()
Pádraig Brady [Thu, 26 Jun 2014 11:05:16 +0000 (13:05 +0200)] 
fallocate: clarify usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofallocate: use err_exclusive_options(), cleanup getopt_long() stuff
Karel Zak [Thu, 26 Jun 2014 10:38:04 +0000 (12:38 +0200)] 
fallocate: use err_exclusive_options(), cleanup getopt_long() stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofallocate: make man page readable for humans
Karel Zak [Thu, 26 Jun 2014 10:01:59 +0000 (12:01 +0200)] 
fallocate: make man page readable for humans

Well, let's copy & past from fallocate(2) syscall man page rather than
try to be creative with another description for the flags.

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofallocate: fix FALLOC_FL_ZERO_RANGE flag check
Karel Zak [Thu, 26 Jun 2014 10:01:13 +0000 (12:01 +0200)] 
fallocate: fix FALLOC_FL_ZERO_RANGE flag check

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: add note about lsblk
Karel Zak [Wed, 25 Jun 2014 12:04:20 +0000 (14:04 +0200)] 
docs: add note about lsblk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobash-completion: update fallocate, fstrim and lsblk
Karel Zak [Wed, 25 Jun 2014 11:55:56 +0000 (13:55 +0200)] 
bash-completion: update fallocate, fstrim and lsblk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobash-completion: update cfdisk
Karel Zak [Wed, 25 Jun 2014 11:44:08 +0000 (13:44 +0200)] 
bash-completion: update cfdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobash-completion: update fdisk
Karel Zak [Wed, 25 Jun 2014 11:41:27 +0000 (13:41 +0200)] 
bash-completion: update fdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add long options, cleanup man page and usage()
Karel Zak [Wed, 25 Jun 2014 11:21:35 +0000 (13:21 +0200)] 
fdisk: add long options, cleanup man page and usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: fix minor things in man-page howto
Karel Zak [Wed, 25 Jun 2014 11:21:15 +0000 (13:21 +0200)] 
docs: fix minor things in man-page howto

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: add fdisk mac support to TODO file
Karel Zak [Wed, 25 Jun 2014 09:39:30 +0000 (11:39 +0200)] 
docs: add fdisk mac support to TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: correct the return values in squashfs probe
David Shea [Mon, 23 Jun 2014 17:41:48 +0000 (13:41 -0400)] 
libblkid: correct the return values in squashfs probe

Returning -1 can cause squashfs v3 detection to make v4 detection fail.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) count fisrt usable LBA to total number of used sectors
Karel Zak [Tue, 24 Jun 2014 08:32:25 +0000 (10:32 +0200)] 
libfdisk: (dos) count fisrt usable LBA to total number of used sectors

The check() function counts number of used sectors, but it counts only
partitions. This is mistake, the area before the first partition is
also "used" place (boot loaders or we have to align the first partition
to disk I/O limits, etc).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) use check() for dos-comaptible mode only
Karel Zak [Tue, 24 Jun 2014 07:40:56 +0000 (09:40 +0200)] 
libfdisk: (dos) use check() for dos-comaptible mode only

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) calculation of total size based on CHS in check function
Thorsten Wilmer [Tue, 24 Jun 2014 07:38:30 +0000 (09:38 +0200)] 
libfdisk: (dos) calculation of total size based on CHS in check function

Many people report a problem with the message if (cylinders <= 1024 &&
start != total) fprintf(stderr, _("Partition %d: previous sectors %d
disagrees with " "total %d\n"), n, start, total);

This message comes from the fact that the previous code caluclates the
total number of sectors in the wrong way.

The formula should be total = (real_c * heads + h) * sectors + real_s;

As a Cylinder consists of some heads * sectors A Head consists of some
sectors and finally sectors are the smallest unit

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: special treatment for auto in fstype pattern
Karel Zak [Mon, 23 Jun 2014 10:42:33 +0000 (12:42 +0200)] 
libmount: special treatment for auto in fstype pattern

Let's support

  mount -t ext2,auto /dev/sde /media/stick

Reported-by: Andreas Henriksson <andreas@fatal.se>
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506695
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohwclock: sometimes one day lasts 23 hours.
peppe [Sun, 22 Jun 2014 12:23:25 +0000 (14:23 +0200)] 
hwclock: sometimes one day lasts 23 hours.

If less than 23 hours have passed since the last calibration, hwclock
says "Not adjusting drift factor because it has been less than a day since
the last calibration.", but in fact compares to 23 hours, not 24.

This was originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689534

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoscript: clean up code to genenrate Star/Done messages
Karel Zak [Mon, 23 Jun 2014 09:41:31 +0000 (11:41 +0200)] 
script: clean up code to genenrate Star/Done messages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoscript: silence the done message on --quiet as well
Andreas Henriksson [Sun, 22 Jun 2014 01:12:44 +0000 (03:12 +0200)] 
script: silence the done message on --quiet as well

Apparently James Hunts patch (which he provided a long time
ago) is no longer covering it all.

This followup patch also silences the "Script done ..." message
when --quiet is used.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agoscript: --quiet option is not quiet.
James Hunt [Sat, 21 Jun 2014 23:03:04 +0000 (01:03 +0200)] 
script: --quiet option is not quiet.

Specifying 'script --quiet ...' still produces the 'Script started'
message in the typescript file. The --quiet option implies that the
script program should not log any of its output to the typescript file.

Originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693966

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
11 years agocfdisk: add --zero command line option
Karel Zak [Fri, 20 Jun 2014 10:17:53 +0000 (12:17 +0200)] 
cfdisk: add --zero command line option

The option has been supported by previous versions, we can easily
support it too.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agocfdisk: don't offer BSD
Karel Zak [Fri, 20 Jun 2014 10:07:30 +0000 (12:07 +0200)] 
cfdisk: don't offer BSD

BSD is nested within DOS partition, so for disk without any partition
table it does not make any sense to offer BSD label.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'master' of https://github.com/nazarov-yuriy/util-linux
Karel Zak [Thu, 19 Jun 2014 09:52:27 +0000 (11:52 +0200)] 
Merge branch 'master' of https://github.com/nazarov-yuriy/util-linux

11 years agobuild-sys: fixes for non-Linux systems
Samuel Thibault [Thu, 19 Jun 2014 08:35:23 +0000 (10:35 +0200)] 
build-sys: fixes for non-Linux systems

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: support ./configure ADJTIME_PATH=
Karel Zak [Thu, 19 Jun 2014 08:18:46 +0000 (10:18 +0200)] 
build-sys: support ./configure ADJTIME_PATH=

.. to override the default /etc/adjtime path.

Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/loopdev.c: reset errno before strtol() call
Yuriy Nazarov [Wed, 18 Jun 2014 23:12:22 +0000 (03:12 +0400)] 
lib/loopdev.c: reset errno before strtol() call

Fixed unsuccessful attempt to find unused loop devices if 0-7
devices already used and /dev/loop directory exists.

11 years agobuild-sys: add libsmartcols to ko-release-gen script
Karel Zak [Wed, 18 Jun 2014 13:42:09 +0000 (15:42 +0200)] 
build-sys: add libsmartcols to ko-release-gen script

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: release++ (v2.25-rc1) v2.25-rc1
Karel Zak [Wed, 18 Jun 2014 12:40:28 +0000 (14:40 +0200)] 
build-sys: release++ (v2.25-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: add v2.25-ReleaseNotes
Karel Zak [Wed, 18 Jun 2014 12:38:55 +0000 (14:38 +0200)] 
docs: add v2.25-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update AUTHORS file
Karel Zak [Wed, 18 Jun 2014 11:16:03 +0000 (13:16 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopo: merge changes
Karel Zak [Wed, 18 Jun 2014 11:11:17 +0000 (13:11 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopo: update zh_CN.po (from translationproject.org)
Wylmer Wang [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update zh_CN.po (from translationproject.org)

11 years agopo: update pt_BR.po (from translationproject.org)
Rafael Ferreira [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update pt_BR.po (from translationproject.org)

11 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update ja.po (from translationproject.org)

11 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Wed, 18 Jun 2014 11:02:37 +0000 (13:02 +0200)] 
po: update de.po (from translationproject.org)

11 years agopo: update da.po (from translationproject.org)
Joe Hansen [Wed, 18 Jun 2014 11:02:36 +0000 (13:02 +0200)] 
po: update da.po (from translationproject.org)

11 years agopo: update cs.po (from translationproject.org)
Petr Písař [Wed, 18 Jun 2014 11:02:36 +0000 (13:02 +0200)] 
po: update cs.po (from translationproject.org)

11 years agomount: fix man page [checkmans]
Karel Zak [Wed, 18 Jun 2014 10:58:49 +0000 (12:58 +0200)] 
mount: fix man page [checkmans]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/fileutils: xalloc stuff in library-like code
Karel Zak [Wed, 18 Jun 2014 10:57:42 +0000 (12:57 +0200)] 
lib/fileutils: xalloc stuff in library-like code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: fix ifdef HAVE_sys_io_h [checkconfig]
Karel Zak [Wed, 18 Jun 2014 10:51:25 +0000 (12:51 +0200)] 
lscpu: fix ifdef HAVE_sys_io_h [checkconfig]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update build tests
Karel Zak [Wed, 18 Jun 2014 10:46:04 +0000 (12:46 +0200)] 
tests: update build tests

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add non-libsmartcols.conf
Karel Zak [Wed, 18 Jun 2014 10:44:37 +0000 (12:44 +0200)] 
build-sys: add non-libsmartcols.conf

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix compiler warning [-Wimplicit-function-declaration]
Karel Zak [Wed, 18 Jun 2014 09:27:39 +0000 (11:27 +0200)] 
libblkid: fix compiler warning [-Wimplicit-function-declaration]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/sysfs: fix compiler warning [-Wunused-variable]
Karel Zak [Wed, 18 Jun 2014 09:25:47 +0000 (11:25 +0200)] 
lib/sysfs: fix compiler warning [-Wunused-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: don't touch mtab when mount -n specified
Karel Zak [Tue, 17 Jun 2014 13:38:14 +0000 (15:38 +0200)] 
libmount: don't touch mtab when mount -n specified

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1109367
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: remove test_wholedisk
Karel Zak [Tue, 17 Jun 2014 10:45:28 +0000 (12:45 +0200)] 
tests: remove test_wholedisk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: remove obsolete wholedisk.c
Karel Zak [Tue, 17 Jun 2014 10:16:29 +0000 (12:16 +0200)] 
build-sys: remove obsolete wholedisk.c

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosfdisk: use sysfs_devno_is_wholedisk()
Karel Zak [Tue, 17 Jun 2014 10:16:05 +0000 (12:16 +0200)] 
sfdisk: use sysfs_devno_is_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use sysfs_devno_is_wholedisk()
Karel Zak [Tue, 17 Jun 2014 10:15:59 +0000 (12:15 +0200)] 
fdisk: use sysfs_devno_is_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/sysfs: add sysfs_devno_is_wholedisk()
Karel Zak [Tue, 17 Jun 2014 10:15:01 +0000 (12:15 +0200)] 
lib/sysfs: add sysfs_devno_is_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/sysfs: add sysfs_devno_is_lvm_private() from libblkid
Karel Zak [Tue, 17 Jun 2014 09:20:32 +0000 (11:20 +0200)] 
lib/sysfs: add sysfs_devno_is_lvm_private() from libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: add --nocanonicalize to avoid realpath()
Karel Zak [Mon, 16 Jun 2014 13:47:50 +0000 (15:47 +0200)] 
findmnt: add --nocanonicalize to avoid realpath()

 * in some cases is realpath() overkill
 * sometimes you want to search for explicitly specified paths (e.g.
   "findmnt --fstab /mnt/symlink") rather than for real paths
 * you want to avoid readlink() and stat() on NFS

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: fix smartcols.pc
Karel Zak [Mon, 16 Jun 2014 13:18:20 +0000 (15:18 +0200)] 
build-sys: fix smartcols.pc

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: move libsmartcols.so to /lib if they exists
Karel Zak [Mon, 16 Jun 2014 13:00:33 +0000 (15:00 +0200)] 
build-sys: move libsmartcols.so to /lib if they exists

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoOnly move shared libraries to /lib if they exists
Thomas Petazzoni [Thu, 12 Jun 2014 20:10:27 +0000 (22:10 +0200)] 
Only move shared libraries to /lib if they exists

In several Makemodule.am, there is a install-exec-hook-<library>
target whose role is to move the shared library from /usr/lib to /lib,
while keeping a symbolic link /usr/lib/libuuid.so ->
../../lib/<library>.so.<version>.

However, when util-linux is built with --enable-static
--disable-shared (as is needed on noMMU platforms that don't support
shared libraries), no <library>.so is built, but the
install-exec-hook-libuuid creates an invalid /usr/lib/<library>.so
symbolic link, pointing to ../../lib (yes, the directory). This causes
troubles later one when other libraries/programs are compiled with
-l<library>, as gcc thinks a shared library is available because
there's a file named /usr/lib/<library>.so.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 years agoMerge branch 'tests-utmp' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 16 Jun 2014 12:37:39 +0000 (14:37 +0200)] 
Merge branch 'tests-utmp' of https://github.com/rudimeier/util-linux

* 'tests-utmp' of https://github.com/rudimeier/util-linux:
  tests: skip some last tests if no dns support
  tests: split last into dns and nodns subtests
  tests: add utmpdump-circle test (arch independent)
  tests: provide missing test data for "last" on exotic archs
  tests: skip utmpdump tests for exotic archs
  tests: merge last/ and utmpdump/ into new utmp/ dir
  utmpdump: fix localtime() error handling

11 years agoMerge branch 'gettext-version' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 16 Jun 2014 12:33:32 +0000 (14:33 +0200)] 
Merge branch 'gettext-version' of https://github.com/rudimeier/util-linux

* 'gettext-version' of https://github.com/rudimeier/util-linux:
  build-sys: fix autopoint gettext version fun

11 years agomount: more hints about default mount options to man page
Karel Zak [Thu, 12 Jun 2014 09:15:00 +0000 (11:15 +0200)] 
mount: more hints about default mount options to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agorename: remove reference to mmv gtom man page
Karel Zak [Thu, 12 Jun 2014 08:28:10 +0000 (10:28 +0200)] 
rename: remove reference to mmv gtom man page

It seems better to not have a reference to the program that is not
available in many cases on usual Linux installation.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: skip some last tests if no dns support
Ruediger Meier [Wed, 11 Jun 2014 17:28:20 +0000 (19:28 +0200)] 
tests: skip some last tests if no dns support

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: split last into dns and nodns subtests
Ruediger Meier [Wed, 11 Jun 2014 17:22:41 +0000 (19:22 +0200)] 
tests: split last into dns and nodns subtests

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: add utmpdump-circle test (arch independent)
Ruediger Meier [Wed, 11 Jun 2014 14:08:29 +0000 (16:08 +0200)] 
tests: add utmpdump-circle test (arch independent)

This one is a completely arch independent conversion round:
  text -> bin -> text -> bin

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: provide missing test data for "last" on exotic archs
Ruediger Meier [Wed, 11 Jun 2014 18:26:04 +0000 (20:26 +0200)] 
tests: provide missing test data for "last" on exotic archs

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: skip utmpdump tests for exotic archs
Ruediger Meier [Wed, 11 Jun 2014 13:36:42 +0000 (15:36 +0200)] 
tests: skip utmpdump tests for exotic archs

We introduce utmp_functions.sh and skip tests if size of utmp struct
does not match our wtmp test data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: merge last/ and utmpdump/ into new utmp/ dir
Ruediger Meier [Wed, 11 Jun 2014 15:47:34 +0000 (17:47 +0200)] 
tests: merge last/ and utmpdump/ into new utmp/ dir

We want to prepare and simplify utmp sepcific fixes. Beside all this
renaming we also update/add some text data to have it more consistent.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoutmpdump: fix localtime() error handling
Ruediger Meier [Wed, 11 Jun 2014 15:31:56 +0000 (17:31 +0200)] 
utmpdump: fix localtime() error handling

If current TZ has no representation of a given time_t then localtime()
would return NULL and break the next strftime().

In practice this happens very likely on systems with 64bit time_t when
parsing broken binary data. Seen on aarch64 (and probably s390) using
our (incompatible) test wtmp data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: fix autopoint gettext version fun
Ruediger Meier [Tue, 10 Jun 2014 16:44:08 +0000 (18:44 +0200)] 
build-sys: fix autopoint gettext version fun

We avoid or fix many portability issues.

The first more generic "sort --version-sort" solution was almost
useless anyway because autopoint itself can also only deal with
a few hardcoded versions.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agobuild-sys: use gettext 0.18.3 if possible
Ruediger Meier [Tue, 10 Jun 2014 10:08:51 +0000 (12:08 +0200)] 
build-sys: use gettext 0.18.3 if possible

We add a little hack for backward compatibility on systems with
older gettext installed

See 0576dbd3 and 81ed13ed.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolibblkid: cleanup internal return codes
Karel Zak [Tue, 10 Jun 2014 11:32:02 +0000 (13:32 +0200)] 
libblkid: cleanup internal return codes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: ignore private LVM devices
Karel Zak [Tue, 10 Jun 2014 10:16:59 +0000 (12:16 +0200)] 
libblkid: ignore private LVM devices

The virtual private LVM devices do not contain any blkid relevant data
and it does not make any sense to scan for superblocks or partitions
on the devices, because we can interpret data from the devices in bad
way.

Unfortunately, for LVM has "private" very special meaning. The private
LVM devices are accessible and readable (according to LVM guys it's
feature, because debugging etc.).

The problem is pretty visible with LVM thin provisioning where a virtual
pool device contains segments from the top-level thin devices.

Mountable top-level LVM-thin device:

# blkid -o udev -p /dev/mapper/vg-thin1
ID_FS_UUID=57ed6490-903b-416c-91d2-6d06804ec60c
ID_FS_TYPE=ext4

Virtual private LVM-pool device (contains data from all thin devices):

# blkid -o udev -p /dev/mapper/vg-pool0
ID_FS_UUID=57ed6490-903b-416c-91d2-6d06804ec60c
ID_FS_TYPE=ext4

... this is incorrect, vg-pool0 is unmountable.

LVM uses special UUID suffixes for private devices. All devices with
uuid in format "LVM-<uuid>-<type>" are private.

This patch modifies libblkid to not scan such devices. The high-level
API ignores such devices at all now.

The low-level API allows to assign the device to blkid_prober, but all
scan functions always return nothing and library does not read
anything from the device. The another functionality (get parental
device, topology, sector sizes, etc.) still works as expected. The
change affects only probing code.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1101345
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix fdisk/bsd for big endian systems
Ruediger Meier [Thu, 29 May 2014 17:52:52 +0000 (19:52 +0200)] 
tests: fix fdisk/bsd for big endian systems

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