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>
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>
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>
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>
mount man page cleanups

Fowarding this patch submitted by Bjarni Ingi Gislason
<bjarniig@rhi.hi.is> to deb bug #674595.
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>
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>
script: check that stdin is a terminal

Signed-off-by: Karel Zak <kzak@redhat.com>
hexdump: add the prefix 'hexdump-' to {conv,display,parse}.c

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: Merge hexsyntax.c into hexdump.c

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rename add to add_fmt

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rename rewrite to rewrite_rules

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rename struct _fu to struct hexdump_fu and remove its typedef

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rename struct _fs to struct hexdump_fs and remove its typedef

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: add __attribute__ ((__noreturn__)) to bad*() functions

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: Create struct hexdump containing previously global variables.

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
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>
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>
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>