]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
10 years agomkfs.minix: use is_mounted() from libcommon
Sami Kerola [Wed, 24 Jun 2015 08:15:10 +0000 (09:15 +0100)] 
mkfs.minix: use is_mounted() from libcommon

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agomkfs.minix: introduce long options to the command
Sami Kerola [Wed, 24 Jun 2015 08:15:09 +0000 (09:15 +0100)] 
mkfs.minix: introduce long options to the command

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agomkfs.minix: increase maximum minix v2 and v3 file system sizes
Joshua Hudson [Wed, 24 Jun 2015 08:15:08 +0000 (09:15 +0100)] 
mkfs.minix: increase maximum minix v2 and v3 file system sizes

mkfs.minix misbehaves when attempting to create a large v2 or v3
filesystem.  I finally traced it down to attempting to create too many
inodes so that the first zone is past 65535 blocks in.  This obviously
doesn't work as the on-disk superblock says this is a 16 bit integer.

I wrote a patch that catches this, clamps to the absolute v2/v3 limit
(like it already does for v1), and sets the blocks per inode to a more
reasonable ratio when exceeding half a gigabyte.  Having a half-gig
filesystem with most files being smaller than 3k isn't really reasonable.

I suppose if you don't want to adjust inode sizes automatically you could
take that part out, and it will just crab sooner.

Given the non-attention in the code, I suspect nobody ever had cause to
try such a big minix filesystem.  Well I have my reasons involving some
deeply embedded work where ext2 would place too much strain on the
hardware.

Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Joshua Hudson <joshudson@gmail.com>
10 years agolibmount: make mnt_get_filesystems() more robust [clang analyze]
Karel Zak [Thu, 30 Jul 2015 07:28:19 +0000 (09:28 +0200)] 
libmount: make mnt_get_filesystems() more robust [clang analyze]

The mnt_free_filesystems() relies on NULL as the last item in the
filesystems array. It's necessary to keep NULL there after failed
strdup() too, because we call mnt_free_filesystems() to deallocate
after error.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: cleanup {user,group}name usage
Karel Zak [Thu, 30 Jul 2015 07:18:33 +0000 (09:18 +0200)] 
lsipc: cleanup {user,group}name usage

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agomcookie: fix -f usage [clang analyze]
Karel Zak [Wed, 29 Jul 2015 12:59:56 +0000 (14:59 +0200)] 
mcookie: fix -f usage [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibsmartcols: make child-parent reference more robust [clang analyze]
Karel Zak [Wed, 29 Jul 2015 12:44:27 +0000 (14:44 +0200)] 
libsmartcols: make child-parent reference more robust [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agohwclock: make static analyzes more happy
Karel Zak [Wed, 29 Jul 2015 12:15:14 +0000 (14:15 +0200)] 
hwclock: make static analyzes more happy

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: result of operation is garbage or undefined [clang analyze]
Karel Zak [Wed, 29 Jul 2015 12:04:17 +0000 (14:04 +0200)] 
libfdisk: result of operation is garbage or undefined [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: undefined or garbage value returned to caller [clang analyze]
Karel Zak [Wed, 29 Jul 2015 12:01:40 +0000 (14:01 +0200)] 
libfdisk: undefined or garbage value returned to caller [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: value is never read [clang analyze]
Karel Zak [Wed, 29 Jul 2015 11:59:19 +0000 (13:59 +0200)] 
fdisk: value is never read [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: value is never read [clang analyze]
Karel Zak [Wed, 29 Jul 2015 11:57:28 +0000 (13:57 +0200)] 
fdisk: value is never read [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: value is never read [clang analyze]
Karel Zak [Wed, 29 Jul 2015 11:54:54 +0000 (13:54 +0200)] 
lsipc: value is never read [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: value is never read [clang analyze]
Karel Zak [Wed, 29 Jul 2015 11:51:05 +0000 (13:51 +0200)] 
fdisk: value is never read [clang analyze]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agopo: update fr.po (from translationproject.org)
David Prévot [Wed, 29 Jul 2015 11:42:01 +0000 (13:42 +0200)] 
po: update fr.po (from translationproject.org)

10 years agopo: update da.po (from translationproject.org)
Joe Hansen [Wed, 29 Jul 2015 11:42:01 +0000 (13:42 +0200)] 
po: update da.po (from translationproject.org)

10 years agounshare: remove duplicate [make checkincludes]
Karel Zak [Wed, 29 Jul 2015 10:58:06 +0000 (12:58 +0200)] 
unshare: remove duplicate [make checkincludes]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolslogins: remove duplicate [make checkincludes]
Karel Zak [Wed, 29 Jul 2015 10:57:22 +0000 (12:57 +0200)] 
lslogins: remove duplicate [make checkincludes]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibmount: sort pseudo filesystems by LC_COLLATE=C
Karel Zak [Wed, 29 Jul 2015 10:43:45 +0000 (12:43 +0200)] 
libmount: sort pseudo filesystems by LC_COLLATE=C

Addresses: https://github.com/karelzak/util-linux/issues/212
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotasts: add logger octet counting test
Karel Zak [Wed, 29 Jul 2015 08:41:50 +0000 (10:41 +0200)] 
tasts: add logger octet counting test

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agologger: Add support to logger for RFC6587 octet counting
Alex Bligh [Wed, 15 Jul 2015 18:01:48 +0000 (19:01 +0100)] 
logger: Add support to logger for RFC6587 octet counting

This patch adds support to logger for RFC6587 octet counting.
RFC6587 provides support for two sorts of framing:

1. Octet counting (at RFC6587 s3.4.1)

   In essence each frame is preceded by a decimal length and a
   space.

2. Non-transparent framing (at RFC6587 s3.4.2), also called
   'octet stuffing'

   In essence each frame is terminated by a `\n`

Prior to this patch, logger used option 2 (non-transparent framing)
on TCP, and used no framing on UDP. After this patch, the default
behaviour is unchanged, but if the '--octet-count' option is supplied,
option 1 is used for both TCP and UDP. Arguably octet count framing
makes little sense on UDP, but some servers provide it and this
allows testing of those servers.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
10 years agosfdisk: add --list-free
Karel Zak [Tue, 28 Jul 2015 13:54:07 +0000 (15:54 +0200)] 
sfdisk: add --list-free

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: add 'F' command to list free unpartitioned space
Karel Zak [Tue, 28 Jul 2015 13:53:42 +0000 (15:53 +0200)] 
fdisk: add 'F' command to list free unpartitioned space

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoMerge branch 'test-fixes' of https://github.com/rudimeier/util-linux
Karel Zak [Tue, 28 Jul 2015 10:15:56 +0000 (12:15 +0200)] 
Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux

10 years agoRevert "tests: start script/race test only when --force specified"
Ruediger Meier [Sat, 4 Jul 2015 09:51:06 +0000 (11:51 +0200)] 
Revert "tests: start script/race test only when --force specified"

This reverts commit 8ba3f35e07f736a0165669ac787b016b4311eb29.

This test is not too slow anymore and BTW since last script refactoring
it does work now even on slow/heavy-loaded systems.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
10 years agoscript: improve SIG{TERM,QUIT,KILL} sensitivity
Karel Zak [Tue, 28 Jul 2015 08:36:29 +0000 (10:36 +0200)] 
script: improve SIG{TERM,QUIT,KILL} sensitivity

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: don't print obsolete CHS addresses
Karel Zak [Mon, 27 Jul 2015 13:49:14 +0000 (15:49 +0200)] 
cfdisk: don't print obsolete CHS addresses

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: make sure that output fits to terminal width
Karel Zak [Mon, 27 Jul 2015 13:29:37 +0000 (15:29 +0200)] 
cfdisk: make sure that output fits to terminal width

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibsmartcols: reduce relative columns more aggressively
Karel Zak [Mon, 27 Jul 2015 12:29:38 +0000 (14:29 +0200)] 
libsmartcols: reduce relative columns more aggressively

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agofdisk: init libsmartcols debug
Karel Zak [Mon, 27 Jul 2015 11:33:09 +0000 (13:33 +0200)] 
fdisk: init libsmartcols debug

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: remove extra line between menu and info line
Karel Zak [Mon, 27 Jul 2015 10:35:53 +0000 (12:35 +0200)] 
cfdisk: remove extra line between menu and info line

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: spell "label" in lower case
Benno Schulenberg [Sat, 25 Jul 2015 15:18:15 +0000 (17:18 +0200)] 
cfdisk: spell "label" in lower case

To be less shouty.  It is not an abbreviation like "UUID".

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agocfdisk: allow an uppercase X to toggle the extra info
Benno Schulenberg [Sat, 25 Jul 2015 15:18:14 +0000 (17:18 +0200)] 
cfdisk: allow an uppercase X to toggle the extra info

To make true the help text line that says that all commands
can be entered with either upper or lower case.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
10 years agobuild-sys: add --disable-cal
Karel Zak [Mon, 27 Jul 2015 09:49:29 +0000 (11:49 +0200)] 
build-sys: add --disable-cal

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobuild-sys: fix test_colors build
Karel Zak [Fri, 24 Jul 2015 12:33:25 +0000 (14:33 +0200)] 
build-sys: fix test_colors build

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: update build-sys tests
Karel Zak [Fri, 24 Jul 2015 11:15:04 +0000 (13:15 +0200)] 
tests: update build-sys tests

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibsmartcols: don't link with tinfo
Karel Zak [Fri, 24 Jul 2015 10:57:46 +0000 (12:57 +0200)] 
libsmartcols: don't link with tinfo

Let's move color names to sequence translation to separate file to
make it usable without all the stuff in lib/colors.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agotests: add udevadm settle
Karel Zak [Fri, 24 Jul 2015 10:21:42 +0000 (12:21 +0200)] 
tests: add udevadm settle

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: add comment to the header file
Karel Zak [Fri, 24 Jul 2015 09:18:11 +0000 (11:18 +0200)] 
libfdisk: add comment to the header file

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: make --id usable with all output formats and with -o
Karel Zak [Thu, 23 Jul 2015 09:09:49 +0000 (11:09 +0200)] 
lsipc: make --id usable with all output formats and with -o

This patch allows to use things like:

 # lsipc -m --id 47611910 -o COMMAND,SIZE,KEY --json

or

 # lsipc -m --id 47611910 -o SIZE --bytes --noheadings --raw

to get just one value for the resource.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: the default --global is mutually exclusive with -c --id and -t
Karel Zak [Thu, 23 Jul 2015 08:36:02 +0000 (10:36 +0200)] 
lsipc: the default --global is mutually exclusive with -c --id and -t

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: remove --print0 and -colon-separate
Karel Zak [Thu, 23 Jul 2015 08:28:32 +0000 (10:28 +0200)] 
lsipc: remove --print0 and -colon-separate

These options have been originally designed for lslogins for
compatibility another passwd-like tools. It does not make sense for
IPC.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: remove duplicate "Usage:"
Karel Zak [Thu, 23 Jul 2015 08:20:06 +0000 (10:20 +0200)] 
lsipc: remove duplicate "Usage:"

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: make sure that extra info is refreshed/removed
Karel Zak [Wed, 22 Jul 2015 12:28:33 +0000 (14:28 +0200)] 
cfdisk: make sure that extra info is refreshed/removed

For example when you move from a Partition to the FreeSapce then we
need to remove old extra info and draw nothing.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agocfdisk: properly toggle extra info window, make it more robust
Karel Zak [Wed, 22 Jul 2015 12:11:27 +0000 (14:11 +0200)] 
cfdisk: properly toggle extra info window, make it more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: tiny change about --global to the man page
Karel Zak [Mon, 20 Jul 2015 10:08:47 +0000 (12:08 +0200)] 
lsipc: tiny change about --global to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoipcmk: support <size>{K,M,G,...}
Karel Zak [Mon, 20 Jul 2015 10:05:32 +0000 (12:05 +0200)] 
ipcmk: support <size>{K,M,G,...}

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: default to --global
Karel Zak [Mon, 20 Jul 2015 09:56:44 +0000 (11:56 +0200)] 
lsipc: default to --global

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: add USE% to --global
Karel Zak [Wed, 1 Jul 2015 12:16:50 +0000 (14:16 +0200)] 
lsipc: add USE% to --global

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: use sub-table for semphore elements
Karel Zak [Wed, 1 Jul 2015 11:55:20 +0000 (13:55 +0200)] 
lsipc: use sub-table for semphore elements

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: improve JSON output
Karel Zak [Wed, 1 Jul 2015 10:27:48 +0000 (12:27 +0200)] 
lsipc: improve JSON output

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: move outmode to coltrol struct
Karel Zak [Wed, 1 Jul 2015 10:19:11 +0000 (12:19 +0200)] 
lsipc: move outmode to coltrol struct

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: fix coding style
Karel Zak [Wed, 1 Jul 2015 10:15:24 +0000 (12:15 +0200)] 
lsipc: fix coding style

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: differentiate between UID and USER names
Karel Zak [Wed, 1 Jul 2015 10:12:08 +0000 (12:12 +0200)] 
lsipc: differentiate between UID and USER names

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: fix ID parsing, use full time for pretty print
Karel Zak [Wed, 1 Jul 2015 09:52:25 +0000 (11:52 +0200)] 
lsipc: fix ID parsing, use full time for pretty print

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: cleanup -o usage
Karel Zak [Wed, 1 Jul 2015 09:38:42 +0000 (11:38 +0200)] 
lsipc: cleanup -o usage

* support -o+AAA,BBB,CCC
* keep default resource columns in getopt switch()

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: improve --global
Karel Zak [Wed, 1 Jul 2015 09:04:21 +0000 (11:04 +0200)] 
lsipc: improve --global

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoinclude/xalloc: add err_oom()
Karel Zak [Wed, 1 Jul 2015 09:03:56 +0000 (11:03 +0200)] 
include/xalloc: add err_oom()

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: cleanup columns indexes
Karel Zak [Tue, 30 Jun 2015 14:39:39 +0000 (16:39 +0200)] 
lsipc: cleanup columns indexes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: add COMMAND for shmem
Karel Zak [Tue, 30 Jun 2015 14:14:09 +0000 (16:14 +0200)] 
lsipc: add COMMAND for shmem

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolib/procutils: add proc_get_cmdline()
Karel Zak [Tue, 30 Jun 2015 14:08:52 +0000 (16:08 +0200)] 
lib/procutils: add proc_get_cmdline()

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoinclude/all-io: read_all() don't retry on EOF
Karel Zak [Tue, 30 Jun 2015 14:05:03 +0000 (16:05 +0200)] 
include/all-io: read_all() don't retry on EOF

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: add CTIME to shmem default
Karel Zak [Tue, 30 Jun 2015 11:13:11 +0000 (13:13 +0200)] 
lsipc: add CTIME to shmem default

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolsipc: new command to list IPC facilities
Karel Zak [Tue, 30 Jun 2015 11:02:36 +0000 (13:02 +0200)] 
lsipc: new command to list IPC facilities

Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
10 years agoagetty: Reprompt once the network addresses change if address displayed
Stef Walter [Fri, 3 Jul 2015 12:48:44 +0000 (14:48 +0200)] 
agetty: Reprompt once the network addresses change if address displayed

Several of the /etc/issue escape codes such as \4 and \6 depend on
the current addresses of the system that can change after the agetty
prompt is displayed.  This can cause stale data to be displayed
when a user looks at a VT, especially in cases of DHCP racing with
system start up.

Similar to the --reload mechanism, if we're displaying an address
in the issue output, and the user hasn't typed anything yet: then
redisplay the prompt with the new address.

We use netlink to watch for address changes. We only open the netlink
socket if we display an address in the issue file.

10 years agologger: do not exit when socket errors are not enforced
Sami Kerola [Sun, 19 Jul 2015 20:19:12 +0000 (21:19 +0100)] 
logger: do not exit when socket errors are not enforced

The libc openlog(3) does not have error detection whether unix socket
could be opened.  As a side effect that made it possible to use logger
even if syslogd was not running.  Of course user message in these cases
were lost.  This change makes the logger do behave similar way again, so
that sysvinit scripts can successfully pipe messages to logger when ever.

Addresses: https://bugs.debian.org/787864
Addresses: https://bugs.debian.org/790875
Reported-by: Andreas Beckmann <anbe@debian.org>
Reported-by: Andreas Henriksson <andreas@fatal.se>
Tested-by: Robie Basak <robie.basak@ubuntu.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agohwclock: add -D to the man page
Karel Zak [Mon, 20 Jul 2015 08:10:05 +0000 (10:10 +0200)] 
hwclock: add -D to the man page

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1244609
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoMerge branch 'kill-man' of https://github.com/ronin13/util-linux
Karel Zak [Thu, 16 Jul 2015 09:40:43 +0000 (11:40 +0200)] 
Merge branch 'kill-man' of https://github.com/ronin13/util-linux

10 years agolslogins: merge read_utmp() code
Karel Zak [Thu, 16 Jul 2015 09:26:14 +0000 (11:26 +0200)] 
lslogins: merge read_utmp() code

The code is used only in lslogins, so it does not make sense to
maintain it in libcommon.

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolslogins: fix --user-accs and --system-accs docs
Karel Zak [Wed, 15 Jul 2015 14:14:32 +0000 (16:14 +0200)] 
lslogins: fix --user-accs and --system-accs docs

Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agobash-completion: cal: add --twelve and --color options
Sami Kerola [Fri, 3 Jul 2015 18:03:08 +0000 (19:03 +0100)] 
bash-completion: cal: add --twelve and --color options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agoldattach: tiny coding style changes
Karel Zak [Wed, 15 Jul 2015 13:49:18 +0000 (15:49 +0200)] 
ldattach: tiny coding style changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoldattach: order line disciplines canonically
Tilman Schmidt [Thu, 9 Jul 2015 13:22:32 +0000 (15:22 +0200)] 
ldattach: order line disciplines canonically

List line disciplines in numerical order and put official names
before convenience aliases.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
10 years agoldattach: always set line speed and format for N_GIGASET_M101
Tilman Schmidt [Thu, 9 Jul 2015 13:22:32 +0000 (15:22 +0200)] 
ldattach: always set line speed and format for N_GIGASET_M101

The Gigaset M101 exhibits particularly awkward and confusing behaviour
when the serial line speed isn't set to what the device expects:
Configuration mode detects the used speed and works anyway, but data
mode silently fails. Troubleshooting this is enormously time-consuming.

Spare the users this trouble by setting the line speed and format to
these devices' factory default values as long as the command line
doesn't say otherwise.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
10 years agoldattach: adapt print_table column width to widest entry
Tilman Schmidt [Thu, 9 Jul 2015 13:22:32 +0000 (15:22 +0200)] 
ldattach: adapt print_table column width to widest entry

The hardcoded column width of 10 in print_table() is not enough, as
the currently longest table entry to be printed has 12 characters.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
10 years agolibfdisk: fix fdisk_label_parse_parttype() for unknown types
Karel Zak [Wed, 15 Jul 2015 13:42:22 +0000 (15:42 +0200)] 
libfdisk: fix fdisk_label_parse_parttype() for unknown types

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: (gpt) add missing GUIDs
Karel Zak [Wed, 15 Jul 2015 13:02:13 +0000 (15:02 +0200)] 
libfdisk: (gpt) add missing GUIDs

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolibfdisk: add GPT GUIDs for PReP
Scott Moser [Tue, 14 Jul 2015 20:10:17 +0000 (16:10 -0400)] 
libfdisk: add GPT GUIDs for PReP

Power Firmware (OFW) scans chosen devices for PReP partition IDs.

Signed-off-by: Scott Moser <smoser@ubuntu.com>
10 years agolibfdisk: (gpt) fix "MidnightBSD UFS" UUID
Karel Zak [Wed, 15 Jul 2015 12:29:53 +0000 (14:29 +0200)] 
libfdisk: (gpt) fix "MidnightBSD UFS" UUID

Reported-by: Андрей Гаврилин <gaal.dev@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoscript: evaluate errno only if read() sets it
Ruediger Meier [Thu, 2 Jul 2015 10:10:17 +0000 (12:10 +0200)] 
script: evaluate errno only if read() sets it

[kzak@redhat.com: - be careful with errno and DBG
                  - add EINTR check
                  (both suggested by Rudi]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agokill: Add verbose to man page.
Raghavendra D Prabhu [Fri, 3 Jul 2015 03:41:04 +0000 (09:11 +0530)] 
kill: Add verbose to man page.

kill adds a verbose option to print the pid(s) and the signal. It is
added to man page here.

10 years agoscript: make sure errno is zero
Karel Zak [Thu, 2 Jul 2015 08:30:10 +0000 (10:30 +0200)] 
script: make sure errno is zero

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoswapon: fix restart waitpid with errno == EINTR
Karel Zak [Wed, 1 Jul 2015 13:35:17 +0000 (15:35 +0200)] 
swapon: fix restart waitpid with errno == EINTR

Reported-by: Maks Naumov (https://github.com/karelzak/util-linux/pull/205)
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agolib/strutils: make strmode() more generic
Karel Zak [Tue, 30 Jun 2015 10:41:13 +0000 (12:41 +0200)] 
lib/strutils: make strmode() more generic

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agoMerge branch 'sulogin'
Karel Zak [Tue, 30 Jun 2015 09:21:12 +0000 (11:21 +0200)] 
Merge branch 'sulogin'

10 years agofstrim: close dir before exit [coverity scan]
Karel Zak [Mon, 29 Jun 2015 14:14:35 +0000 (16:14 +0200)] 
fstrim: close dir before exit [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agortcwake: cosmetic changes
Karel Zak [Mon, 29 Jun 2015 13:19:47 +0000 (15:19 +0200)] 
rtcwake: cosmetic changes

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agortcwake: fix ARRAY_SIZE() usage
Karel Zak [Mon, 29 Jun 2015 11:46:05 +0000 (13:46 +0200)] 
rtcwake: fix ARRAY_SIZE() usage

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agortcwake: don't use usage() on error
Karel Zak [Mon, 29 Jun 2015 11:43:41 +0000 (13:43 +0200)] 
rtcwake: don't use usage() on error

Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agortcwake: fix valgrind warning
Sami Kerola [Sat, 6 Jun 2015 21:41:51 +0000 (22:41 +0100)] 
rtcwake: fix valgrind warning

==3445== Syscall param ioctl(generic) points to uninitialised byte(s)
==3445==    at 0x4F16477: ioctl (in /usr/lib/libc-2.21.so)
==3445==    by 0x402785: setup_alarm (rtcwake.c:231)
==3445==    by 0x403302: main (rtcwake.c:520)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: read accepted mode strings from /sys/power/state
Sami Kerola [Sun, 11 Jan 2015 09:37:59 +0000 (09:37 +0000)] 
rtcwake: read accepted mode strings from /sys/power/state

The rtcwake has various mode names that are internal to the command,
listed in rtcwake_mode_string array, while some modes are dynamicaly
listed in /sys/power/state.  Together these form the allowed modes.

[kzak@redhat.com: - cleanup strv usage]

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
10 years agortcwake: make some command line options mutually exclusive
Sami Kerola [Sun, 11 Jan 2015 01:03:37 +0000 (01:03 +0000)] 
rtcwake: make some command line options mutually exclusive

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: improve coding style
Sami Kerola [Sun, 11 Jan 2015 00:55:23 +0000 (00:55 +0000)] 
rtcwake: improve coding style

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: add --list-modes
Sami Kerola [Sat, 10 Jan 2015 20:07:08 +0000 (20:07 +0000)] 
rtcwake: add --list-modes

Commit ece44f19f423408f576f348fed2845c876d72c6e missed freeze mode, which
to a simple patch adding the missing argument but Karel pointed out it
would be better to make the rtcwake to tell what arguments are supported
so that possible changes end up to be automatically correct in bash
completion.

Proposed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: do not overwrite device name
Sami Kerola [Sat, 10 Jan 2015 19:46:02 +0000 (19:46 +0000)] 
rtcwake: do not overwrite device name

This improves error messaging, and removes a memory leak.

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: clean up struct tm initializations
Sami Kerola [Sat, 10 Jan 2015 19:13:11 +0000 (19:13 +0000)] 
rtcwake: clean up struct tm initializations

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: fix preprocessor redefinition
Sami Kerola [Sat, 10 Jan 2015 18:45:22 +0000 (18:45 +0000)] 
rtcwake: fix preprocessor redefinition

The RTC_AF is expected to be part of linux/rtc.h file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: add human readable --date timestamp format
Sami Kerola [Sat, 10 Jan 2015 18:31:29 +0000 (18:31 +0000)] 
rtcwake: add human readable --date timestamp format

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: improve read_clock_mode()
Sami Kerola [Sat, 10 Jan 2015 18:03:25 +0000 (18:03 +0000)] 
rtcwake: improve read_clock_mode()

Make skipping two lines more robust, and add message about unexpected
adjfile contents when running with --verbose.

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agortcwake: remove RTC_ALM_READ and RTC_ALM_SET compatibility
Sami Kerola [Sat, 10 Jan 2015 17:07:09 +0000 (17:07 +0000)] 
rtcwake: remove RTC_ALM_READ and RTC_ALM_SET compatibility

The RTC_WKALM_RD and RTC_WKALM_SET have been available since 2.6.17, and
preferred way since 2007.  Keeping the fallbacks to the old interface is
no longer needed.

Reference: https://github.com/torvalds/linux/commit/e824290e5dcfaf2120da587b16d10dfdff8d5d3e
Reference: https://github.com/torvalds/linux/commit/f8245c26886c912627ebc49f714e4491261224c4
Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>