libcommon: add common debugging routines

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libmount: use macros from include/debug.h

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libcommon: define more debugging macros

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libcommon: don't mention lib versions in debug macros

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libmount: further debug.h integration

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libblkid: use include/debug.h

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
libfdisk: use include/debug.h

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
clean up redundant macros and defines

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
unshare: include libmount.h to provide missing MS_* defines

Since 6728ca10 we are using MS_PRIVATE and MS_REC which are not defined
in some systems's sys/mount.h.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
blkid: stop scanning on I/O error

Whenever we fail to read from a device it's pointless to
continue with probing; we should be failing immediately.
Otherwise the system will continue logging I/O errors.

This patch updates the probe functions to return the
negative error number on error and BLKID_PROBE_NONE
if not found.

[kzak@redhat.com: - fix s/return errno/return -errno/]

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
blkid: convert superblocks to new calling convention

With the previous patch the scanning functions were
modified to return a differentiated return code.
To correctly abort scanning when an I/O error occurs
we need to differentiate between 'error' (= -1) and
'not found' (= 1) in the probe functions.
This patch updates all superblock scanning functions
to the new calling convention.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Merge branch 'fix-unshare-defines' of https://github.com/rudimeier/util-linux

* 'fix-unshare-defines' of https://github.com/rudimeier/util-linux:
  unshare: include libmount.h to provide missing MS_* defines
build-sys: gettexts 0.18 -> 0.18.2 due to MKDIR_P

The autopoint is designed to not use the latest installed bug fix
release, if you specify

	AM_GNU_GETTEXT_VERSION([0.18])

in your configure.ac then it really uses 0.18, rather than also
installed 0.18.2 or 0.18.3. It means that bug fix update has no any
effect. Oh...

The AM_PROG_MKDIR_P is deprecated for years, unfortunately still used
in 0.18 gettext m4 stuff. This problem should be fixed in 0.18.2 where
is the correct AC_PROG_MKDIR_P macro.

If you do not have gettext 0.18.2 (or 0.18.3) then update.

Signed-off-by: Karel Zak <kzak@redhat.com>
Merge branch 'common_debug' of https://github.com/ooprala/util-linux

* 'common_debug' of https://github.com/ooprala/util-linux:
  clean up redundant macros and defines
  libfdisk: use include/debug.h
  libblkid: use include/debug.h
  libmount: further debug.h integration
  libcommon: don't mention lib versions in debug macros
  libcommon: define more debugging macros
  libmount: use macros from include/debug.h
  libcommon: add common debugging routines
include/debug: fix coding style

Signed-off-by: Karel Zak <kzak@redhat.com>
include/debug: add another debug macros

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: use new debug functions

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: use new debug functions

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: use new debug functions

Signed-off-by: Karel Zak <kzak@redhat.com>