]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agopo: add '--no-wrap' to msgmerge, to not wrap long message lines
Benno Schulenberg [Mon, 16 Dec 2013 21:41:56 +0000 (22:41 +0100)] 
po: add '--no-wrap' to msgmerge, to not wrap long message lines

This avoids unneeded churn during POT-file renewal and PO-file updates,
as the PO files at the TP are made with '--no-wrap'.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Acked-by: Sami Kerola <kerolasa@iki.fi>
11 years agomount: add note about "noauto" to --all description
Karel Zak [Thu, 12 Dec 2013 10:41:07 +0000 (11:41 +0100)] 
mount: add note about "noauto" to --all description

References: https://bugzilla.redhat.com/show_bug.cgi?id=1039905
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: Identify extN file system properly
Lukas Czerner [Tue, 3 Dec 2013 15:24:44 +0000 (16:24 +0100)] 
libblkid: Identify extN file system properly

Currently when trying to identify extN file system we're playing games
with searching for kernel modules and parsing /proc/filesystem. All of
this just because ext4 module can be used to mount ext3 and ext2 file
systems on recent kernel and also because of ext4dev.

However all of this is not necessary. Ext4 module which does support
mounting ext2 and ext3 file system is able to recognize and mount ext2
and ext3 type so there is no need to disguise it and ext4dev should only
be ever used for testing and not as fallback when other modules are
missing (use -t instead).

This also introduces a bug when in situation that we only have ext4
modules with ext2/ext3 support which is not loaded and we try to mount
ext2 file system we will mount it incorrectly as ext4. This will not
happen if the ext4 module is already loaded.

With this patch we remove all the unnecessary checks and return the real
type of the file system which is on the device. This fixes the issue.
However on the kernel which was not compiled with EXT4_USE_FOR_EXT23
support one would have to provide file system type (-t) to be able to
mount the file system with ext4 driver.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotextual: small inprovements to usage and man page of fstrim
Benno Schulenberg [Wed, 11 Dec 2013 11:40:14 +0000 (12:40 +0100)] 
textual: small inprovements to usage and man page of fstrim

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agofstrim: de-duplicate list of filesystems
Karel Zak [Wed, 11 Dec 2013 16:01:23 +0000 (17:01 +0100)] 
fstrim: de-duplicate list of filesystems

Reported-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: add -U to de-deplicate filesystems
Karel Zak [Wed, 11 Dec 2013 16:01:15 +0000 (17:01 +0100)] 
findmnt: add -U to de-deplicate filesystems

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: add mnt_table_uniq_fs()
Karel Zak [Wed, 11 Dec 2013 15:59:57 +0000 (16:59 +0100)] 
libmount: add mnt_table_uniq_fs()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: cleanup usage()
Karel Zak [Wed, 11 Dec 2013 13:47:06 +0000 (14:47 +0100)] 
findmnt: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofstrim: add --all to discard all filesystem
Karel Zak [Tue, 10 Dec 2013 14:49:49 +0000 (15:49 +0100)] 
fstrim: add --all to discard all filesystem

 * read /proc/self/mountinfo to get filesystems
 * ignore net and pseudo filesystems
 * ignore unaccessible filesystems (over mounted by another FS)
 * read disk sysfs queue/discard_granularity to detect is discard support
 * call FITRIM ioctl
 * silently ignore EOPNOTSUPP (for example LUKS without discard) and ENOTTY
   (for example vfat) errors

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: add efivarfs to the list of pseudo filesystems
Karel Zak [Tue, 10 Dec 2013 13:05:22 +0000 (14:05 +0100)] 
libmount: add efivarfs to the list of pseudo filesystems

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofstrim: cleanup usage()
Karel Zak [Tue, 10 Dec 2013 10:36:50 +0000 (11:36 +0100)] 
fstrim: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotaskset: fix PERMISSIONS section of taskset man page
Rik van Riel [Fri, 6 Dec 2013 21:07:54 +0000 (16:07 -0500)] 
taskset: fix PERMISSIONS section of taskset man page

A user is always allowed to change the CPU affinity of his or her
own processes. CAP_SYS_NICE is only required to change the affinity
of another user's process.

Signed-off-by: Rik van Riel <riel@redhat.com>
Reported-by: Joe Mario <jmario@redhat.com>
11 years agocal: use month contents structure for --year printing
Sami Kerola [Sun, 10 Nov 2013 18:23:40 +0000 (18:23 +0000)] 
cal: use month contents structure for --year printing

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: use month contents structure for --three printing
Sami Kerola [Sun, 10 Nov 2013 18:23:39 +0000 (18:23 +0000)] 
cal: use month contents structure for --three printing

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: add month contents structure
Sami Kerola [Sun, 10 Nov 2013 18:23:38 +0000 (18:23 +0000)] 
cal: add month contents structure

This changes determination of calendar month content completely, as well
as outputing.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: determine how many header lines are needed at initialization
Sami Kerola [Sun, 10 Nov 2013 18:23:37 +0000 (18:23 +0000)] 
cal: determine how many header lines are needed at initialization

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: cal: do not let --week=<num> to adjust requested month
Sami Kerola [Sun, 10 Nov 2013 18:23:36 +0000 (18:23 +0000)] 
tests: cal: do not let --week=<num> to adjust requested month

The previous commit made --week=<number> to have smaller weight value
than a month supplied by user.  The commit started to print the month
that has more days at the week when a week is split to two months, and
only one month output is requested.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: make user request to be part of read-only control struct
Sami Kerola [Sun, 10 Nov 2013 18:23:35 +0000 (18:23 +0000)] 
cal: make user request to be part of read-only control struct

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: cal: take account week numbers when determing month lenght
Sami Kerola [Sun, 10 Nov 2013 18:23:34 +0000 (18:23 +0000)] 
tests: cal: take account week numbers when determing month lenght

The month header does not need to wrap if month width with week number
allows printing to single line.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: determine output width at beginning of run and reuse result
Sami Kerola [Sun, 10 Nov 2013 18:23:33 +0000 (18:23 +0000)] 
cal: determine output width at beginning of run and reuse result

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: simplify ascii_weeknum() function
Sami Kerola [Sun, 10 Nov 2013 18:23:32 +0000 (18:23 +0000)] 
cal: simplify ascii_weeknum() function

Either the week is or isn't highlighted, there is no need to over
complicate printing of that.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: make day_in_week() use same variable names as other functions
Sami Kerola [Sun, 10 Nov 2013 18:23:31 +0000 (18:23 +0000)] 
cal: make day_in_week() use same variable names as other functions

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: add input variable names to function prototypes
Sami Kerola [Sun, 10 Nov 2013 18:23:30 +0000 (18:23 +0000)] 
cal: add input variable names to function prototypes

While prototypes such as 'function(int, int, char, int);' are legal they
do not help when trying to understand how the function is expected to be
used.  Adding variable names gives at least a hint when looking the
prototypes.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: rename ascii_wnum() to ascii_weeknum()
Sami Kerola [Sun, 10 Nov 2013 18:23:29 +0000 (18:23 +0000)] 
cal: rename ascii_wnum() to ascii_weeknum()

Week is not long word, so it does not need to be enshorted and made more
difficult to understand.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agocal: use control structure for run time configuration
Sami Kerola [Sun, 10 Nov 2013 18:23:28 +0000 (18:23 +0000)] 
cal: use control structure for run time configuration

Runtime configuration is set at the time of command line option parsing,
and other initialization.  Later the configuration is read-only.  This
should make code a little bit more understandable.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoscript: script input redirection / eof handling
Karel Zak [Tue, 3 Dec 2013 12:32:55 +0000 (13:32 +0100)] 
script: script input redirection / eof handling

  echo "ps uf" | script

does not work because script assume that stdin is terminal and
it does not forward EOF to the pty.

This patch:

  * make non-tty use-case more robust (don't call tty ioclts to
    non-tty file descriptors.

  * send EOF (CTL('D') control char) to the master channel when
    detected eof by read() on stdin

  * wait for empty master and slave file descriptors to be sure that
    we don't miss date for typescript. This is also necessary to be
    sure that slave channel (shell) is completely initialized otherwise
    EOF is ignored.

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohexdump: Create struct hexdump containing previously global variables.
Ondrej Oprala [Fri, 8 Nov 2013 16:13:14 +0000 (17:13 +0100)] 
hexdump: Create struct hexdump containing previously global variables.

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: add __attribute__ ((__noreturn__)) to bad*() functions
Ondrej Oprala [Fri, 8 Nov 2013 16:13:13 +0000 (17:13 +0100)] 
hexdump: add __attribute__ ((__noreturn__)) to bad*() functions

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rename struct _fs to struct hexdump_fs and remove its typedef
Ondrej Oprala [Fri, 8 Nov 2013 16:13:12 +0000 (17:13 +0100)] 
hexdump: rename struct _fs to struct hexdump_fs and remove its typedef

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rename struct _fu to struct hexdump_fu and remove its typedef
Ondrej Oprala [Fri, 8 Nov 2013 16:13:11 +0000 (17:13 +0100)] 
hexdump: rename struct _fu to struct hexdump_fu and remove its typedef

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef
Ondrej Oprala [Fri, 8 Nov 2013 16:13:10 +0000 (17:13 +0100)] 
hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rename rewrite to rewrite_rules
Ondrej Oprala [Fri, 8 Nov 2013 16:13:09 +0000 (17:13 +0100)] 
hexdump: rename rewrite to rewrite_rules

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rename add to add_fmt
Ondrej Oprala [Fri, 8 Nov 2013 16:13:08 +0000 (17:13 +0100)] 
hexdump: rename add to add_fmt

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: Merge hexsyntax.c into hexdump.c
Ondrej Oprala [Fri, 8 Nov 2013 16:13:07 +0000 (17:13 +0100)] 
hexdump: Merge hexsyntax.c into hexdump.c

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: add the prefix 'hexdump-' to {conv,display,parse}.c
Ondrej Oprala [Fri, 8 Nov 2013 16:13:06 +0000 (17:13 +0100)] 
hexdump: add the prefix 'hexdump-' to {conv,display,parse}.c

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agoscript: check that stdin is a terminal
Karel Zak [Mon, 2 Dec 2013 12:42:01 +0000 (13:42 +0100)] 
script: check that stdin is a terminal

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosetterm: fix -dump man page info
Karel Zak [Mon, 2 Dec 2013 11:21:47 +0000 (12:21 +0100)] 
setterm: fix -dump man page info

It seems that setterm -dump does not dump terminal attributes, but
the man page says -dump includes the attributes. Let's fix the man
page.

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoagetty: support the special terminal on first serial line on a S/390
Werner Fink [Fri, 29 Nov 2013 15:44:25 +0000 (16:44 +0100)] 
agetty: support the special terminal on first serial line on a S/390

which is due legacy reasons a block terminal of type 3270 or higher.
Whereas the second serial line on a S/390(x) is a real character
terminal which is compatible with VT220.

Signed-off-by: Werner Fink <werner@suse.de>
11 years agomount man page cleanups
Phillip Susi [Mon, 25 Nov 2013 15:35:40 +0000 (10:35 -0500)] 
mount man page cleanups

Fowarding this patch submitted by Bjarni Ingi Gislason
<bjarniig@rhi.hi.is> to deb bug #674595.

11 years agomount.8: fix grammar
Phillip Susi [Mon, 25 Nov 2013 15:23:26 +0000 (10:23 -0500)] 
mount.8: fix grammar

Switch "A unbindable" to "An unbindable"

Reported-by: Regid Ichira <regid23@nt1.in>
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
11 years agopylibmount: correctly import from pylibmount.so
Dave Reisner [Thu, 21 Nov 2013 17:25:27 +0000 (12:25 -0500)] 
pylibmount: correctly import from pylibmount.so

Without this, python is unable to find the module:

$ python -c 'import libmount'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.3/site-packages/libmount/__init__.py", line 1, in <module>
    from pylibmount import *
ImportError: No module named 'pylibmount'

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
11 years agonamei: align missing files with rest of the print out
Sami Kerola [Wed, 20 Nov 2013 00:57:04 +0000 (00:57 +0000)] 
namei: align missing files with rest of the print out

This change should make namei output more readable when multiple
arguments are supplied.

The old:

$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
foo - No such file or directory

The new:

$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
                     foo - No such file or directory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolosetup, agetty: remove unnecessary if's before free()
Sami Kerola [Wed, 20 Nov 2013 00:57:03 +0000 (00:57 +0000)] 
losetup, agetty: remove unnecessary if's before free()

Reference: http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/useless-if-before-free
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolibfdisk: (dos) warn on type 0
Karel Zak [Wed, 27 Nov 2013 21:04:10 +0000 (22:04 +0100)] 
libfdisk: (dos) warn on type 0

This is old warning, but somehow lost during rewrite to libfdisk. Sorry.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) fix free part counter
Karel Zak [Wed, 27 Nov 2013 20:42:18 +0000 (21:42 +0100)] 
libfdisk: (dos) fix free part counter

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix sgi PT parser to report system partitions
Karel Zak [Wed, 27 Nov 2013 15:55:08 +0000 (16:55 +0100)] 
libblkid: fix sgi PT parser to report system partitions

... to be compatible with Linux kernel.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (gpt) more human readable info about free space
Karel Zak [Mon, 25 Nov 2013 12:18:02 +0000 (13:18 +0100)] 
fdisk: (gpt) more human readable info about free space

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: don't care about partition type
Karel Zak [Mon, 25 Nov 2013 11:00:55 +0000 (12:00 +0100)] 
fdisk: don't care about partition type

fdisk allows to overwrite existing partition if the partition has
partition type set to zero (very unusual, but possible).

This is incorrect because such partition is pretty valid (and Linux
kernel does not care about the type at all). For example:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048       22527       10240   83  Linux
/dev/sdb2           22528      227327      102400    0  Empty
                    ^^^^^                            ^^^^^^^^

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p):
Using default response p
Partition number (3,4, default 3):
First sector (22528-1228799, default 22528):
                                    ^^^^^^^

.. if user follows the default then the result are overlapping
partitions:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048       22527       10240   83  Linux
/dev/sdb2           22528      227327      102400    0  Empty
/dev/sdb3           22528     1228799      603136   83  Linux
                    ^^^^^

... and if you call "mkfs /dev/sdb3" then you lost data on sdb2. Sad
thing.

Reported-by: Marc MERLIN <marc@merlins.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: fix nasty coding style
Karel Zak [Mon, 25 Nov 2013 09:58:18 +0000 (10:58 +0100)] 
fdisk: fix nasty coding style

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: fix usage(), -l [<disk>]
Karel Zak [Tue, 19 Nov 2013 17:30:40 +0000 (18:30 +0100)] 
fdisk: fix usage(), -l [<disk>]

Add square brackets, <disk> is optional for -l.

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoumount: fix umount by tag for non-roots
Karel Zak [Tue, 19 Nov 2013 16:55:12 +0000 (17:55 +0100)] 
umount: fix umount by tag for non-roots

 $ umount LABEL=foo

currently does not work for non-root users as umount uses the
LABEL= as a path in sanitize_path().

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix memory leak in blkid_parse_tag_string()
Karel Zak [Tue, 19 Nov 2013 16:52:56 +0000 (17:52 +0100)] 
libblkid: fix memory leak in blkid_parse_tag_string()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agomount: make NAME=value tags usable for non-root
Karel Zak [Tue, 19 Nov 2013 16:44:21 +0000 (17:44 +0100)] 
mount: make NAME=value tags usable for non-root

The libmount does not care if we set source or target, it's able to
swap it, but the mount.c function sanitize_paths() does not work as
expected if we set NAME=value as target. It means that

 $ mount LABEL=foo

does not work for non-root users (since 51e3530cdcb1d4f3ab91ae953ebc5adcdc5f9239, v2.24).

This patch also checks if source or target is specified more
than once.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: add mnt_tag_is_valid()
Karel Zak [Tue, 19 Nov 2013 16:41:28 +0000 (17:41 +0100)] 
libmount: add mnt_tag_is_valid()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofsck: add ext4 to list of filesystems with progress bars in fsck man page
Phillip Susi [Mon, 18 Nov 2013 19:15:50 +0000 (14:15 -0500)] 
fsck: add ext4 to list of filesystems with progress bars in fsck man page

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
11 years agomount: fix man mount page type
Phillip Susi [Mon, 18 Nov 2013 19:00:17 +0000 (14:00 -0500)] 
mount: fix man mount page type

Slight grammatical error in the mount man page

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
11 years agosetpriv: simplify usage()
Karel Zak [Tue, 19 Nov 2013 13:42:22 +0000 (14:42 +0100)] 
setpriv: simplify usage()

Let's keep usage() simple and details in the man page. The current
brief description in usage() seems confusing for some users.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'fixes' of https://github.com/rudimeier/util-linux
Karel Zak [Tue, 19 Nov 2013 12:17:34 +0000 (13:17 +0100)] 
Merge branch 'fixes' of https://github.com/rudimeier/util-linux

* 'fixes' of https://github.com/rudimeier/util-linux:
  tests: fix fdisk GPT test

11 years agolibfdisk: (sgi) generate partname according to partition position
Karel Zak [Tue, 19 Nov 2013 12:02:39 +0000 (13:02 +0100)] 
libfdisk: (sgi) generate partname according to partition position

The SGI drive currently counts only usable partitions, that's wrong as
Linux kernel counts all partition to generate partition number. For
example:

Kernel:
sdb                                             8:16   0   600M  0 disk
├─sdb9                                          8:25   0     2M  0 part
└─sdb11                                         8:27   0 596.2M  0 part

Fdisk:
Pt# Device    Info Start       End   Sectors Id System
 9: /dev/sdb1          0      4095      4096  0 SGI volhdr
11: /dev/sdb2          0   1220939   1220940  6 SGI volume

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agounshare: add more hints about mount namespaces to the man page
Karel Zak [Mon, 18 Nov 2013 11:50:27 +0000 (12:50 +0100)] 
unshare: add more hints about mount namespaces to the man page

There is also idea (by Lennart) to add --propagation=[shared|private|slave|off]
to unshare(1), but it seems unnecessary and too complex as everyone can call
mount(8) after unshare(1) to setup a proper namespace.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolsblk: fix -D segfault
Karel Zak [Mon, 18 Nov 2013 10:27:35 +0000 (11:27 +0100)] 
lsblk: fix -D segfault

References: https://bugzilla.redhat.com/show_bug.cgi?id=1031262
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agomkfs.minix: fix fscanf() format string [coverity scan]
Karel Zak [Mon, 18 Nov 2013 09:58:41 +0000 (10:58 +0100)] 
mkfs.minix: fix fscanf() format string [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix fdisk GPT test
Ruediger Meier [Thu, 14 Nov 2013 11:12:47 +0000 (12:12 +0100)] 
tests: fix fdisk GPT test

There was a missing newline since cd05de50.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoscript: restore errno in signal handler
Karel Zak [Thu, 14 Nov 2013 13:38:06 +0000 (14:38 +0100)] 
script: restore errno in signal handler

References: https://plus.google.com/+LennartPoetteringTheOneAndOnly/posts/gHSscCJkakd
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoscript: don't call TIOCGWINSZ in signal handler
Karel Zak [Thu, 14 Nov 2013 13:34:15 +0000 (14:34 +0100)] 
script: don't call TIOCGWINSZ in signal handler

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agomkswap: remove cruft from the man page
Phillip Susi [Wed, 13 Nov 2013 15:30:52 +0000 (10:30 -0500)] 
mkswap: remove cruft from the man page

I don't think there's any reason to continue to mention behavior
of kernels older than 10 years.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
11 years agomount: correct mount man page default iso9660 permission
Phillip Susi [Wed, 13 Nov 2013 15:19:04 +0000 (10:19 -0500)] 
mount: correct mount man page default iso9660 permission

The mount man page said the default permissions are read for
everyone, but it is in fact, read and execute.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
11 years agolibmount: cleanup fix_optstr() regards to selinux and smack
Karel Zak [Tue, 12 Nov 2013 14:49:33 +0000 (15:49 +0100)] 
libmount: cleanup fix_optstr() regards to selinux and smack

It's better (more robust) to make the code based on datetypes
rather than on if(strcmp(...)).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --with-smack to config-gen.d
Karel Zak [Tue, 12 Nov 2013 14:48:42 +0000 (15:48 +0100)] 
build-sys: add --with-smack to config-gen.d

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: fix typo in smack path
Karel Zak [Tue, 12 Nov 2013 14:17:28 +0000 (15:17 +0100)] 
libmount: fix typo in smack path

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: remove smackfs* option when SMACK not enabled
Karel Zak [Tue, 12 Nov 2013 14:07:12 +0000 (15:07 +0100)] 
libmount: remove smackfs* option when SMACK not enabled

If there is no /sys/fs/smackfs then libmount removes smackfs*= mount
options when compiled --with-smack.

Note that we do the same for SELinux.

References: http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg13740.html
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosulogin: use dirent->d_type when scans /dev
Karel Zak [Tue, 12 Nov 2013 11:26:13 +0000 (12:26 +0100)] 
sulogin: use dirent->d_type when scans /dev

... it's more effective than call fstatat() for all device.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update links to http://git.kernel.org/ web repository views
Sami Kerola [Sun, 10 Nov 2013 20:06:10 +0000 (20:06 +0000)] 
docs: update links to http://git.kernel.org/ web repository views

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: add patching process to howto-contribute.txt
Sami Kerola [Sun, 10 Nov 2013 20:06:09 +0000 (20:06 +0000)] 
docs: add patching process to howto-contribute.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agochsh, chfn: add info about non-local support to the man pages
Karel Zak [Mon, 11 Nov 2013 08:18:18 +0000 (09:18 +0100)] 
chsh, chfn: add info about non-local support to the man pages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update blkid swap tests
Karel Zak [Fri, 8 Nov 2013 13:22:35 +0000 (14:22 +0100)] 
tests: update blkid swap tests

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohexdump: catch memory leaks
Ondrej Oprala [Mon, 23 Sep 2013 13:39:38 +0000 (15:39 +0200)] 
hexdump: catch memory leaks

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: make addfile() variable names more hinting of their purpose
Ondrej Oprala [Mon, 23 Sep 2013 13:39:37 +0000 (15:39 +0200)] 
hexdump: make addfile() variable names more hinting of their purpose

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: use skip_space() in add()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:36 +0000 (15:39 +0200)] 
hexdump: use skip_space() in add()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agostrutils: add skip_space() function
Ondrej Oprala [Mon, 23 Sep 2013 13:39:34 +0000 (15:39 +0200)] 
strutils: add skip_space() function

[kzak@redhat.com: - add also skip_blank(),
                  - remove duplicate implementation from libmount]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohexdump: rename in() to first_letter()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:32 +0000 (15:39 +0200)] 
hexdump: rename in() to first_letter()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohexdump: get rid of redundant typecasts
Ondrej Oprala [Mon, 23 Sep 2013 13:39:31 +0000 (15:39 +0200)] 
hexdump: get rid of redundant typecasts

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: minor formatting improvements in display()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:30 +0000 (15:39 +0200)] 
hexdump: minor formatting improvements in display()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohexdump: rewrite cluttered case statements
Ondrej Oprala [Mon, 23 Sep 2013 13:39:29 +0000 (15:39 +0200)] 
hexdump: rewrite cluttered case statements

[kzak@redhat.com: - use strchr() for in() macro]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohexdump: use xasprintf in conv_c()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:27 +0000 (15:39 +0200)] 
hexdump: use xasprintf in conv_c()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: delete redundant typecasts
Ondrej Oprala [Mon, 23 Sep 2013 13:39:26 +0000 (15:39 +0200)] 
hexdump: delete redundant typecasts

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: use GNU case ranges where possible
Ondrej Oprala [Mon, 23 Sep 2013 13:39:24 +0000 (15:39 +0200)] 
hexdump: use GNU case ranges where possible

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: use xstrncpy in add()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:23 +0000 (15:39 +0200)] 
hexdump: use xstrncpy in add()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: simplify newsyntax arguments
Ondrej Oprala [Mon, 23 Sep 2013 13:39:22 +0000 (15:39 +0200)] 
hexdump: simplify newsyntax arguments

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: minor formatting improvements
Ondrej Oprala [Mon, 23 Sep 2013 13:39:21 +0000 (15:39 +0200)] 
hexdump: minor formatting improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rename next{fs,fu,pr} to {fs,fu,pr}list
Ondrej Oprala [Mon, 23 Sep 2013 13:39:20 +0000 (15:39 +0200)] 
hexdump: rename next{fs,fu,pr} to {fs,fu,pr}list

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite addfile() to use getline()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:19 +0000 (15:39 +0200)] 
hexdump: rewrite addfile() to use getline()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: formatting and variable name cleanup
Ondrej Oprala [Mon, 23 Sep 2013 13:39:18 +0000 (15:39 +0200)] 
hexdump: formatting and variable name cleanup

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite() formatting improvements
Ondrej Oprala [Mon, 23 Sep 2013 13:39:17 +0000 (15:39 +0200)] 
hexdump: rewrite() formatting improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite escape()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:16 +0000 (15:39 +0200)] 
hexdump: rewrite escape()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite rewrite()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:15 +0000 (15:39 +0200)] 
hexdump: rewrite rewrite()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump:rewrite add()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:14 +0000 (15:39 +0200)] 
hexdump:rewrite add()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite next()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:13 +0000 (15:39 +0200)] 
hexdump: rewrite next()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite get()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:12 +0000 (15:39 +0200)] 
hexdump: rewrite get()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agohexdump: rewrite addfile()
Ondrej Oprala [Mon, 23 Sep 2013 13:39:11 +0000 (15:39 +0200)] 
hexdump: rewrite addfile()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>