]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
8 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)

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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.

8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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.

8 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>
8 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>
8 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>
8 years agoMerge branch 'sulogin'
Karel Zak [Tue, 30 Jun 2015 09:21:12 +0000 (11:21 +0200)] 
Merge branch 'sulogin'

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agortcwake: replace long if else statement with switch case
Sami Kerola [Sat, 10 Jan 2015 16:34:25 +0000 (16:34 +0000)] 
rtcwake: replace long if else statement with switch case

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agortcwake: enumerate constant mode strings
Sami Kerola [Sat, 10 Jan 2015 16:14:35 +0000 (16:14 +0000)] 
rtcwake: enumerate constant mode strings

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agortcwake: add rtcwake_control and remove global variables
Sami Kerola [Sat, 10 Jan 2015 15:39:00 +0000 (15:39 +0000)] 
rtcwake: add rtcwake_control and remove global variables

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agoreset: deprecate the script, and remove reset.033c
Sami Kerola [Fri, 12 Jun 2015 20:25:08 +0000 (21:25 +0100)] 
reset: deprecate the script, and remove reset.033c

Most distributions probably ship reset from ncurses, which means
util-linux reset(1) is unlikely to be in use anywhere.  Assuming the
previous being true it is almost unimaginable anyone one would be using
the alternative script, so remove it and mark the script deprecated.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agogetopt: use $(...) command substitution in example script [shellcheck]
Sami Kerola [Fri, 12 Jun 2015 19:57:31 +0000 (20:57 +0100)] 
getopt: use $(...) command substitution in example script [shellcheck]

Reference: https://github.com/koalaman/shellcheck/wiki/SC2006
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agodocs: unify mkswap(8) with swapon(8) about holes warning
Sami Kerola [Sun, 7 Jun 2015 20:51:51 +0000 (21:51 +0100)] 
docs: unify mkswap(8) with swapon(8) about holes warning

Reviewed-by: Dave Rutherford <dave@evilpettingzoo.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agozramctl: add link to kernel documentation
Sami Kerola [Sat, 6 Jun 2015 20:21:41 +0000 (21:21 +0100)] 
zramctl: add link to kernel documentation

The manual page does lacks explanation how to create zram with modprobe.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agolast-deprecated: remove from source tree
Sami Kerola [Tue, 2 Jun 2015 09:18:25 +0000 (10:18 +0100)] 
last-deprecated: remove from source tree

The last/lastb(1) from sysvinit has been around for about two years,
and the better implementation is already part of releases 2.24 to 2.26.
It should be safe to remove the unused last code from the source tree.

Reference: ce60272039ea11952b15fefb653892dd0da02217
Signed-off-by: Sami Kerola <sami.kerola@lastminute.com>
8 years agoscript: fix variable initialization warning
Sami Kerola [Thu, 25 Jun 2015 15:28:19 +0000 (16:28 +0100)] 
script: fix variable initialization warning

term-utils/script.c:402:19: warning: obsolete use of designated
initializer without '=' [-Wpedantic]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agobuild-sys: make autogen.sh more robust
Karel Zak [Mon, 29 Jun 2015 09:41:22 +0000 (11:41 +0200)] 
build-sys: make autogen.sh more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agobuild-sys: use REALTIME_LIBS for script
Karel Zak [Mon, 29 Jun 2015 08:55:37 +0000 (10:55 +0200)] 
build-sys: use REALTIME_LIBS for script

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agosulogin: improve support for locked root account
Karel Zak [Mon, 25 May 2015 13:30:52 +0000 (15:30 +0200)] 
sulogin: improve support for locked root account

Some installations and distributions don't use a root account password
for security reasons and use sudo instead. In that case, asking for the
password makes no sense, and it is not even considered as valid as it's just
"*" or "!".

In these cases --force is required to just start a root shell and no
ask for password.

I don't think it's a good idea to automatically start root shell when
locked account is detected. It's possible that the machine is on
public place and for example Ubuntu uses root account disabled by
default (and also Fedora when installed by yum/dnf without anaconda).

The --force option forces admins to think about it...

The distro maintainers can also use --force in their initscripts or
systemd emergency.service if they believe that promiscuous setting is
the right thing for the distro.

Addresses: https://bugs.debian.org/326678
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agocfdisk: fix condition logic [cppcheck]
Boris Egorov [Fri, 19 Jun 2015 19:41:01 +0000 (01:41 +0600)] 
cfdisk: fix condition logic [cppcheck]

[disk-utils/cfdisk.c:1181] -> [disk-utils/cfdisk.c:1181]: (warning)
Possible null pointer dereference: data - otherwise it is redundant to
check it against null.

Signed-off-by: Boris Egorov <egorov@linux.com>
8 years agolibblkid/whereis: simplify some conditions [cppcheck]
Boris Egorov [Fri, 19 Jun 2015 19:41:00 +0000 (01:41 +0600)] 
libblkid/whereis: simplify some conditions [cppcheck]

[misc-utils/whereis.c:466]: (style) Redundant condition: uflag.
'A && (!A || B)' is equivalent to 'A || B'
[libblkid/src/tag.c:373]: (style) Redundant condition: dev.
'A && (!A || B)' is equivalent to 'A || B'

Signed-off-by: Boris Egorov <egorov@linux.com>
8 years agosys-utils/disk-utils/lib: fix printf format types [cppcheck]
Boris Egorov [Fri, 19 Jun 2015 19:40:59 +0000 (01:40 +0600)] 
sys-utils/disk-utils/lib: fix printf format types [cppcheck]

Fix 'invalidPrintfArgType' cppcheck warnings

Signed-off-by: Boris Egorov <egorov@linux.com>