flock: use nfs4 fallback on EBADF too

The kernel regression (probably v3.4, commit 55725513) introduces a
new errno for O_RDONLY on NFS. Now it returns EBADF rather than EIO.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1078618
Signed-off-by: Karel Zak <kzak@redhat.com>
mcookie: use lib/randutils

The mcookie should reuse existing code, and there is definitely no need
to prefer /dev/random for this utility.  See reference for explanation
about later statement.

References: http://www.2uo.de/myths-about-urandom/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mcookie: allow --file option be defined multiple times

Earlier only the last option argument took effect.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mcookie: use same variable type consistently

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mcookie: use control structure, and fix usage()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mcookie: add --max-size option

Just in case someone wants to add entropy from device with invocation
demonstrated below.

$ mcookie --file /dev/urandom --max-size 64k

[kzak@redhat.com: - use all-io.h]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
findfs: use symbolic exit values, and tell about them in manual

[[kzak@redhat.com: - move return codes to findfs.c]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Merge remote-tracking branch 'origin/master' into travis

* origin/master:
  findfs: use symbolic exit values, and tell about them in manual
  mcookie: add --max-size option
  mcookie: use control structure, and fix usage()
  mcookie: use same variable type consistently
  mcookie: allow --file option be defined multiple times
  mcookie: use lib/randutils
  flock: use nfs4 fallback on EBADF too