]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
10 years agobuild-sys: release++ (v2.24.2) stable/v2.24 v2.24.2
Karel Zak [Thu, 24 Apr 2014 09:23:34 +0000 (11:23 +0200)] 
build-sys: release++ (v2.24.2)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update v2.24.2-ReleaseNotes
Karel Zak [Thu, 24 Apr 2014 09:21:54 +0000 (11:21 +0200)] 
docs: update v2.24.2-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update AUTHORS file
Karel Zak [Thu, 24 Apr 2014 09:09:25 +0000 (11:09 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: merge changes
Karel Zak [Thu, 24 Apr 2014 08:58:48 +0000 (10:58 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Thu, 24 Apr 2014 08:33:37 +0000 (10:33 +0200)] 
po: update de.po (from translationproject.org)

10 years agopo: update da.po (from translationproject.org)
Joe Hansen [Thu, 24 Apr 2014 08:33:37 +0000 (10:33 +0200)] 
po: update da.po (from translationproject.org)

10 years agopo: update cs.po (from translationproject.org)
Petr Písař [Thu, 24 Apr 2014 08:33:37 +0000 (10:33 +0200)] 
po: update cs.po (from translationproject.org)

10 years agotests: use old output format
Karel Zak [Wed, 23 Apr 2014 10:41:34 +0000 (12:41 +0200)] 
tests: use old output format

The test has been backported from master branch with the new format.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update Py parse mountinfo test
Karel Zak [Wed, 23 Apr 2014 10:34:48 +0000 (12:34 +0200)] 
tests: update Py parse mountinfo test

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: clean up backport
Karel Zak [Wed, 23 Apr 2014 10:13:12 +0000 (12:13 +0200)] 
tests: clean up backport

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update libmount tabdiff tests
Karel Zak [Mon, 17 Feb 2014 13:32:22 +0000 (14:32 +0100)] 
tests: update libmount tabdiff tests

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: add fdisk 'f' command MBR test
Karel Zak [Wed, 23 Apr 2014 07:27:13 +0000 (09:27 +0200)] 
tests: add fdisk 'f' command MBR test

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoswaplabel: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:27 +0000 (00:30 +0000)] 
swaplabel: Improve the typesetting of the manual

  Change macro 'IR' to 'I' if it has only one (italic) argument

  Remove space at end of lines

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
10 years agoraw: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:25 +0000 (00:30 +0000)] 
raw: Improve the typesetting of the manual

  Remove space at end of lines

  Change '-' to '\-', if it indicates an option

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
10 years agopartx: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:24 +0000 (00:30 +0000)] 
partx: Improve the typesetting of the manual

  Add a space character around '|' (means "or")

  Add "(hyphen-minus)" after "\-" to show character name for input

  Change '\-\-' to '\en', when it is used as a dash (pause, separation)

  Add a comma before "or" in a series of words (3 or more)

  Change '-' to '\(en' (an en-dash), if it means a range

  Protect a full stop (.), that begins or ends a string, with \&

  Change '--' to '\-\-', if it indicates an option

  Change '-' to '\-', if it indicates an option

  Change '-' to '\-', if means a minus

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
10 years agolibfdisk: fix logical partition reorder command
Karel Zak [Fri, 18 Apr 2014 09:48:53 +0000 (11:48 +0200)] 
libfdisk: fix logical partition reorder command

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodelpart: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:49 +0000 (09:48 +0200)] 
delpart: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agoaddpart: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:47 +0000 (09:48 +0200)] 
addpart: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agovipw: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:46 +0000 (09:48 +0200)] 
vipw: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agonologin: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:45 +0000 (09:48 +0200)] 
nologin: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agoutmpdump: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:44 +0000 (09:48 +0200)] 
utmpdump: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agosulogin: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:43 +0000 (09:48 +0200)] 
sulogin: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agosu: fix minor typos in the man page
Ondrej Oprala [Tue, 8 Apr 2014 07:48:42 +0000 (09:48 +0200)] 
su: fix minor typos in the man page

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agorunuser: fix minor typos in the man page
Ondrej Oprala [Tue, 8 Apr 2014 07:48:41 +0000 (09:48 +0200)] 
runuser: fix minor typos in the man page

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agolast: fix minor typos in the man page
Ondrej Oprala [Tue, 8 Apr 2014 07:48:40 +0000 (09:48 +0200)] 
last: fix minor typos in the man page

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agofstrim: add hint to man page
Karel Zak [Thu, 10 Apr 2014 07:58:36 +0000 (09:58 +0200)] 
fstrim: add hint to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: fix .h.in usage in libblkid and libmount
Karel Zak [Mon, 7 Apr 2014 11:26:56 +0000 (13:26 +0200)] 
build-sys: fix .h.in usage in libblkid and libmount

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosetarch: Fix ppc64le architectures
Anton Blanchard [Sun, 6 Apr 2014 23:18:13 +0000 (09:18 +1000)] 
setarch: Fix ppc64le architectures

setarch currently fails on ppc64le because it tries to
use big endian architecture names. Fix it.

Signed-off-by: Anton Blanchard <anton@samba.org>
10 years agoumount: fix typo in usage
Jonathan Liu [Fri, 4 Apr 2014 13:08:01 +0000 (00:08 +1100)] 
umount: fix typo in usage

Signed-off-by: Jonathan Liu <net147@gmail.com>
10 years agologin: fix minor typos in the man page
Ondrej Oprala [Thu, 3 Apr 2014 16:08:21 +0000 (18:08 +0200)] 
login: fix minor typos in the man page

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agomkswap: Some minor typographical corrections to the manual
Bjarni Ingi Gislason [Thu, 3 Apr 2014 02:29:48 +0000 (02:29 +0000)] 
mkswap: Some minor typographical corrections to the manual

  -- changed to \(en (an en-dash) if it is a dash (pause, separation)

  - changed to \- if it indicates an option

  A full stop (.), that begins or ends a string, protected with \&

  Space between sentences corrected to two word spaces

  -- changed to \-\- if it indicates an option

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomkfs.minix: Some typographical changes in the manual
Bjarni Ingi Gislason [Thu, 3 Apr 2014 02:28:27 +0000 (02:28 +0000)] 
mkfs.minix: Some typographical changes in the manual

  - between numbers changed to \(en if it is a range

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomkfs.cramfs: Some typographical corrections to the manual
Bjarni Ingi Gislason [Thu, 3 Apr 2014 02:25:58 +0000 (02:25 +0000)] 
mkfs.cramfs: Some typographical corrections to the manual

  The unit "MB" is ambigous.  Use "MiB" if "M" does not mean 10^6.
Otherwise add "(M = 10^6)" after it.

  Changes:

  Unpaddable space (\ ) added between a number and an unit.  A nuber
and a unit are not one word.  Is "16MB" written "sixteenmegabytes"?

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomkfs.bfs: One typographical correction to the manual
Bjarni Ingi Gislason [Thu, 3 Apr 2014 02:23:04 +0000 (02:23 +0000)] 
mkfs.bfs: One typographical correction to the manual

  - between numbers changed to \(en  (an en-dash)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomkfs: Some typographical changes to the manual
Bjarni Ingi Gislason [Wed, 2 Apr 2014 23:42:06 +0000 (23:42 +0000)] 
mkfs: Some typographical changes to the manual

  - changed to \- if it means an option

  A full stop (.), that begins or ends a string, protected with \&

  No line adjustment used for section "SEE ALSO" (.na/.ad)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoisosize: A few typographical changes to the manual
Bjarni Ingi Gislason [Wed, 2 Apr 2014 23:37:26 +0000 (23:37 +0000)] 
isosize: A few typographical changes to the manual

  A full stop (.), that begins or ends a string, protected with \&

  A space between a number and an unit changed to an unpaddable space
"\ "

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofsck.minix: A few typographical corrections to the manual
Bjarni Ingi Gislason [Wed, 2 Apr 2014 23:35:29 +0000 (23:35 +0000)] 
fsck.minix: A few typographical corrections to the manual

  - between numbers changed to \(en if it means a range

  A full stop (.), that begins or ends a string, protected with \&

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofsck: Some typographical corrections to the manual
Bjarni Ingi Gislason [Wed, 2 Apr 2014 23:30:12 +0000 (23:30 +0000)] 
fsck: Some typographical corrections to the manual

  The word "kilobytes" is ambiguous.  Change it to "kibibytes" if kilo
does not mean 1000.  Otherwise add "(1000 B)" after it.

  A string, that begins or ends with a full stop (.), protected with \&

  - changed to \- if it shows an option

  -- change to \(en if it means a dash (pause, separation)

  Space between sentences is two word spaces in *roff.  Thus it is
better to begin each sentence on a new line when the file contains
formatting commands

  --- changed to \(en if it means a dash (pause, separation)

  Punctuation separated from a word with a space, if it is an argument
to a macro like "BR" (two font styles used alternately)

  Adjusting inhibited for the section "SEE ALSO" with ".na/.ad"

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdformat: Some minor change to the manual
Bjarni Ingi Gislason [Wed, 2 Apr 2014 23:25:08 +0000 (23:25 +0000)] 
fdformat: Some minor change to the manual

  \- changed to - (code "hyphen-minus", rendered with the glyph hyphen
in troff) if it is a part of a compound name.  A minus is not used in
words.  People using UTF-8 and copy-and-pase can(?) (may?) use "info",
"man --ascii" or the command "man" should have an option to display the
- in names of options with the code (character name) "hyphen-minus"
(u002D) instead of "u2010" (code (character) name "hyphen")

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoblockdev: Some minor corrections to the manual
Bjarni Ingi Gislason [Wed, 2 Apr 2014 23:23:32 +0000 (23:23 +0000)] 
blockdev: Some minor corrections to the manual

Macro, that alternately changes the input between two font styles,
changed to the macro for one font style change, if there is only one
argument

 Text string, that begins or ends with a full stop (.) protected with \&

 -- changed to \-\- if it is an option

 - changed to \(en if it is a dash (pause, seperation)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomount.8: Some typographical and prefix corrections to the manual
Bjarni Ingi Gislason [Tue, 1 Apr 2014 17:26:40 +0000 (17:26 +0000)] 
mount.8: Some typographical and prefix corrections to the manual

  I forgot to add the patch to the attachment.

  Additional changes to "Changes:"

  " \(em " changed to " \(en ", as the em-dash with a word space on each
side is to long (troff)

  ".na/.ad" is not used but .nf/.fi for a long command line and it is
split into two lines

  Word "illegal" is changed to "invalid"

  Word "hyphen-separated" is changed to '"hyphen-minus"-separated' as
the meaning is the code and not the glyph (on the command line) (beware
of UTF-8)

--
Bjarni I. Gislason

10 years agomount: apply "nofail" to MNT_ERR_NOSOURCE libmount error
Karel Zak [Mon, 7 Apr 2014 10:09:11 +0000 (12:09 +0200)] 
mount: apply "nofail" to MNT_ERR_NOSOURCE libmount error

 fstab:
     UUID=nonexist /mnt/nonexist1 ext4 nofail 0 1

 # mount -av
 mount: can't find UUID=nonexist

.. this is bug of course.

Reported-by: Patrick McLean <chutzpah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoumount: more robust success message for --all
Karel Zak [Mon, 7 Apr 2014 09:59:30 +0000 (11:59 +0200)] 
umount: more robust success message for --all

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomount: fix --all and nofail return code
Karel Zak [Mon, 7 Apr 2014 09:53:05 +0000 (11:53 +0200)] 
mount: fix --all and nofail return code

Now the "nofail" affects warnings warning messages only. That's wrong
and regression (against original non-libmount version). The nofail has
to control return code too.

Reported-by: Patrick McLean <chutzpah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: make qsort_r() optional
Karel Zak [Fri, 4 Apr 2014 14:02:35 +0000 (16:02 +0200)] 
libfdisk: make qsort_r() optional

The function is no critical for fdisk functionality. The SUN label
verification will check for less issues. All the verification code is
optional ('v' fdisk command).

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoswitch_root: verify initramfs by f_type, not devno
Dave Reisner [Wed, 2 Apr 2014 14:41:30 +0000 (10:41 -0400)] 
switch_root: verify initramfs by f_type, not devno

As of linux 3.14, the initramfs device will have both major and
minor 0, causing our paranoia check to fail. Make this version agnostic
by checking the filesystem type, rather than a device number.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomount: update mount.8 about barrier mount options defaults
Ruediger Meier [Fri, 21 Mar 2014 11:31:39 +0000 (12:31 +0100)] 
mount: update mount.8 about barrier mount options defaults

This patch comes originally from Jan Kara <jack@suse.cz> and updates
the default behaviour of the kernel which has been changed some years
ago. See kernel docs
  Documentation/filesystems/ext3.txt
  Documentation/filesystems/ext4.txt

10 years agofdisk: don't colorize "foo:" prefixes
Karel Zak [Tue, 1 Apr 2014 12:39:13 +0000 (14:39 +0200)] 
fdisk: don't colorize "foo:" prefixes

Based on master branch commit 412791a995890d3576906d86a39bbee6246eb01e.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolosetup: wait for udev
Karel Zak [Fri, 24 Jan 2014 12:58:40 +0000 (13:58 +0100)] 
losetup: wait for udev

On system with /dev/lop-control the udevd creates /dev/loopN nodes.
It seems better to wait a moment after unsuccessful open(/dev/loopN)
and try it to open again.

The problem is pretty visible on systems where udevd also modifies
permission for loopN devices, then open() fails with EACCES when
losetup executed by non-root user (but user who is in "disk" group).

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1045432
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: cleanup, remove unused lscpu output
Ruediger Meier [Thu, 27 Mar 2014 10:31:16 +0000 (11:31 +0100)] 
tests: cleanup, remove unused lscpu output

All these files are not used since a292bbde or 0d86c70a.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agotests: add lscpu dump for ppc cpu with no cache size
Ruediger Meier [Thu, 27 Mar 2014 10:19:37 +0000 (11:19 +0100)] 
tests: add lscpu dump for ppc cpu with no cache size

Taken from qemu-system-ppc (qemu 1.7) machine with installed
debian 7.4 wheezy, kernel 3.2.0-4-powerpc.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agolscpu: cleanup, use _PATH_SYS_CPU/NODE
Ruediger Meier [Thu, 27 Mar 2014 08:18:32 +0000 (09:18 +0100)] 
lscpu: cleanup, use _PATH_SYS_CPU/NODE

This make most lines shorter than 80 chars again (tab-witdh 4).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agolscpu: don't abort if cache size is unknown
Ruediger Meier [Wed, 26 Mar 2014 21:18:17 +0000 (22:18 +0100)] 
lscpu: don't abort if cache size is unknown

There are systems where the size file does not exist. Most badly even
lscpu -p would abort allthough it does not use the size:
$ lscpu -p
lscpu: error: cannot open
/sys/devices/system/cpu/cpu0/cache/index0/size: No such file or directory

This patch does not abort in this case and prints "unknown size" in
human-readable case. For examle on this qemu pcc test machine:
$ lscpu
Architecture:          ppc
CPU op-mode(s):        32-bit
Byte Order:            Big Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Model:                 Power Macintosh
BogoMIPS:              33.25
L1d cache:             unknown size
L1i cache:             unknown size

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoflock: use nfs4 fallback on EBADF too
Karel Zak [Mon, 24 Mar 2014 10:26:21 +0000 (11:26 +0100)] 
flock: use nfs4 fallback on EBADF too

The kernel regression (probably v3.4, commit 55725513) introduces a
new errno for O_RDONLY on NFS. Now it returns EBADF rather than EIO.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1078618
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: properly implement read-only mode
Karel Zak [Fri, 21 Mar 2014 13:04:59 +0000 (14:04 +0100)] 
libfdisk: properly implement read-only mode

Don't use fallback to read-only mode in fdisk_context_assign_device(),
it's application responsibility open the device in the right mode.

The commands fdisk and cfdisk check (and report) read-only mode now.

Reported-by: Maciej Małecki <me@mmalecki.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoscriptreplay: no need to skip first time value or last bytes fixes #58
Wolfgang Richter [Thu, 20 Mar 2014 02:47:11 +0000 (22:47 -0400)] 
scriptreplay: no need to skip first time value or last bytes fixes #58

10 years agoscript: time from end of read() call partially fixes #58
Wolfgang Richter [Thu, 20 Mar 2014 02:45:48 +0000 (22:45 -0400)] 
script: time from end of read() call partially fixes #58

10 years agounshare: include libmount.h to provide missing MS_* defines
Ruediger Meier [Mon, 17 Mar 2014 10:48:47 +0000 (11:48 +0100)] 
unshare: include libmount.h to provide missing MS_* defines

Since 6728ca10 we are using MS_PRIVATE and MS_REC which are not defined
in some systems's sys/mount.h.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoipcs: fix memleak in ipc_*_get_info functions
Ruediger Meier [Thu, 13 Mar 2014 08:20:50 +0000 (09:20 +0100)] 
ipcs: fix memleak in ipc_*_get_info functions

In case of error (maxid < 0) we do not enter following for loop. It will
return 0 and free the structs afterwards because i is still 0.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoipcs: fix ipc_sem_get_info fallback case
Ruediger Meier [Thu, 13 Mar 2014 08:07:44 +0000 (09:07 +0100)] 
ipcs: fix ipc_sem_get_info fallback case

"ipcs -s -i n" (case id >= 0) was broken since v2.22-254-g1e2418a if /sys
is not usable.

See also comments for commit "ipcs: fix ipc_msg_get_info fallback case".

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoipcs: fix ipc_shm_get_info fallback case
Ruediger Meier [Wed, 12 Mar 2014 21:46:15 +0000 (22:46 +0100)] 
ipcs: fix ipc_shm_get_info fallback case

"ipcs -m -i n" (case id >= 0) was broken since v2.22-251-g61e14b4 if /sys
is not usable.

See also comments for commit "ipcs: fix ipc_msg_get_info fallback case".

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoipcs: fix ipc_msg_get_info fallback case
Ruediger Meier [Wed, 12 Mar 2014 13:53:20 +0000 (14:53 +0100)] 
ipcs: fix ipc_msg_get_info fallback case

"ipcs -q" (case id < 0) was broken since v2.22-256-g35118df if /sys
is not usable. The main issue was that the use of msqid argument did not
cleanly distinguished between "queue identifier" and "index of kernel's
internal array".

Also now the fallback case and the regular case behave more equally
regarding it's return value (introducing another counter j).

Note that the case id >= 0 now performs a slower lookup. This could be
avoided but then we would better handle both case differently like it
was before the above mentioned cleanup commit.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoipcs: cleanup jumplabel stlyes
Ruediger Meier [Thu, 13 Mar 2014 08:28:40 +0000 (09:28 +0100)] 
ipcs: cleanup jumplabel stlyes

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agobuild-sys: libmount/python/__init__.py is always a dist file
Ruediger Meier [Thu, 13 Mar 2014 14:08:13 +0000 (15:08 +0100)] 
build-sys: libmount/python/__init__.py is always a dist file

"make dist" and "make distcheck" should work after a bare
./configure to give us a full featured tar ball.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoinclude/closestream: don't wipe errno on EPIPE
Karel Zak [Thu, 13 Mar 2014 11:41:03 +0000 (12:41 +0100)] 
include/closestream: don't wipe errno on EPIPE

... the code in close_stdout() is sensitive to EPIPE, so
wipe errno is close_stream() is probably bad idea.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodmesg: don't report EPIPE
Karel Zak [Thu, 13 Mar 2014 11:39:09 +0000 (12:39 +0100)] 
dmesg: don't report EPIPE

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agohwclock: fix possible hang and other set_hardware_clock_exact() issues
Chris MacGregor [Thu, 27 Feb 2014 18:40:59 +0000 (10:40 -0800)] 
hwclock: fix possible hang and other set_hardware_clock_exact() issues

In sys-utils/hwclock.c, set_hardware_clock_exact() has some problems when the
process gets pre-empted (for more than 100ms) before reaching the time for
which it waits:

1. The "continue" statement causes execution to skip the final tdiff
assignment at the end of the do...while loop, leading to the while condition
using the wrong value of tdiff, and thus always exiting the loop once
newhwtime != sethwtime (e.g., after 1 second).  This masks bug # 2, below.

2. The previously-existing bug is that because it starts over waiting for the
desired time whenever two successive calls to gettimeofday() return values >
100ms apart, the loop will never terminate unless the process holds the CPU
(without losing it for more than 100ms) for at least 500ms.  This can happen
on a heavily loaded machine or on a virtual machine (or on a heavily loaded
virtual machine).  This has been observed to occur, preventing a machine from
completing the shutdown or reboot process due to a "hwclock --systohc" call in
a shutdown script.

The new implementation presented in this patch takes a somewhat different
approach, intended to accomplish the same goals:

It computes the desired target system time (at which the requested hardware
clock time will be applied to the hardware clock), and waits for that time to
arrive.  If it misses the time (such as due to being pre-empted for too long),
it recalculates the target time, and increases the tolerance (how late it can
be relative to the target time, and still be "close enough".  Thus, if all is
well, the time will be set *very* precisely.  On a machine where the hwclock
process is repeatedly pre-empted, it will set the time as precisely as is
possible under the conditions present on that particular machine.  In any
case, it will always terminate eventually (and pretty quickly); it will never
hang forever.

[kzak@redhat.com: - tiny coding style changes]

Signed-off-by: Chris MacGregor <chrismacgregor@google.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agochcpu: cleanup stdout/stderr usage
Karel Zak [Wed, 5 Mar 2014 10:23:16 +0000 (11:23 +0100)] 
chcpu: cleanup stdout/stderr usage

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agochcpu: cleanup return codes
Karel Zak [Wed, 5 Mar 2014 10:06:59 +0000 (11:06 +0100)] 
chcpu: cleanup return codes

The code currently always return EXIT_SUCCESS, that's strange. It
seems better to return 0 on success, 1 on complete failure and 64 on
partial success.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: don't connect _DEPENDENCIES and _LIBADD
Karel Zak [Wed, 5 Mar 2014 09:20:10 +0000 (10:20 +0100)] 
build-sys: don't connect _DEPENDENCIES and _LIBADD

The _DEPENDENCIES has to be used for dependencies on another in-tree
files, but _LIBADD is to specify additional libs (including external
libs).

Reported-by: oleid <notifications@github.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolscpu: read_hypervisor_dmi: only fallback to memory scan on x86/x86_64
Stewart Smith [Tue, 4 Mar 2014 04:39:41 +0000 (15:39 +1100)] 
lscpu: read_hypervisor_dmi: only fallback to memory scan on x86/x86_64

As the comment in the code says, this method is really only valid
on x86 and x86_64, so add a #ifdef for those architectures around
that code block.

This was causing "Program lscpu tried to access /dev/mem between f0000->100000."
warnings on some ppc64 machines.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
10 years agolscpu: don't assume filesystem supports d_type when searching for NUMA nodes
Stewart Smith [Tue, 4 Mar 2014 04:27:27 +0000 (15:27 +1100)] 
lscpu: don't assume filesystem supports d_type when searching for NUMA nodes

Not all file systems support the d_type field and simply checking for
d_type == DT_DIR in is_node_dirent would cause the test suite to fail
if run on (for example) XFS.

The simple fix is to check for DT_DIR or DT_UNKNOWN in is_node_dirent.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
10 years agoswitch_root: make dirent d_type usage more robust
Karel Zak [Tue, 4 Mar 2014 10:45:44 +0000 (11:45 +0100)] 
switch_root: make dirent d_type usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolib/sysfs: make dirent d_type usage more robust
Karel Zak [Tue, 4 Mar 2014 10:30:03 +0000 (11:30 +0100)] 
lib/sysfs: make dirent d_type usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopartx: make dirent d_type usage more robust
Karel Zak [Tue, 4 Mar 2014 10:27:46 +0000 (11:27 +0100)] 
partx: make dirent d_type usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoscript: Also flush writes to timing file.
Jesper Dahl Nyerup [Tue, 18 Feb 2014 19:48:45 +0000 (20:48 +0100)] 
script: Also flush writes to timing file.

If both -f and -t are given, flush the timing fd on each write, similar
to the behavior on the script fd. This allows playback of still-running
sessions, and reduces the risk of ending up with empty timing files when
script(1) exits abnormally.

Signed-off-by: Jesper Dahl Nyerup <nyerup@one.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomore: improve formatting and wording of man page and help text
Benno Schulenberg [Sun, 9 Feb 2014 10:26:49 +0000 (11:26 +0100)] 
more: improve formatting and wording of man page and help text

Also, slice up the usage text for ease of translation.

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agolibmount: FS id and parent ID could be zero
Karel Zak [Thu, 20 Feb 2014 15:59:11 +0000 (16:59 +0100)] 
libmount: FS id and parent ID could be zero

It seems that linux 3.14 is able to produce things like:

  19 0 8:3 / / rw,relatime - ext4 /dev/sda3 rw,data=ordered
     ^

Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibblkid: add extra checks to XFS prober
Karel Zak [Wed, 19 Feb 2014 12:27:56 +0000 (13:27 +0100)] 
libblkid: add extra checks to XFS prober

The current code rely on XFS magic string only. It seems too fragile.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoswaplabel: wrong version number in check
Sami Kerola [Sun, 16 Feb 2014 23:54:19 +0000 (23:54 +0000)] 
swaplabel: wrong version number in check

$ swaplabel /dev/sda2
swaplabel: /dev/sda2: unsupported swap version '1'

The mkswap does not allow any other version, so swaplabel(8) must be
wrong.

Reference: https://github.com/karelzak/util-linux/blob/master/disk-utils/mkswap.c#L520
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agolibmount: initialize *root to NULL in mnt_table_get_root_fs
Thomas Bächler [Sun, 16 Feb 2014 13:58:06 +0000 (14:58 +0100)] 
libmount: initialize *root to NULL in mnt_table_get_root_fs

mnt_table_get_root_fs only works when *root is set to NULL. This
is not only undocumented, but also unintuitive. Fix it by initializing
*root inside mnt_table_get_root_fs.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosu: don't use kill(0, ...) when propagate signal
Karel Zak [Mon, 17 Feb 2014 12:22:30 +0000 (13:22 +0100)] 
su: don't use kill(0, ...) when propagate signal

The current code uses kill(0, caught_signal) after regular
signal cleanup and before exit (all just to make shells happy).

Unfortunately, kill(0, ...) is a bad idea. It seems better to use
kill(getpid(), ...) otherwise we kill our parent process too.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1063887
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: accept (deleted) path suffix in mountinfo file
Karel Zak [Mon, 17 Feb 2014 12:12:23 +0000 (13:12 +0100)] 
libmount: accept (deleted) path suffix in mountinfo file

Addresses: debian bug #711183
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofallocate: Clarify that space can also be deallocated
Rodrigo Campos [Sat, 25 Jan 2014 19:17:26 +0000 (19:17 +0000)] 
fallocate: Clarify that space can also be deallocated

The functionality is already there, with --punch-hole, but the text was for the
preallocation case only.

Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
10 years agorenice: correct max priority in renice man page
Phillip Susi [Sat, 8 Feb 2014 18:22:10 +0000 (13:22 -0500)] 
renice: correct max priority in renice man page

The man page stated that the PRIO_MAX is 20.  While this
is correct, the header definition is wrong and the max
value is actually 19.

[kzak@redhat.com: - remove PRIO_MAX from man page, kernel syscalls
                    use hardcoded numbers for the priority limits]

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomount: remove obsolete and confusing statement from mount.8
Phillip Susi [Sat, 8 Feb 2014 16:44:02 +0000 (11:44 -0500)] 
mount: remove obsolete and confusing statement from mount.8

The wording was confusing and suidperl has gone the way
of the dodo, and really didn't need mentionting in mount.8.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
10 years agofix mkfs --verbose and man page
Phillip Susi [Fri, 7 Feb 2014 22:01:20 +0000 (17:01 -0500)] 
fix mkfs --verbose and man page

mkfs did not actually accept the long form --verbose option.
Also the man page seemed to indicate that version/verbose/help
options were passed to the filesystem specific utility when this
is not the case.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
10 years agogetopt.1: The usual doc dir is /usr/share/doc, not .../docs
Ville Skyttä [Sat, 25 Jan 2014 12:23:49 +0000 (14:23 +0200)] 
getopt.1: The usual doc dir is /usr/share/doc, not .../docs

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
10 years agosetpriv: Fix --apparmor-profile
Andy Lutomirski [Fri, 24 Jan 2014 20:02:59 +0000 (12:02 -0800)] 
setpriv: Fix --apparmor-profile

There were two bugs.  First, trying to access /proc/self/attr/exec
with O_CREAT | O_EXCL has no chance of working.  Second, it turns
out that the correct command to send is "exec", not "changeprofile".
Of course, there was no way to know this until:

    commit 3eea57c26e49a5add4c053a031cc2a1977b7c48e
    Author: John Johansen <john.johansen@canonical.com>
    Date:   Wed Feb 27 03:44:40 2013 -0800

        apparmor: fix setprocattr arg processing for onexec

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
10 years agonsenter: fix set{gid,uid} order,drop supplementary groups
Karel Zak [Thu, 6 Feb 2014 13:14:50 +0000 (14:14 +0100)] 
nsenter: fix set{gid,uid} order,drop supplementary groups

.. always, always setgid() before setuid()!

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1061751
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodmesg: -w output not line-buffered
Karel Zak [Thu, 6 Feb 2014 10:48:40 +0000 (11:48 +0100)] 
dmesg: -w output not line-buffered

when writing to e.g. a pipe, output from dmesg -w can come many
minutes late due to buffering.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1060925
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: release++ (v2.24.1) v2.24.1
Karel Zak [Mon, 20 Jan 2014 12:34:39 +0000 (13:34 +0100)] 
build-sys: release++ (v2.24.1)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update v2.24.1-ReleaseNotes
Karel Zak [Mon, 20 Jan 2014 12:33:10 +0000 (13:33 +0100)] 
docs: update v2.24.1-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update AUTHORS file
Karel Zak [Mon, 20 Jan 2014 12:27:28 +0000 (13:27 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: merge changes
Karel Zak [Mon, 20 Jan 2014 12:07:24 +0000 (13:07 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: update zh_CN.po (from translationproject.org)
Wylmer Wang [Mon, 20 Jan 2014 11:53:45 +0000 (12:53 +0100)] 
po: update zh_CN.po (from translationproject.org)

10 years agopo: update pt_BR.po (from translationproject.org)
Rafael Ferreira [Mon, 20 Jan 2014 11:53:45 +0000 (12:53 +0100)] 
po: update pt_BR.po (from translationproject.org)

10 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Mon, 20 Jan 2014 11:53:45 +0000 (12:53 +0100)] 
po: update de.po (from translationproject.org)

10 years agopo: update da.po (from translationproject.org)
Joe Hansen [Mon, 20 Jan 2014 11:53:45 +0000 (12:53 +0100)] 
po: update da.po (from translationproject.org)

10 years agoflock: Change the 'exit status' man page section to make more sense
Wieland Hoffmann [Thu, 16 Jan 2014 00:06:32 +0000 (01:06 +0100)] 
flock: Change the 'exit status' man page section to make more sense

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>