]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
10 years agodocs: sort the options in the man page of sfdisk alphabetically
Benno Schulenberg [Sun, 8 Feb 2015 20:21:30 +0000 (21:21 +0100)] 
docs: sort the options in the man page of sfdisk alphabetically

Also fix some typos.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: also recognize a lowercase 'l' for loading a script file
Benno Schulenberg [Sun, 8 Feb 2015 20:21:29 +0000 (21:21 +0100)] 
cfdisk: also recognize a lowercase 'l' for loading a script file

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: do not startle the user with a false message when --zero is used
Benno Schulenberg [Sun, 8 Feb 2015 20:21:28 +0000 (21:21 +0100)] 
cfdisk: do not startle the user with a false message when --zero is used

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agoMerge branch 'hwman' of github.com:jwpi/util-linux
Karel Zak [Tue, 10 Feb 2015 10:53:42 +0000 (11:53 +0100)] 
Merge branch 'hwman' of github.com:jwpi/util-linux

* 'hwman' of github.com:jwpi/util-linux:
  hwclock: add checking kernel vars to man-page
  hwclock: Add ntptime reference to man-page

10 years agoRevert "libmount: MNT_OMODE_FORCE usage"
Karel Zak [Tue, 10 Feb 2015 10:40:56 +0000 (11:40 +0100)] 
Revert "libmount: MNT_OMODE_FORCE usage"

This reverts commit 6f41c5de40629c71a8f79e9be4b94f9a75f9ad21.

10 years agosetarch: fix typo (missing braces) for ppcle
Ruediger Meier [Mon, 9 Feb 2015 15:11:02 +0000 (16:11 +0100)] 
setarch: fix typo (missing braces) for ppcle

Introduced in 77eb13b9, noticed on ppc64le.

CC: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agocal: use int64_t instead of long
Ruediger Meier [Mon, 9 Feb 2015 15:11:01 +0000 (16:11 +0100)] 
cal: use int64_t instead of long

Followup 26f3a386, bigyear test was broken on ppc.

CC: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoFix "Script started" buffering race
Stanislav Brabec [Fri, 6 Feb 2015 18:59:14 +0000 (19:59 +0100)] 
Fix "Script started" buffering race

script -c "echo Hallo World" </dev/null >script.log ; cat script.log

Before:
Hallo World
Script started, file is typescript
Script started, file is typescript
Script done, file is typescript

After:
Script started, file is typescript
Hallo World
Script done, file is typescript

10 years agolibmount: MNT_OMODE_FORCE usage
Fridolin Pokorny [Fri, 6 Feb 2015 14:55:21 +0000 (15:55 +0100)] 
libmount: MNT_OMODE_FORCE usage

Hi,

I have found out that libmount does not respect MNT_OMODE_FORCE mode.
I don't see any usage in sources and libmount does not respect this mode
when calling library functions. I'm proposing a patch to fix this.

Have a nice day!
Fridolin Pokorny

10 years agodocs: fix two paths of the v2.20-ReleaseNotes
Benno Schulenberg [Fri, 6 Feb 2015 11:44:02 +0000 (12:44 +0100)] 
docs: fix two paths of the v2.20-ReleaseNotes

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agodocs: improve the grammar of the "see the changelog" phrase
Benno Schulenberg [Fri, 6 Feb 2015 11:44:01 +0000 (12:44 +0100)] 
docs: improve the grammar of the "see the changelog" phrase

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agodocs: retrofit the dates on some old release announcements
Benno Schulenberg [Fri, 6 Feb 2015 11:44:00 +0000 (12:44 +0100)] 
docs: retrofit the dates on some old release announcements

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agodocs: fix the link to the rc1 changelog
Benno Schulenberg [Fri, 6 Feb 2015 11:43:59 +0000 (12:43 +0100)] 
docs: fix the link to the rc1 changelog

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agofsck: use monotonic time to fsck run time measurement
Sami Kerola [Tue, 3 Feb 2015 18:51:03 +0000 (18:51 +0000)] 
fsck: use monotonic time to fsck run time measurement

Earlier use of gettimeofday() resulted to wrong measurement if system
administrator did manual time changes, or NTP or adjtime(3) adjusment
happen during fsck run.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agolscpu: fix typos in ppc code
Karel Zak [Mon, 9 Feb 2015 11:03:18 +0000 (12:03 +0100)] 
lscpu: fix typos in ppc code

Reported-by: David Gibson <dgibson@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agohwclock: add checking kernel vars to man-page
J William Piggott [Sun, 8 Feb 2015 21:44:26 +0000 (16:44 -0500)] 
hwclock: add checking kernel vars to man-page

How to check kernel clock variables with either
adjtimex or ntptime added to man-page.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
10 years agohwclock: Add ntptime reference to man-page
J William Piggott [Sun, 8 Feb 2015 01:44:02 +0000 (20:44 -0500)] 
hwclock: Add ntptime reference to man-page

Some distros do not have an adjtimex package;
ntptime can be used as an alternate.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
10 years agolscpu: cleanup ppc virtualization detection
Karel Zak [Fri, 6 Feb 2015 10:23:40 +0000 (11:23 +0100)] 
lscpu: cleanup ppc virtualization detection

References: https://bugzilla.redhat.com/show_bug.cgi?id=1151604
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: fix compiler warning
Karel Zak [Fri, 6 Feb 2015 09:34:06 +0000 (10:34 +0100)] 
libfdisk: fix compiler warning

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolscpu: fix compiler error [-Werror=format-security]
Karel Zak [Fri, 6 Feb 2015 09:31:03 +0000 (10:31 +0100)] 
lscpu: fix compiler error [-Werror=format-security]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: make code more readable
Karel Zak [Fri, 6 Feb 2015 09:24:18 +0000 (10:24 +0100)] 
libfdisk: make code more readable

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolscpu: detect also QEMU emulation on ppc
Karel Zak [Thu, 5 Feb 2015 15:50:29 +0000 (16:50 +0100)] 
lscpu: detect also QEMU emulation on ppc

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: release++ (v2.26-rc2) v2.26-rc2
Karel Zak [Wed, 4 Feb 2015 10:50:19 +0000 (11:50 +0100)] 
build-sys: release++ (v2.26-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update v2.26-ReleaseNotes
Karel Zak [Wed, 4 Feb 2015 10:48:33 +0000 (11:48 +0100)] 
docs: update v2.26-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: update AUTHORS file
Karel Zak [Wed, 4 Feb 2015 10:45:20 +0000 (11:45 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: merge changes
Karel Zak [Wed, 4 Feb 2015 10:42:08 +0000 (11:42 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Wed, 4 Feb 2015 10:38:16 +0000 (11:38 +0100)] 
po: update uk.po (from translationproject.org)

10 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Wed, 4 Feb 2015 10:38:16 +0000 (11:38 +0100)] 
po: update pl.po (from translationproject.org)

10 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Wed, 4 Feb 2015 10:38:16 +0000 (11:38 +0100)] 
po: update nl.po (from translationproject.org)

10 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Wed, 4 Feb 2015 10:38:16 +0000 (11:38 +0100)] 
po: update ja.po (from translationproject.org)

10 years agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Wed, 4 Feb 2015 10:38:16 +0000 (11:38 +0100)] 
po: update es.po (from translationproject.org)

10 years agopo: update de.po (from translationproject.org)
Mario Blättermann [Wed, 4 Feb 2015 10:38:16 +0000 (11:38 +0100)] 
po: update de.po (from translationproject.org)

10 years agotests: update build-sys tests
Karel Zak [Wed, 4 Feb 2015 10:34:39 +0000 (11:34 +0100)] 
tests: update build-sys tests

The systemd libs are merged into one shared library only.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: don't hardcode devnames
Karel Zak [Tue, 3 Feb 2015 13:20:53 +0000 (14:20 +0100)] 
tests: don't hardcode devnames

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: fix type pointer usage
Karel Zak [Tue, 3 Feb 2015 13:05:05 +0000 (14:05 +0100)] 
libmount: fix type pointer usage

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: grain is in bytes, fix previous patches
Karel Zak [Tue, 3 Feb 2015 12:44:16 +0000 (13:44 +0100)] 
libfdisk: grain is in bytes, fix previous patches

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update MBR sort test
Karel Zak [Tue, 3 Feb 2015 12:28:50 +0000 (13:28 +0100)] 
tests: update MBR sort test

Now libfdisk writes empty disk labels too. See commit
3d919d95838241aa7ddfe8df7d17ea0fc7d0f5e7.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: (dos) make a helpful message fit within 80 characters
Benno Schulenberg [Mon, 2 Feb 2015 20:44:34 +0000 (21:44 +0100)] 
libfdisk: (dos) make a helpful message fit within 80 characters

Also add a hint for translators.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agolibfdisk: don't align very small partitions
Karel Zak [Tue, 3 Feb 2015 12:20:45 +0000 (13:20 +0100)] 
libfdisk: don't align very small partitions

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: improve ui_get_size() warnings
Karel Zak [Tue, 3 Feb 2015 12:06:20 +0000 (13:06 +0100)] 
cfdisk: improve ui_get_size() warnings

 - don't reset to default after error
 - clean previous warnings after users response
 - remove unnecessary warning

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: fix issues with very small partitions
Karel Zak [Tue, 3 Feb 2015 11:44:00 +0000 (12:44 +0100)] 
libfdisk: fix issues with very small partitions

 - cfdisk: minimal partitions size is 1 sector
 - dos: when align last sector then don't set partition size to zero
   for very small partitions.
 - don't ignore tiny partitions before free space when define
   free-space start offset
 - improve some debug messages

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: (dos) write new empty label too
Karel Zak [Tue, 3 Feb 2015 11:03:12 +0000 (12:03 +0100)] 
libfdisk: (dos) write new empty label too

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: add new cfdisk request to TODO file
Karel Zak [Tue, 3 Feb 2015 10:22:21 +0000 (11:22 +0100)] 
docs: add new cfdisk request to TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agodocs: add info about *_DEBUG= to man pages
Karel Zak [Tue, 3 Feb 2015 10:16:46 +0000 (11:16 +0100)] 
docs: add info about *_DEBUG= to man pages

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: print "wrong order" warning after startup, colorize info messages
Karel Zak [Tue, 3 Feb 2015 10:04:37 +0000 (11:04 +0100)] 
cfdisk: print "wrong order" warning after startup, colorize info messages

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: force main menu to default to Quit/New menu items
Karel Zak [Tue, 3 Feb 2015 09:37:33 +0000 (10:37 +0100)] 
cfdisk: force main menu to default to Quit/New menu items

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: disable some KEY_* in ui_get_wqstring()
Karel Zak [Mon, 2 Feb 2015 12:05:48 +0000 (13:05 +0100)] 
cfdisk: disable some KEY_* in ui_get_wqstring()

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: default to Quit menu item
Karel Zak [Mon, 2 Feb 2015 11:47:50 +0000 (12:47 +0100)] 
cfdisk: default to Quit menu item

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: (dos) fix logical partitions errors handling
Karel Zak [Mon, 2 Feb 2015 11:20:44 +0000 (12:20 +0100)] 
libfdisk: (dos) fix logical partitions errors handling

The current code in add_partition() de-increment number of partitions
on error when logical partition requested and add_logical() does the
same. The result is mess in partitions array.

The another fixed issue is that add_logical() is called if all primary
partitions are already used although 'pa->start' (the template) is
explicitly defined outside the extended partition. The right behavior
is to end with error message.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotextual: grammarize and harmonize the stat error message
Benno Schulenberg [Thu, 29 Jan 2015 20:21:48 +0000 (21:21 +0100)] 
textual: grammarize and harmonize the stat error message

The message "stat failed %s" seems to say that stat() failed to
do something, or failed to pass a test, but of course it means
that the statting of something failed.  So say so.  Also make
two very similar messages equal to this one.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agodocs: mention nice(1) in renice(1) manual page
Sami Kerola [Thu, 29 Jan 2015 07:52:27 +0000 (07:52 +0000)] 
docs: mention nice(1) in renice(1) manual page

Addresses: https://bugs.debian.org/260984
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agomount: Further FAT mount option update
Jan Kara [Wed, 28 Jan 2015 09:50:53 +0000 (10:50 +0100)] 
mount: Further FAT mount option update

Add some mount options mentioned in Documentation/filesystems/vfat.txt.

Signed-off-by: Jan Kara <jack@suse.cz>
10 years agomount: Add documentation of FAT mount option time_offset
Jan Kara [Wed, 28 Jan 2015 09:00:25 +0000 (10:00 +0100)] 
mount: Add documentation of FAT mount option time_offset

Signed-off-by: Jan Kara <jack@suse.cz>
10 years agowhereis: lookup also info docs
Karel Zak [Mon, 2 Feb 2015 10:15:47 +0000 (11:15 +0100)] 
whereis: lookup also info docs

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosfdisk: actually translate the table headers by calling gettext()
Benno Schulenberg [Sun, 1 Feb 2015 21:12:14 +0000 (22:12 +0100)] 
sfdisk: actually translate the table headers by calling gettext()

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agodocs: add the Sort command to the man page of cfdisk
Benno Schulenberg [Sun, 1 Feb 2015 14:00:13 +0000 (15:00 +0100)] 
docs: add the Sort command to the man page of cfdisk

Also sort T into its proper position, improve the wording of U,
and add the Left and Right arrow keys.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agobuild-sys: improve wording and punctuation of several messages
Benno Schulenberg [Sun, 1 Feb 2015 14:00:12 +0000 (15:00 +0100)] 
build-sys: improve wording and punctuation of several messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agolibfdisk: actually translate the human-readable name of the partition type
Benno Schulenberg [Sun, 1 Feb 2015 14:00:11 +0000 (15:00 +0100)] 
libfdisk: actually translate the human-readable name of the partition type

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agolib/strutils: accept not just 'B' but also lowercase 'b' in a size suffix
Benno Schulenberg [Sun, 1 Feb 2015 14:00:10 +0000 (15:00 +0100)] 
lib/strutils: accept not just 'B' but also lowercase 'b' in a size suffix

Just line 'M' and 'm' are accepted for mega, 'G' and 'g' for giga,
'S' and 's' for sectors, and so on.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: make '?' an alias of 'h', to also show the help screen
Benno Schulenberg [Sun, 1 Feb 2015 14:00:09 +0000 (15:00 +0100)] 
cfdisk: make '?' an alias of 'h', to also show the help screen

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: punctuate the bottombar messages consistently
Benno Schulenberg [Sun, 1 Feb 2015 14:00:08 +0000 (15:00 +0100)] 
cfdisk: punctuate the bottombar messages consistently

Also adjust the style of two comments and add another.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: improve wording and consistency of the size warnings
Benno Schulenberg [Sun, 1 Feb 2015 14:00:07 +0000 (15:00 +0100)] 
cfdisk: improve wording and consistency of the size warnings

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: remove the mistaken B from the explanation of size suffixes
Benno Schulenberg [Sun, 1 Feb 2015 14:00:06 +0000 (15:00 +0100)] 
cfdisk: remove the mistaken B from the explanation of size suffixes

Also reword the explanation to be clearer.  It is not necessary to
be complete -- that is what the man page is for.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agolibfdisk: (dos) delete also logical with extended
Karel Zak [Mon, 2 Feb 2015 09:38:05 +0000 (10:38 +0100)] 
libfdisk: (dos) delete also logical with extended

deleting an extended partition with cfdisk leaves its contained
partitions in existence

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agowipefs: fix FD leak on error [coverity scan]
Karel Zak [Thu, 29 Jan 2015 11:40:06 +0000 (12:40 +0100)] 
wipefs: fix FD leak on error [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsblk: implement SOMEOK (=64) return code
Karel Zak [Thu, 29 Jan 2015 11:35:26 +0000 (12:35 +0100)] 
lsblk: implement SOMEOK (=64) return code

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofindmnt: fix mem leaks [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:59:54 +0000 (11:59 +0100)] 
findmnt: fix mem leaks [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoutmpdump: don't pass parameter of type "struct utmp" by value [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:40:47 +0000 (11:40 +0100)] 
utmpdump: don't pass parameter of type "struct utmp" by value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosulogin: make sure that fallback FD is valid [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:32:42 +0000 (11:32 +0100)] 
sulogin: make sure that fallback FD is valid [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosu: fix mem leak in modify_environ() [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:26:09 +0000 (11:26 +0100)] 
su: fix mem leak in modify_environ() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agologin: fix mem leak in init_environ() [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:25:07 +0000 (11:25 +0100)] 
login: fix mem leak in init_environ() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibsmartcols: remove unnecessary check [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:07:37 +0000 (11:07 +0100)] 
libsmartcols: remove unnecessary check [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: fix possible mem leak in has_utab_entry() [coverity scan]
Karel Zak [Thu, 29 Jan 2015 10:03:49 +0000 (11:03 +0100)] 
libmount: fix possible mem leak in has_utab_entry() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: fix mem leak in do_mount_by_types() [coverity scan]
Karel Zak [Thu, 29 Jan 2015 09:58:55 +0000 (10:58 +0100)] 
libmount: fix mem leak in do_mount_by_types() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: make fdisk_partition_to_string() more robust [coverity scan]
Karel Zak [Thu, 29 Jan 2015 09:49:51 +0000 (10:49 +0100)] 
libfdisk: make fdisk_partition_to_string() more robust [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: (gpt) check return from GUID parser [coverity scan]
Karel Zak [Wed, 28 Jan 2015 14:10:15 +0000 (15:10 +0100)] 
libfdisk: (gpt) check return from GUID parser [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: fix possible mem leak [coverity scan]
Karel Zak [Wed, 28 Jan 2015 14:05:14 +0000 (15:05 +0100)] 
libfdisk: fix possible mem leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibblkid: (hfs) avoid overflow [coverity scan]
Karel Zak [Wed, 28 Jan 2015 14:02:41 +0000 (15:02 +0100)] 
libblkid: (hfs) avoid overflow [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibblkid: fix macro redefinition [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:57:53 +0000 (14:57 +0100)] 
libblkid: fix macro redefinition [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolib/sysfs: use ssize_t for sysfs_readlink() [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:55:20 +0000 (14:55 +0100)] 
lib/sysfs: use ssize_t for sysfs_readlink() [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agosfdisk: fix --id fallthrough [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:50:38 +0000 (14:50 +0100)] 
sfdisk: fix --id fallthrough [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofsck: deallocate when no cache [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:45:15 +0000 (14:45 +0100)] 
fsck: deallocate when no cache [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: check return and robust label usage [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:40:10 +0000 (14:40 +0100)] 
fdisk: check return and robust label usage [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoblockdev: check return when read from sysfs [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:33:30 +0000 (14:33 +0100)] 
blockdev: check return when read from sysfs [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: fix mem leak and main_menu_action() logic [coverity scan]
Karel Zak [Wed, 28 Jan 2015 13:30:20 +0000 (14:30 +0100)] 
cfdisk: fix mem leak and main_menu_action() logic [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: support unknown partition types in sfdisk scripts
Karel Zak [Wed, 28 Jan 2015 08:57:03 +0000 (09:57 +0100)] 
libfdisk: support unknown partition types in sfdisk scripts

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1183234
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoMerge branch 'fix-tests-ppc' of https://github.com/rudimeier/util-linux
Karel Zak [Wed, 28 Jan 2015 07:30:17 +0000 (08:30 +0100)] 
Merge branch 'fix-tests-ppc' of https://github.com/rudimeier/util-linux

* 'fix-tests-ppc' of https://github.com/rudimeier/util-linux:
  tests: fix fdisk/bsd again for big endian
  tests: fix swaplabel test for 9a83b03c
  Revert "tests: simplify and update swaplabel test"

10 years agomore: fix repeat search crash
Sami Kerola [Tue, 27 Jan 2015 22:28:57 +0000 (22:28 +0000)] 
more: fix repeat search crash

Repeating a search for a pattern that did not found made more(1) to
crash.  To reproduce 'more /etc/services' and search for 'doom'; you will
find a service in port 666 - pressing '.' after that result used to cause
core dump.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agosetarch: fix --list
Karel Zak [Wed, 28 Jan 2015 07:26:09 +0000 (08:26 +0100)] 
setarch: fix --list

$ ./setarch --list
.
.
setarch: no architecture argument specified

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibblkid: improve MBR vs. FAT + boot sector detection
Karel Zak [Tue, 27 Jan 2015 11:58:19 +0000 (12:58 +0100)] 
libblkid: improve MBR vs. FAT + boot sector detection

It seems that some systems are able to produce boot sector + MBR with
almost valid FAT superblock. The libblkid already checks for FAT magic
string, media, correct sector and dir size, etc. -- but all this is
not enough.

The patch add to FAT prober also MBR detection to make sure that there
is no MBR with usable first partition. All this is enabled for
whole-disk devices only.

first sector (and this is no FAT baby ;-)

$ hexdump -C -n 512 /dev/nbd0
00000000  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 10 16 10  |.X.MSDOS5.0.....|
00000010  02 00 00 00 00 f8 00 00  3f 00 ff 00 00 00 00 00  |........?.......|
00000020  00 00 40 01 f5 27 00 00  00 00 00 00 02 00 00 00  |..@..'..........|
00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  80 01 29 c5 a3 06 1a 4e  4f 20 4e 41 4d 45 20 20  |..)....NO NAME  |
00000050  20 20 46 41 54 33 32 20  20 20 33 c9 8e d1 bc f4  |  FAT32   3.....|
00000060  7b 8e c1 8e d9 bd 00 7c  88 56 40 88 4e 02 8a 56  |{......|.V@.N..V|
00000070  40 b4 41 bb aa 55 cd 13  72 10 81 fb 55 aa 75 0a  |@.A..U..r...U.u.|
00000080  f6 c1 01 74 05 fe 46 02  eb 2d 8a 56 40 b4 08 cd  |...t..F..-.V@...|
00000090  13 73 05 b9 ff ff 8a f1  66 0f b6 c6 40 66 0f b6  |.s......f...@f..|
000000a0  d1 80 e2 3f f7 e2 86 cd  c0 ed 06 41 66 0f b7 c9  |...?.......Af...|
000000b0  66 f7 e1 66 89 46 f8 83  7e 16 00 75 39 83 7e 2a  |f..f.F..~..u9.~*|
000000c0  00 77 33 66 8b 46 1c 66  83 c0 0c bb 00 80 b9 01  |.w3f.F.f........|
000000d0  00 e8 2c 00 e9 a8 03 a1  f8 7d 80 c4 7c 8b f0 ac  |..,......}..|...|
000000e0  84 c0 74 17 3c ff 74 09  b4 0e bb 07 00 cd 10 eb  |..t.<.t.........|
000000f0  ee a1 fa 7d eb e4 a1 7d  80 eb df 98 cd 16 cd 19  |...}...}........|
00000100  66 60 80 7e 02 00 0f 84  20 00 66 6a 00 66 50 06  |f`.~.... .fj.fP.|
00000110  53 66 68 10 00 01 00 b4  42 8a 56 40 8b f4 cd 13  |Sfh.....B.V@....|
00000120  66 58 66 58 66 58 66 58  eb 33 66 3b 46 f8 72 03  |fXfXfXfX.3f;F.r.|
00000130  f9 eb 2a 66 33 d2 66 0f  b7 4e 18 66 f7 f1 fe c2  |..*f3.f..N.f....|
00000140  8a ca 66 8b d0 66 c1 ea  10 f7 76 1a 86 d6 8a 56  |..f..f....v....V|
00000150  40 8a e8 c0 e4 06 0a cc  b8 01 02 cd 13 66 61 0f  |@............fa.|
00000160  82 74 ff 81 c3 00 02 66  40 49 75 94 c3 42 4f 4f  |.t.....f@Iu..BOO|
00000170  54 4d 47 52 20 20 20 20  00 00 00 00 00 00 00 00  |TMGR    ........|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 0d 0a 44 69  |..............Di|
000001b0  73 6b 20 65 72 72 6f 72  ff 0d 0a 50 72 65 00 00  |sk error...Pre..|
000001c0  01 01 0c 3f e0 ff 00 08  00 00 00 f8 3f 01 00 00  |...?........?...|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|

MBR:
$ hexdump -C -s 446 -n $((512 - 446)) /dev/nbd0
000001be  00 00 01 01 0c 3f e0 ff  00 08 00 00 00 f8 3f 01  |.....?........?.|
000001ce  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001fe  55 aa                                             |U.|

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1182831
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: fix fdisk/bsd again for big endian
Ruediger Meier [Mon, 26 Jan 2015 13:24:03 +0000 (14:24 +0100)] 
tests: fix fdisk/bsd again for big endian

Looks this line was accidentally out-commented in 06d199e8.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agotests: fix swaplabel test for 9a83b03c
Ruediger Meier [Mon, 26 Jan 2015 13:19:31 +0000 (14:19 +0100)] 
tests: fix swaplabel test for 9a83b03c

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoRevert "tests: simplify and update swaplabel test"
Ruediger Meier [Mon, 26 Jan 2015 13:14:07 +0000 (14:14 +0100)] 
Revert "tests: simplify and update swaplabel test"

After mkswap refactoring we have still a "minimal swap size"
wich depend on PAGE_SIZE. Next commit will fix the test for
output changes made in 9a83b03c.

This reverts commit b4d27255f24cddbdf3480ca0988dada340abe2d3.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agochrt: add note about zero priority for IDLE and BATCH
Karel Zak [Mon, 26 Jan 2015 11:53:21 +0000 (12:53 +0100)] 
chrt: add note about zero priority for IDLE and BATCH

Reported-by: dE <de.techno@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: don't use off_t in public API
Karel Zak [Mon, 26 Jan 2015 11:12:30 +0000 (12:12 +0100)] 
libfdisk: don't use off_t in public API

It's better to use exact and explicitly defined types (e.g. uint64_t)
rather than something like off_t to make code more portable.

[reported with gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3)]

The patch also fixes one debug message.

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: add options map to docs
Karel Zak [Mon, 26 Jan 2015 11:25:40 +0000 (12:25 +0100)] 
libmount: add options map to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoMerge branch 'timex' of https://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Mon, 26 Jan 2015 10:59:10 +0000 (11:59 +0100)] 
Merge branch 'timex' of https://github.com/kerolasa/lelux-utiliteetit

* 'timex' of https://github.com/kerolasa/lelux-utiliteetit:
  logger: check availability of ntp_gettime()

10 years agocfdisk: actually translate the table headers and the bottom line
Benno Schulenberg [Sun, 18 Jan 2015 17:49:35 +0000 (18:49 +0100)] 
cfdisk: actually translate the table headers and the bottom line

The printout of the table headers and the bottomline descriptions
were lacking calls to gettext().

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: shorten the help screen to make it fit within 25 lines
Benno Schulenberg [Sun, 18 Jan 2015 16:21:25 +0000 (17:21 +0100)] 
cfdisk: shorten the help screen to make it fit within 25 lines

When the terminal has less than 32 lines, the new cfdisk ignored the
fact that the help-screen text was longer and just skipped printing
the remaining lines.  Instead of introducing a minipager for the help
screen, just condense its text and remove unneeded lines.  Now the
text occupies just 25 lines, which should fit on most terminals.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: don't mess up the help screen by printing the PO file header
Benno Schulenberg [Sun, 18 Jan 2015 16:21:24 +0000 (17:21 +0100)] 
cfdisk: don't mess up the help screen by printing the PO file header

Asking for the translation of the empty string ("") produces the header
of the PO file corresponding to the current locale, which messes up the
help screen.  So, don't use empty strings in the array of help strings
but (arbitrary) double spaces.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>