build-sys: determine availability of __fpending()

Needed to for making Cygwin more possible.

Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/5656
Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fdisk: remove stack jumping

This patch eliminates the long/setjmp code. The current logic does not do
anything with stack jumps as it only exits from
print_partition_table_from_option() when a fatal error occurs.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: remove listing variable

useless global variable.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: rework fatal errors

When the device cannot be opened, there's no point calling fatal() when we can
just use err(3). When any other kind of fatal error occurs it's Ok, in addition
we can also go ahead and close the descriptor before exiting the program as
it's currently leaking.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: remove dummy function

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Merge branch '2012wk17' of https://github.com/kerolasa/lelux-utiliteetit

* '2012wk17' of https://github.com/kerolasa/lelux-utiliteetit:
  build-sys: determine availability of __fpending()
fdisk: isolate dos label logic

DOS specific logic is currently embedded in the heart of fdisk code. This patch
separates DOS label specific code into its own file, just like the rest of the
labels, leaving a more generic fdisk.c file. Most changes are just moving code
from fdisk.c to fdisk.h and fdiskdoslabel.[c/h].

The only logical modification is calling dos_delete_partition() from
read_extended(), instead of the generic delete_partition.  This is ok since
read extended is only called from a DOS context.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: fix fdiskdoslabel.c global variables

Signed-off-by: Karel Zak <kzak@redhat.com>
wdctl: align with other util-linux commands

* Add watchdog device path to pathnames.h
* Check output stream status at exit.
* Adjust usage() notation to follow howto file.
* Retire numeric return value.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/tt: remove obsolete stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
lslock: remove duplicate variable

Signed-off-by: Karel Zak <kzak@redhat.com>
lsblk: fix /sys/.../ro usage

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/strutils: add string_to_bitmask()

Signed-off-by: Karel Zak <kzak@redhat.com>
wdctl: rewrite to use lib/tt

Signed-off-by: Karel Zak <kzak@redhat.com>
wdctl: make timeouts output more parsable

Signed-off-by: Karel Zak <kzak@redhat.com>
wdctl: add man page

Signed-off-by: Karel Zak <kzak@redhat.com>
build-sys: add BUILD_WDCTL, check for linux/watchdog.h

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: accept small blocks for NTFS and Reiserfs in blkid

libblkid is restrictive as to what it accepts as valid reiserfs or
valid NTFS.  One can mkfs an NTFS with 256B sectors and it's supported
by ntfs-3g Reiserfs can have 512B blocks and it works both with
mkfs.ntfs and Linux.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: support UFS UUID

Signed-off-by: Karel Zak <kzak@redhat.com>
uuidd: use UUIDD_OP_GETPID instead of magic number

Make parameters passed to call_daemon() more descriptive:
- use UUIDD_OP_GETPID instead of magic number 0
- call_daemon() takes pointer as a last argument, so pass NULL instead
  of 0

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>