Commit Graph

26 Commits

Author SHA1 Message Date
Bernhard Voelker ada74f3f32 mcookie: avoid format warning
"gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]"
issued the following warning:

  warning: format ‘%zu’ expects argument of type ‘size_t’, \
  but argument 3 has type ‘int’ [-Wformat=]

* misc-utils/mcookie.c (main): Change format from %zu to %d.
RAND_BYTES is an enum, thus of type int.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2014-07-28 11:09:49 +02:00
Benno Schulenberg 09af3db48e textual: fix some typos and inconsistencies in various messages
Fixing plain typos, miswordings, inconsistent periods, some missing
angular brackets, and a proper pluralization (even when it involves
a constant, because for some languages the precise value matters).

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-23 08:56:00 +02:00
Sami Kerola f7bac5731b 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>
2014-03-26 12:08:57 +01:00
Sami Kerola 46ae163a8e mcookie: use control structure, and fix usage()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 11:03:51 +01:00
Sami Kerola a3030b8ad3 mcookie: use same variable type consistently
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 10:36:18 +01:00
Sami Kerola cdf0c32596 mcookie: allow --file option be defined multiple times
Earlier only the last option argument took effect.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 10:36:18 +01:00
Sami Kerola 0720d60cc1 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>
2014-03-26 10:36:18 +01:00
Benno Schulenberg 5ea74a307f mcookie: pluralize two messages
Reported-by: Petr Písař <petr.pisar@atlas.cz>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08 15:27:29 +02:00
Benno Schulenberg b50945d4ac textual: spell and encode the name of Arkadiusz Miśkiewicz correctly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-02-06 11:15:02 +01:00
Karel Zak e421313dc2 textual: use UTIL_LINUX_VERSION everywhere
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-25 12:05:26 +01:00
Sami Kerola 289dcc9023 translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola c05a80ca63 misc-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:56:48 +02:00
Karel Zak b417b1ee22 mcookie: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 12:30:26 +02:00
Sami Kerola e429d14106 md5: use symbolical digest length
Magic hash lenght number 16 is turned to a definition MD5LENGTH,
and put into use everywhere where md5 checksum is in use.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-07-21 23:56:48 +02:00
Sami Kerola e6ebab66d4 mcookie: change coding style
Now in align with README.devel.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-25 12:37:43 +02:00
Sami Kerola e40f84b9d0 mcookie: use warnx, long options and help screen
Help and version options added. Additionally one compiler warning
got to be fixed.

mcookie.c:115:18: warning: comparison of integers of different signs: 'int' and 'unsigned long'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-25 12:37:37 +02:00
maximilian attems d3e8f6598b remove CVS keywords
this patch removes old CVS keywords from comments.

mount(8) works for newer Linux then 0.99 ;)

Signed-off-by: maximilian attems <max@stro.at>
2008-07-28 11:10:08 +02:00
Karel Zak 039837878d mcookie: remove non-linux code
Something like #ifdef __linux__ is non-sense in util-linux where
everything depend on linux.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14 14:43:41 +02:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak 5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
Karel Zak 726f69e29c Imported from util-linux-2.5 tarball. 2006-12-07 00:25:33 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00